// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.sql.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ManagedInstanceActiveDirectoryAdministratorState extends com.pulumi.resources.ResourceArgs {

    public static final ManagedInstanceActiveDirectoryAdministratorState Empty = new ManagedInstanceActiveDirectoryAdministratorState();

    /**
     * Specifies whether only AD Users and administrators can be used to login (`true`) or also local database users (`false`). Defaults to `false`.
     * 
     */
    @Import(name="azureadAuthenticationOnly")
    private @Nullable Output<Boolean> azureadAuthenticationOnly;

    /**
     * @return Specifies whether only AD Users and administrators can be used to login (`true`) or also local database users (`false`). Defaults to `false`.
     * 
     */
    public Optional<Output<Boolean>> azureadAuthenticationOnly() {
        return Optional.ofNullable(this.azureadAuthenticationOnly);
    }

    /**
     * The login name of the principal to set as the Managed Instance administrator
     * 
     */
    @Import(name="login")
    private @Nullable Output<String> login;

    /**
     * @return The login name of the principal to set as the Managed Instance administrator
     * 
     */
    public Optional<Output<String>> login() {
        return Optional.ofNullable(this.login);
    }

    /**
     * The name of the SQL Managed Instance on which to set the administrator. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="managedInstanceName")
    private @Nullable Output<String> managedInstanceName;

    /**
     * @return The name of the SQL Managed Instance on which to set the administrator. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> managedInstanceName() {
        return Optional.ofNullable(this.managedInstanceName);
    }

    /**
     * The ID of the principal to set as the Managed Instance administrator
     * 
     */
    @Import(name="objectId")
    private @Nullable Output<String> objectId;

    /**
     * @return The ID of the principal to set as the Managed Instance administrator
     * 
     */
    public Optional<Output<String>> objectId() {
        return Optional.ofNullable(this.objectId);
    }

    /**
     * The name of the resource group for the SQL Managed Instance. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName")
    private @Nullable Output<String> resourceGroupName;

    /**
     * @return The name of the resource group for the SQL Managed Instance. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> resourceGroupName() {
        return Optional.ofNullable(this.resourceGroupName);
    }

    /**
     * The Azure Tenant ID
     * 
     */
    @Import(name="tenantId")
    private @Nullable Output<String> tenantId;

    /**
     * @return The Azure Tenant ID
     * 
     */
    public Optional<Output<String>> tenantId() {
        return Optional.ofNullable(this.tenantId);
    }

    private ManagedInstanceActiveDirectoryAdministratorState() {}

    private ManagedInstanceActiveDirectoryAdministratorState(ManagedInstanceActiveDirectoryAdministratorState $) {
        this.azureadAuthenticationOnly = $.azureadAuthenticationOnly;
        this.login = $.login;
        this.managedInstanceName = $.managedInstanceName;
        this.objectId = $.objectId;
        this.resourceGroupName = $.resourceGroupName;
        this.tenantId = $.tenantId;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ManagedInstanceActiveDirectoryAdministratorState defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ManagedInstanceActiveDirectoryAdministratorState $;

        public Builder() {
            $ = new ManagedInstanceActiveDirectoryAdministratorState();
        }

        public Builder(ManagedInstanceActiveDirectoryAdministratorState defaults) {
            $ = new ManagedInstanceActiveDirectoryAdministratorState(Objects.requireNonNull(defaults));
        }

        /**
         * @param azureadAuthenticationOnly Specifies whether only AD Users and administrators can be used to login (`true`) or also local database users (`false`). Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder azureadAuthenticationOnly(@Nullable Output<Boolean> azureadAuthenticationOnly) {
            $.azureadAuthenticationOnly = azureadAuthenticationOnly;
            return this;
        }

        /**
         * @param azureadAuthenticationOnly Specifies whether only AD Users and administrators can be used to login (`true`) or also local database users (`false`). Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder azureadAuthenticationOnly(Boolean azureadAuthenticationOnly) {
            return azureadAuthenticationOnly(Output.of(azureadAuthenticationOnly));
        }

        /**
         * @param login The login name of the principal to set as the Managed Instance administrator
         * 
         * @return builder
         * 
         */
        public Builder login(@Nullable Output<String> login) {
            $.login = login;
            return this;
        }

        /**
         * @param login The login name of the principal to set as the Managed Instance administrator
         * 
         * @return builder
         * 
         */
        public Builder login(String login) {
            return login(Output.of(login));
        }

        /**
         * @param managedInstanceName The name of the SQL Managed Instance on which to set the administrator. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder managedInstanceName(@Nullable Output<String> managedInstanceName) {
            $.managedInstanceName = managedInstanceName;
            return this;
        }

        /**
         * @param managedInstanceName The name of the SQL Managed Instance on which to set the administrator. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder managedInstanceName(String managedInstanceName) {
            return managedInstanceName(Output.of(managedInstanceName));
        }

        /**
         * @param objectId The ID of the principal to set as the Managed Instance administrator
         * 
         * @return builder
         * 
         */
        public Builder objectId(@Nullable Output<String> objectId) {
            $.objectId = objectId;
            return this;
        }

        /**
         * @param objectId The ID of the principal to set as the Managed Instance administrator
         * 
         * @return builder
         * 
         */
        public Builder objectId(String objectId) {
            return objectId(Output.of(objectId));
        }

        /**
         * @param resourceGroupName The name of the resource group for the SQL Managed Instance. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(@Nullable Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group for the SQL Managed Instance. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param tenantId The Azure Tenant ID
         * 
         * @return builder
         * 
         */
        public Builder tenantId(@Nullable Output<String> tenantId) {
            $.tenantId = tenantId;
            return this;
        }

        /**
         * @param tenantId The Azure Tenant ID
         * 
         * @return builder
         * 
         */
        public Builder tenantId(String tenantId) {
            return tenantId(Output.of(tenantId));
        }

        public ManagedInstanceActiveDirectoryAdministratorState build() {
            return $;
        }
    }

}
