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

/** The CreateTenantRequestBodyProperties model. */
@Fluent
public final class CreateTenantRequestBodyProperties {
    /*
     * These properties are used to create the Azure AD B2C tenant. These
     * properties are not part of the Azure resource.
     */
    @JsonProperty(value = "createTenantProperties")
    private CreateTenantProperties innerCreateTenantProperties;

    /**
     * Get the innerCreateTenantProperties property: These properties are used to create the Azure AD B2C tenant. These
     * properties are not part of the Azure resource.
     *
     * @return the innerCreateTenantProperties value.
     */
    private CreateTenantProperties innerCreateTenantProperties() {
        return this.innerCreateTenantProperties;
    }

    /**
     * Get the displayName property: The display name of the Azure AD B2C tenant.
     *
     * @return the displayName value.
     */
    public String displayName() {
        return this.innerCreateTenantProperties() == null ? null : this.innerCreateTenantProperties().displayName();
    }

    /**
     * Set the displayName property: The display name of the Azure AD B2C tenant.
     *
     * @param displayName the displayName value to set.
     * @return the CreateTenantRequestBodyProperties object itself.
     */
    public CreateTenantRequestBodyProperties withDisplayName(String displayName) {
        if (this.innerCreateTenantProperties() == null) {
            this.innerCreateTenantProperties = new CreateTenantProperties();
        }
        this.innerCreateTenantProperties().withDisplayName(displayName);
        return this;
    }

    /**
     * Get the countryCode property: Country code of Azure tenant (e.g. 'US'). Refer to
     * [aka.ms/B2CDataResidency](https://aka.ms/B2CDataResidency) to see valid country codes and corresponding data
     * residency locations. If you do not see a country code in an valid data residency location, choose one from the
     * list.
     *
     * @return the countryCode value.
     */
    public String countryCode() {
        return this.innerCreateTenantProperties() == null ? null : this.innerCreateTenantProperties().countryCode();
    }

    /**
     * Set the countryCode property: Country code of Azure tenant (e.g. 'US'). Refer to
     * [aka.ms/B2CDataResidency](https://aka.ms/B2CDataResidency) to see valid country codes and corresponding data
     * residency locations. If you do not see a country code in an valid data residency location, choose one from the
     * list.
     *
     * @param countryCode the countryCode value to set.
     * @return the CreateTenantRequestBodyProperties object itself.
     */
    public CreateTenantRequestBodyProperties withCountryCode(String countryCode) {
        if (this.innerCreateTenantProperties() == null) {
            this.innerCreateTenantProperties = new CreateTenantProperties();
        }
        this.innerCreateTenantProperties().withCountryCode(countryCode);
        return this;
    }

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