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

package com.azure.resourcemanager.kusto.models;

import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.kusto.fluent.models.AttachedDatabaseConfigurationInner;
import java.util.List;

/** An immutable client-side representation of AttachedDatabaseConfiguration. */
public interface AttachedDatabaseConfiguration {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the location property: Resource location.
     *
     * @return the location value.
     */
    String location();

    /**
     * Gets the provisioningState property: The provisioned state of the resource.
     *
     * @return the provisioningState value.
     */
    ProvisioningState provisioningState();

    /**
     * Gets the databaseName property: The name of the database which you would like to attach, use * if you want to
     * follow all current and future databases.
     *
     * @return the databaseName value.
     */
    String databaseName();

    /**
     * Gets the clusterResourceId property: The resource id of the cluster where the databases you would like to attach
     * reside.
     *
     * @return the clusterResourceId value.
     */
    String clusterResourceId();

    /**
     * Gets the attachedDatabaseNames property: The list of databases from the clusterResourceId which are currently
     * attached to the cluster.
     *
     * @return the attachedDatabaseNames value.
     */
    List<String> attachedDatabaseNames();

    /**
     * Gets the defaultPrincipalsModificationKind property: The default principals modification kind.
     *
     * @return the defaultPrincipalsModificationKind value.
     */
    DefaultPrincipalsModificationKind defaultPrincipalsModificationKind();

    /**
     * Gets the tableLevelSharingProperties property: Table level sharing specifications.
     *
     * @return the tableLevelSharingProperties value.
     */
    TableLevelSharingProperties tableLevelSharingProperties();

    /**
     * Gets the databaseNameOverride property: Overrides the original database name. Relevant only when attaching to a
     * specific database.
     *
     * @return the databaseNameOverride value.
     */
    String databaseNameOverride();

    /**
     * Gets the databaseNamePrefix property: Adds a prefix to the attached databases name. When following an entire
     * cluster, that prefix would be added to all of the databases original names from leader cluster.
     *
     * @return the databaseNamePrefix value.
     */
    String databaseNamePrefix();

    /**
     * Gets the region of the resource.
     *
     * @return the region of the resource.
     */
    Region region();

    /**
     * Gets the name of the resource region.
     *
     * @return the name of the resource region.
     */
    String regionName();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.kusto.fluent.models.AttachedDatabaseConfigurationInner object.
     *
     * @return the inner object.
     */
    AttachedDatabaseConfigurationInner innerModel();

    /** The entirety of the AttachedDatabaseConfiguration definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The AttachedDatabaseConfiguration definition stages. */
    interface DefinitionStages {
        /** The first stage of the AttachedDatabaseConfiguration definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the AttachedDatabaseConfiguration definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, clusterName.
             *
             * @param resourceGroupName The name of the resource group containing the Kusto cluster.
             * @param clusterName The name of the Kusto cluster.
             * @return the next definition stage.
             */
            WithCreate withExistingCluster(String resourceGroupName, String clusterName);
        }
        /**
         * The stage of the AttachedDatabaseConfiguration definition which contains all the minimum required properties
         * for the resource to be created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate
            extends DefinitionStages.WithLocation,
                DefinitionStages.WithDatabaseName,
                DefinitionStages.WithClusterResourceId,
                DefinitionStages.WithDefaultPrincipalsModificationKind,
                DefinitionStages.WithTableLevelSharingProperties,
                DefinitionStages.WithDatabaseNameOverride,
                DefinitionStages.WithDatabaseNamePrefix {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            AttachedDatabaseConfiguration create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            AttachedDatabaseConfiguration create(Context context);
        }
        /** The stage of the AttachedDatabaseConfiguration definition allowing to specify location. */
        interface WithLocation {
            /**
             * Specifies the region for the resource.
             *
             * @param location Resource location.
             * @return the next definition stage.
             */
            WithCreate withRegion(Region location);

            /**
             * Specifies the region for the resource.
             *
             * @param location Resource location.
             * @return the next definition stage.
             */
            WithCreate withRegion(String location);
        }
        /** The stage of the AttachedDatabaseConfiguration definition allowing to specify databaseName. */
        interface WithDatabaseName {
            /**
             * Specifies the databaseName property: The name of the database which you would like to attach, use * if
             * you want to follow all current and future databases..
             *
             * @param databaseName The name of the database which you would like to attach, use * if you want to follow
             *     all current and future databases.
             * @return the next definition stage.
             */
            WithCreate withDatabaseName(String databaseName);
        }
        /** The stage of the AttachedDatabaseConfiguration definition allowing to specify clusterResourceId. */
        interface WithClusterResourceId {
            /**
             * Specifies the clusterResourceId property: The resource id of the cluster where the databases you would
             * like to attach reside..
             *
             * @param clusterResourceId The resource id of the cluster where the databases you would like to attach
             *     reside.
             * @return the next definition stage.
             */
            WithCreate withClusterResourceId(String clusterResourceId);
        }
        /**
         * The stage of the AttachedDatabaseConfiguration definition allowing to specify
         * defaultPrincipalsModificationKind.
         */
        interface WithDefaultPrincipalsModificationKind {
            /**
             * Specifies the defaultPrincipalsModificationKind property: The default principals modification kind.
             *
             * @param defaultPrincipalsModificationKind The default principals modification kind.
             * @return the next definition stage.
             */
            WithCreate withDefaultPrincipalsModificationKind(
                DefaultPrincipalsModificationKind defaultPrincipalsModificationKind);
        }
        /**
         * The stage of the AttachedDatabaseConfiguration definition allowing to specify tableLevelSharingProperties.
         */
        interface WithTableLevelSharingProperties {
            /**
             * Specifies the tableLevelSharingProperties property: Table level sharing specifications.
             *
             * @param tableLevelSharingProperties Table level sharing specifications.
             * @return the next definition stage.
             */
            WithCreate withTableLevelSharingProperties(TableLevelSharingProperties tableLevelSharingProperties);
        }
        /** The stage of the AttachedDatabaseConfiguration definition allowing to specify databaseNameOverride. */
        interface WithDatabaseNameOverride {
            /**
             * Specifies the databaseNameOverride property: Overrides the original database name. Relevant only when
             * attaching to a specific database..
             *
             * @param databaseNameOverride Overrides the original database name. Relevant only when attaching to a
             *     specific database.
             * @return the next definition stage.
             */
            WithCreate withDatabaseNameOverride(String databaseNameOverride);
        }
        /** The stage of the AttachedDatabaseConfiguration definition allowing to specify databaseNamePrefix. */
        interface WithDatabaseNamePrefix {
            /**
             * Specifies the databaseNamePrefix property: Adds a prefix to the attached databases name. When following
             * an entire cluster, that prefix would be added to all of the databases original names from leader
             * cluster..
             *
             * @param databaseNamePrefix Adds a prefix to the attached databases name. When following an entire cluster,
             *     that prefix would be added to all of the databases original names from leader cluster.
             * @return the next definition stage.
             */
            WithCreate withDatabaseNamePrefix(String databaseNamePrefix);
        }
    }
    /**
     * Begins update for the AttachedDatabaseConfiguration resource.
     *
     * @return the stage of resource update.
     */
    AttachedDatabaseConfiguration.Update update();

    /** The template for AttachedDatabaseConfiguration update. */
    interface Update
        extends UpdateStages.WithDatabaseName,
            UpdateStages.WithClusterResourceId,
            UpdateStages.WithDefaultPrincipalsModificationKind,
            UpdateStages.WithTableLevelSharingProperties,
            UpdateStages.WithDatabaseNameOverride,
            UpdateStages.WithDatabaseNamePrefix {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        AttachedDatabaseConfiguration apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        AttachedDatabaseConfiguration apply(Context context);
    }
    /** The AttachedDatabaseConfiguration update stages. */
    interface UpdateStages {
        /** The stage of the AttachedDatabaseConfiguration update allowing to specify databaseName. */
        interface WithDatabaseName {
            /**
             * Specifies the databaseName property: The name of the database which you would like to attach, use * if
             * you want to follow all current and future databases..
             *
             * @param databaseName The name of the database which you would like to attach, use * if you want to follow
             *     all current and future databases.
             * @return the next definition stage.
             */
            Update withDatabaseName(String databaseName);
        }
        /** The stage of the AttachedDatabaseConfiguration update allowing to specify clusterResourceId. */
        interface WithClusterResourceId {
            /**
             * Specifies the clusterResourceId property: The resource id of the cluster where the databases you would
             * like to attach reside..
             *
             * @param clusterResourceId The resource id of the cluster where the databases you would like to attach
             *     reside.
             * @return the next definition stage.
             */
            Update withClusterResourceId(String clusterResourceId);
        }
        /**
         * The stage of the AttachedDatabaseConfiguration update allowing to specify defaultPrincipalsModificationKind.
         */
        interface WithDefaultPrincipalsModificationKind {
            /**
             * Specifies the defaultPrincipalsModificationKind property: The default principals modification kind.
             *
             * @param defaultPrincipalsModificationKind The default principals modification kind.
             * @return the next definition stage.
             */
            Update withDefaultPrincipalsModificationKind(
                DefaultPrincipalsModificationKind defaultPrincipalsModificationKind);
        }
        /** The stage of the AttachedDatabaseConfiguration update allowing to specify tableLevelSharingProperties. */
        interface WithTableLevelSharingProperties {
            /**
             * Specifies the tableLevelSharingProperties property: Table level sharing specifications.
             *
             * @param tableLevelSharingProperties Table level sharing specifications.
             * @return the next definition stage.
             */
            Update withTableLevelSharingProperties(TableLevelSharingProperties tableLevelSharingProperties);
        }
        /** The stage of the AttachedDatabaseConfiguration update allowing to specify databaseNameOverride. */
        interface WithDatabaseNameOverride {
            /**
             * Specifies the databaseNameOverride property: Overrides the original database name. Relevant only when
             * attaching to a specific database..
             *
             * @param databaseNameOverride Overrides the original database name. Relevant only when attaching to a
             *     specific database.
             * @return the next definition stage.
             */
            Update withDatabaseNameOverride(String databaseNameOverride);
        }
        /** The stage of the AttachedDatabaseConfiguration update allowing to specify databaseNamePrefix. */
        interface WithDatabaseNamePrefix {
            /**
             * Specifies the databaseNamePrefix property: Adds a prefix to the attached databases name. When following
             * an entire cluster, that prefix would be added to all of the databases original names from leader
             * cluster..
             *
             * @param databaseNamePrefix Adds a prefix to the attached databases name. When following an entire cluster,
             *     that prefix would be added to all of the databases original names from leader cluster.
             * @return the next definition stage.
             */
            Update withDatabaseNamePrefix(String databaseNamePrefix);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    AttachedDatabaseConfiguration refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    AttachedDatabaseConfiguration refresh(Context context);
}
