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

package com.azure.resourcemanager.datalakestore.models;

import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.datalakestore.fluent.models.DataLakeStoreAccountInner;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;
import java.util.UUID;

/** An immutable client-side representation of DataLakeStoreAccount. */
public interface DataLakeStoreAccount {
    /**
     * 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: The geo-location where the resource lives.
     *
     * @return the location value.
     */
    String location();

    /**
     * Gets the tags property: Resource tags.
     *
     * @return the tags value.
     */
    Map<String, String> tags();

    /**
     * Gets the identity property: The Key Vault encryption identity, if any.
     *
     * @return the identity value.
     */
    EncryptionIdentity identity();

    /**
     * Gets the defaultGroup property: The default owner group for all new folders and files created in the Data Lake
     * Store account.
     *
     * @return the defaultGroup value.
     */
    String defaultGroup();

    /**
     * Gets the encryptionConfig property: The Key Vault encryption configuration.
     *
     * @return the encryptionConfig value.
     */
    EncryptionConfig encryptionConfig();

    /**
     * Gets the encryptionState property: The current state of encryption for this Data Lake Store account.
     *
     * @return the encryptionState value.
     */
    EncryptionState encryptionState();

    /**
     * Gets the encryptionProvisioningState property: The current state of encryption provisioning for this Data Lake
     * Store account.
     *
     * @return the encryptionProvisioningState value.
     */
    EncryptionProvisioningState encryptionProvisioningState();

    /**
     * Gets the firewallRules property: The list of firewall rules associated with this Data Lake Store account.
     *
     * @return the firewallRules value.
     */
    List<FirewallRule> firewallRules();

    /**
     * Gets the virtualNetworkRules property: The list of virtual network rules associated with this Data Lake Store
     * account.
     *
     * @return the virtualNetworkRules value.
     */
    List<VirtualNetworkRule> virtualNetworkRules();

    /**
     * Gets the firewallState property: The current state of the IP address firewall for this Data Lake Store account.
     *
     * @return the firewallState value.
     */
    FirewallState firewallState();

    /**
     * Gets the firewallAllowAzureIps property: The current state of allowing or disallowing IPs originating within
     * Azure through the firewall. If the firewall is disabled, this is not enforced.
     *
     * @return the firewallAllowAzureIps value.
     */
    FirewallAllowAzureIpsState firewallAllowAzureIps();

    /**
     * Gets the trustedIdProviders property: The list of trusted identity providers associated with this Data Lake Store
     * account.
     *
     * @return the trustedIdProviders value.
     */
    List<TrustedIdProvider> trustedIdProviders();

    /**
     * Gets the trustedIdProviderState property: The current state of the trusted identity provider feature for this
     * Data Lake Store account.
     *
     * @return the trustedIdProviderState value.
     */
    TrustedIdProviderState trustedIdProviderState();

    /**
     * Gets the newTier property: The commitment tier to use for next month.
     *
     * @return the newTier value.
     */
    TierType newTier();

    /**
     * Gets the currentTier property: The commitment tier in use for the current month.
     *
     * @return the currentTier value.
     */
    TierType currentTier();

    /**
     * Gets the accountId property: The unique identifier associated with this Data Lake Store account.
     *
     * @return the accountId value.
     */
    UUID accountId();

    /**
     * Gets the provisioningState property: The provisioning status of the Data Lake Store account.
     *
     * @return the provisioningState value.
     */
    DataLakeStoreAccountStatus provisioningState();

    /**
     * Gets the state property: The state of the Data Lake Store account.
     *
     * @return the state value.
     */
    DataLakeStoreAccountState state();

    /**
     * Gets the creationTime property: The account creation time.
     *
     * @return the creationTime value.
     */
    OffsetDateTime creationTime();

    /**
     * Gets the lastModifiedTime property: The account last modified time.
     *
     * @return the lastModifiedTime value.
     */
    OffsetDateTime lastModifiedTime();

    /**
     * Gets the endpoint property: The full CName endpoint for this account.
     *
     * @return the endpoint value.
     */
    String endpoint();

    /**
     * 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.datalakestore.fluent.models.DataLakeStoreAccountInner object.
     *
     * @return the inner object.
     */
    DataLakeStoreAccountInner innerModel();

    /** The entirety of the DataLakeStoreAccount definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithLocation,
            DefinitionStages.WithResourceGroup,
            DefinitionStages.WithCreate {
    }
    /** The DataLakeStoreAccount definition stages. */
    interface DefinitionStages {
        /** The first stage of the DataLakeStoreAccount definition. */
        interface Blank extends WithLocation {
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify location. */
        interface WithLocation {
            /**
             * Specifies the region for the resource.
             *
             * @param location The resource location.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(Region location);

            /**
             * Specifies the region for the resource.
             *
             * @param location The resource location.
             * @return the next definition stage.
             */
            WithResourceGroup withRegion(String location);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify parent resource. */
        interface WithResourceGroup {
            /**
             * Specifies resourceGroupName.
             *
             * @param resourceGroupName The name of the Azure resource group.
             * @return the next definition stage.
             */
            WithCreate withExistingResourceGroup(String resourceGroupName);
        }
        /**
         * The stage of the DataLakeStoreAccount 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.WithTags,
                DefinitionStages.WithIdentity,
                DefinitionStages.WithDefaultGroup,
                DefinitionStages.WithEncryptionConfig,
                DefinitionStages.WithEncryptionState,
                DefinitionStages.WithFirewallRules,
                DefinitionStages.WithVirtualNetworkRules,
                DefinitionStages.WithFirewallState,
                DefinitionStages.WithFirewallAllowAzureIps,
                DefinitionStages.WithTrustedIdProviders,
                DefinitionStages.WithTrustedIdProviderState,
                DefinitionStages.WithNewTier {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            DataLakeStoreAccount create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            DataLakeStoreAccount create(Context context);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: The resource tags..
             *
             * @param tags The resource tags.
             * @return the next definition stage.
             */
            WithCreate withTags(Map<String, String> tags);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify identity. */
        interface WithIdentity {
            /**
             * Specifies the identity property: The Key Vault encryption identity, if any..
             *
             * @param identity The Key Vault encryption identity, if any.
             * @return the next definition stage.
             */
            WithCreate withIdentity(EncryptionIdentity identity);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify defaultGroup. */
        interface WithDefaultGroup {
            /**
             * Specifies the defaultGroup property: The default owner group for all new folders and files created in the
             * Data Lake Store account..
             *
             * @param defaultGroup The default owner group for all new folders and files created in the Data Lake Store
             *     account.
             * @return the next definition stage.
             */
            WithCreate withDefaultGroup(String defaultGroup);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify encryptionConfig. */
        interface WithEncryptionConfig {
            /**
             * Specifies the encryptionConfig property: The Key Vault encryption configuration..
             *
             * @param encryptionConfig The Key Vault encryption configuration.
             * @return the next definition stage.
             */
            WithCreate withEncryptionConfig(EncryptionConfig encryptionConfig);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify encryptionState. */
        interface WithEncryptionState {
            /**
             * Specifies the encryptionState property: The current state of encryption for this Data Lake Store
             * account..
             *
             * @param encryptionState The current state of encryption for this Data Lake Store account.
             * @return the next definition stage.
             */
            WithCreate withEncryptionState(EncryptionState encryptionState);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify firewallRules. */
        interface WithFirewallRules {
            /**
             * Specifies the firewallRules property: The list of firewall rules associated with this Data Lake Store
             * account..
             *
             * @param firewallRules The list of firewall rules associated with this Data Lake Store account.
             * @return the next definition stage.
             */
            WithCreate withFirewallRules(List<CreateFirewallRuleWithAccountParameters> firewallRules);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify virtualNetworkRules. */
        interface WithVirtualNetworkRules {
            /**
             * Specifies the virtualNetworkRules property: The list of virtual network rules associated with this Data
             * Lake Store account..
             *
             * @param virtualNetworkRules The list of virtual network rules associated with this Data Lake Store
             *     account.
             * @return the next definition stage.
             */
            WithCreate withVirtualNetworkRules(List<CreateVirtualNetworkRuleWithAccountParameters> virtualNetworkRules);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify firewallState. */
        interface WithFirewallState {
            /**
             * Specifies the firewallState property: The current state of the IP address firewall for this Data Lake
             * Store account..
             *
             * @param firewallState The current state of the IP address firewall for this Data Lake Store account.
             * @return the next definition stage.
             */
            WithCreate withFirewallState(FirewallState firewallState);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify firewallAllowAzureIps. */
        interface WithFirewallAllowAzureIps {
            /**
             * Specifies the firewallAllowAzureIps property: The current state of allowing or disallowing IPs
             * originating within Azure through the firewall. If the firewall is disabled, this is not enforced..
             *
             * @param firewallAllowAzureIps The current state of allowing or disallowing IPs originating within Azure
             *     through the firewall. If the firewall is disabled, this is not enforced.
             * @return the next definition stage.
             */
            WithCreate withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify trustedIdProviders. */
        interface WithTrustedIdProviders {
            /**
             * Specifies the trustedIdProviders property: The list of trusted identity providers associated with this
             * Data Lake Store account..
             *
             * @param trustedIdProviders The list of trusted identity providers associated with this Data Lake Store
             *     account.
             * @return the next definition stage.
             */
            WithCreate withTrustedIdProviders(List<CreateTrustedIdProviderWithAccountParameters> trustedIdProviders);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify trustedIdProviderState. */
        interface WithTrustedIdProviderState {
            /**
             * Specifies the trustedIdProviderState property: The current state of the trusted identity provider feature
             * for this Data Lake Store account..
             *
             * @param trustedIdProviderState The current state of the trusted identity provider feature for this Data
             *     Lake Store account.
             * @return the next definition stage.
             */
            WithCreate withTrustedIdProviderState(TrustedIdProviderState trustedIdProviderState);
        }
        /** The stage of the DataLakeStoreAccount definition allowing to specify newTier. */
        interface WithNewTier {
            /**
             * Specifies the newTier property: The commitment tier to use for next month..
             *
             * @param newTier The commitment tier to use for next month.
             * @return the next definition stage.
             */
            WithCreate withNewTier(TierType newTier);
        }
    }
    /**
     * Begins update for the DataLakeStoreAccount resource.
     *
     * @return the stage of resource update.
     */
    DataLakeStoreAccount.Update update();

    /** The template for DataLakeStoreAccount update. */
    interface Update
        extends UpdateStages.WithTags,
            UpdateStages.WithDefaultGroup,
            UpdateStages.WithEncryptionConfig,
            UpdateStages.WithFirewallRules,
            UpdateStages.WithVirtualNetworkRules,
            UpdateStages.WithFirewallState,
            UpdateStages.WithFirewallAllowAzureIps,
            UpdateStages.WithTrustedIdProviders,
            UpdateStages.WithTrustedIdProviderState,
            UpdateStages.WithNewTier {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        DataLakeStoreAccount apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        DataLakeStoreAccount apply(Context context);
    }
    /** The DataLakeStoreAccount update stages. */
    interface UpdateStages {
        /** The stage of the DataLakeStoreAccount update allowing to specify tags. */
        interface WithTags {
            /**
             * Specifies the tags property: Resource tags.
             *
             * @param tags Resource tags.
             * @return the next definition stage.
             */
            Update withTags(Map<String, String> tags);
        }
        /** The stage of the DataLakeStoreAccount update allowing to specify defaultGroup. */
        interface WithDefaultGroup {
            /**
             * Specifies the defaultGroup property: The default owner group for all new folders and files created in the
             * Data Lake Store account..
             *
             * @param defaultGroup The default owner group for all new folders and files created in the Data Lake Store
             *     account.
             * @return the next definition stage.
             */
            Update withDefaultGroup(String defaultGroup);
        }
        /** The stage of the DataLakeStoreAccount update allowing to specify encryptionConfig. */
        interface WithEncryptionConfig {
            /**
             * Specifies the encryptionConfig property: Used for rotation of user managed Key Vault keys. Can only be
             * used to rotate a user managed encryption Key Vault key..
             *
             * @param encryptionConfig Used for rotation of user managed Key Vault keys. Can only be used to rotate a
             *     user managed encryption Key Vault key.
             * @return the next definition stage.
             */
            Update withEncryptionConfig(UpdateEncryptionConfig encryptionConfig);
        }
        /** The stage of the DataLakeStoreAccount update allowing to specify firewallRules. */
        interface WithFirewallRules {
            /**
             * Specifies the firewallRules property: The list of firewall rules associated with this Data Lake Store
             * account..
             *
             * @param firewallRules The list of firewall rules associated with this Data Lake Store account.
             * @return the next definition stage.
             */
            Update withFirewallRulesForUpdate(List<UpdateFirewallRuleWithAccountParameters> firewallRules);
        }
        /** The stage of the DataLakeStoreAccount update allowing to specify virtualNetworkRules. */
        interface WithVirtualNetworkRules {
            /**
             * Specifies the virtualNetworkRules property: The list of virtual network rules associated with this Data
             * Lake Store account..
             *
             * @param virtualNetworkRules The list of virtual network rules associated with this Data Lake Store
             *     account.
             * @return the next definition stage.
             */
            Update withVirtualNetworkRulesForUpdate(
                List<UpdateVirtualNetworkRuleWithAccountParameters> virtualNetworkRules);
        }
        /** The stage of the DataLakeStoreAccount update allowing to specify firewallState. */
        interface WithFirewallState {
            /**
             * Specifies the firewallState property: The current state of the IP address firewall for this Data Lake
             * Store account. Disabling the firewall does not remove existing rules, they will just be ignored until the
             * firewall is re-enabled..
             *
             * @param firewallState The current state of the IP address firewall for this Data Lake Store account.
             *     Disabling the firewall does not remove existing rules, they will just be ignored until the firewall
             *     is re-enabled.
             * @return the next definition stage.
             */
            Update withFirewallState(FirewallState firewallState);
        }
        /** The stage of the DataLakeStoreAccount update allowing to specify firewallAllowAzureIps. */
        interface WithFirewallAllowAzureIps {
            /**
             * Specifies the firewallAllowAzureIps property: The current state of allowing or disallowing IPs
             * originating within Azure through the firewall. If the firewall is disabled, this is not enforced..
             *
             * @param firewallAllowAzureIps The current state of allowing or disallowing IPs originating within Azure
             *     through the firewall. If the firewall is disabled, this is not enforced.
             * @return the next definition stage.
             */
            Update withFirewallAllowAzureIps(FirewallAllowAzureIpsState firewallAllowAzureIps);
        }
        /** The stage of the DataLakeStoreAccount update allowing to specify trustedIdProviders. */
        interface WithTrustedIdProviders {
            /**
             * Specifies the trustedIdProviders property: The list of trusted identity providers associated with this
             * Data Lake Store account..
             *
             * @param trustedIdProviders The list of trusted identity providers associated with this Data Lake Store
             *     account.
             * @return the next definition stage.
             */
            Update withTrustedIdProvidersForUpdate(
                List<UpdateTrustedIdProviderWithAccountParameters> trustedIdProviders);
        }
        /** The stage of the DataLakeStoreAccount update allowing to specify trustedIdProviderState. */
        interface WithTrustedIdProviderState {
            /**
             * Specifies the trustedIdProviderState property: The current state of the trusted identity provider feature
             * for this Data Lake Store account. Disabling trusted identity provider functionality does not remove the
             * providers, they will just be ignored until this feature is re-enabled..
             *
             * @param trustedIdProviderState The current state of the trusted identity provider feature for this Data
             *     Lake Store account. Disabling trusted identity provider functionality does not remove the providers,
             *     they will just be ignored until this feature is re-enabled.
             * @return the next definition stage.
             */
            Update withTrustedIdProviderState(TrustedIdProviderState trustedIdProviderState);
        }
        /** The stage of the DataLakeStoreAccount update allowing to specify newTier. */
        interface WithNewTier {
            /**
             * Specifies the newTier property: The commitment tier to use for next month..
             *
             * @param newTier The commitment tier to use for next month.
             * @return the next definition stage.
             */
            Update withNewTier(TierType newTier);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    DataLakeStoreAccount refresh();

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

    /**
     * Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account.
     *
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the {@link Response}.
     */
    Response<Void> enableKeyVaultWithResponse(Context context);

    /**
     * Attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account.
     *
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     */
    void enableKeyVault();
}
