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

package com.azure.resourcemanager.synapse;

import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.synapse.fluent.SynapseManagementClient;
import com.azure.resourcemanager.synapse.implementation.AzureADOnlyAuthenticationsImpl;
import com.azure.resourcemanager.synapse.implementation.BigDataPoolsImpl;
import com.azure.resourcemanager.synapse.implementation.DataMaskingPoliciesImpl;
import com.azure.resourcemanager.synapse.implementation.DataMaskingRulesImpl;
import com.azure.resourcemanager.synapse.implementation.ExtendedSqlPoolBlobAuditingPoliciesImpl;
import com.azure.resourcemanager.synapse.implementation.GetsImpl;
import com.azure.resourcemanager.synapse.implementation.IntegrationRuntimeAuthKeysOperationsImpl;
import com.azure.resourcemanager.synapse.implementation.IntegrationRuntimeConnectionInfosImpl;
import com.azure.resourcemanager.synapse.implementation.IntegrationRuntimeCredentialsImpl;
import com.azure.resourcemanager.synapse.implementation.IntegrationRuntimeMonitoringDatasImpl;
import com.azure.resourcemanager.synapse.implementation.IntegrationRuntimeNodeIpAddressOperationsImpl;
import com.azure.resourcemanager.synapse.implementation.IntegrationRuntimeNodesImpl;
import com.azure.resourcemanager.synapse.implementation.IntegrationRuntimeObjectMetadatasImpl;
import com.azure.resourcemanager.synapse.implementation.IntegrationRuntimeStatusOperationsImpl;
import com.azure.resourcemanager.synapse.implementation.IntegrationRuntimesImpl;
import com.azure.resourcemanager.synapse.implementation.IpFirewallRulesImpl;
import com.azure.resourcemanager.synapse.implementation.KeysImpl;
import com.azure.resourcemanager.synapse.implementation.KustoOperationsImpl;
import com.azure.resourcemanager.synapse.implementation.KustoPoolAttachedDatabaseConfigurationsImpl;
import com.azure.resourcemanager.synapse.implementation.KustoPoolChildResourcesImpl;
import com.azure.resourcemanager.synapse.implementation.KustoPoolDataConnectionsImpl;
import com.azure.resourcemanager.synapse.implementation.KustoPoolDatabasePrincipalAssignmentsImpl;
import com.azure.resourcemanager.synapse.implementation.KustoPoolDatabasesImpl;
import com.azure.resourcemanager.synapse.implementation.KustoPoolPrincipalAssignmentsImpl;
import com.azure.resourcemanager.synapse.implementation.KustoPoolPrivateLinkResourcesOperationsImpl;
import com.azure.resourcemanager.synapse.implementation.KustoPoolsImpl;
import com.azure.resourcemanager.synapse.implementation.LibrariesImpl;
import com.azure.resourcemanager.synapse.implementation.LibrariesOperationsImpl;
import com.azure.resourcemanager.synapse.implementation.OperationsImpl;
import com.azure.resourcemanager.synapse.implementation.PrivateEndpointConnectionsImpl;
import com.azure.resourcemanager.synapse.implementation.PrivateEndpointConnectionsPrivateLinkHubsImpl;
import com.azure.resourcemanager.synapse.implementation.PrivateLinkHubPrivateLinkResourcesImpl;
import com.azure.resourcemanager.synapse.implementation.PrivateLinkHubsImpl;
import com.azure.resourcemanager.synapse.implementation.PrivateLinkResourcesOperationsImpl;
import com.azure.resourcemanager.synapse.implementation.RestorableDroppedSqlPoolsImpl;
import com.azure.resourcemanager.synapse.implementation.SparkConfigurationsImpl;
import com.azure.resourcemanager.synapse.implementation.SparkConfigurationsOperationsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolBlobAuditingPoliciesImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolColumnsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolConnectionPoliciesImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolDataWarehouseUserActivitiesImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolGeoBackupPoliciesImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolMaintenanceWindowOptionsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolMaintenanceWindowsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolMetadataSyncConfigsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolOperationResultsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolOperationsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolRecommendedSensitivityLabelsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolReplicationLinksImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolRestorePointsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolSchemasImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolSecurityAlertPoliciesImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolSensitivityLabelsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolTableColumnsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolTablesImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolTransparentDataEncryptionsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolUsagesImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolVulnerabilityAssessmentRuleBaselinesImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolVulnerabilityAssessmentScansImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolVulnerabilityAssessmentsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolWorkloadClassifiersImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolWorkloadGroupsImpl;
import com.azure.resourcemanager.synapse.implementation.SqlPoolsImpl;
import com.azure.resourcemanager.synapse.implementation.SynapseManagementClientBuilder;
import com.azure.resourcemanager.synapse.implementation.WorkspaceAadAdminsImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspaceManagedIdentitySqlControlSettingsImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspaceManagedSqlServerBlobAuditingPoliciesImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspaceManagedSqlServerEncryptionProtectorsImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspaceManagedSqlServerRecoverableSqlPoolsImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspaceManagedSqlServerSecurityAlertPoliciesImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspaceManagedSqlServerUsagesImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspaceManagedSqlServerVulnerabilityAssessmentsImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspaceSqlAadAdminsImpl;
import com.azure.resourcemanager.synapse.implementation.WorkspacesImpl;
import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthentications;
import com.azure.resourcemanager.synapse.models.BigDataPools;
import com.azure.resourcemanager.synapse.models.DataMaskingPolicies;
import com.azure.resourcemanager.synapse.models.DataMaskingRules;
import com.azure.resourcemanager.synapse.models.ExtendedSqlPoolBlobAuditingPolicies;
import com.azure.resourcemanager.synapse.models.Gets;
import com.azure.resourcemanager.synapse.models.IntegrationRuntimeAuthKeysOperations;
import com.azure.resourcemanager.synapse.models.IntegrationRuntimeConnectionInfos;
import com.azure.resourcemanager.synapse.models.IntegrationRuntimeCredentials;
import com.azure.resourcemanager.synapse.models.IntegrationRuntimeMonitoringDatas;
import com.azure.resourcemanager.synapse.models.IntegrationRuntimeNodeIpAddressOperations;
import com.azure.resourcemanager.synapse.models.IntegrationRuntimeNodes;
import com.azure.resourcemanager.synapse.models.IntegrationRuntimeObjectMetadatas;
import com.azure.resourcemanager.synapse.models.IntegrationRuntimeStatusOperations;
import com.azure.resourcemanager.synapse.models.IntegrationRuntimes;
import com.azure.resourcemanager.synapse.models.IpFirewallRules;
import com.azure.resourcemanager.synapse.models.Keys;
import com.azure.resourcemanager.synapse.models.KustoOperations;
import com.azure.resourcemanager.synapse.models.KustoPoolAttachedDatabaseConfigurations;
import com.azure.resourcemanager.synapse.models.KustoPoolChildResources;
import com.azure.resourcemanager.synapse.models.KustoPoolDataConnections;
import com.azure.resourcemanager.synapse.models.KustoPoolDatabasePrincipalAssignments;
import com.azure.resourcemanager.synapse.models.KustoPoolDatabases;
import com.azure.resourcemanager.synapse.models.KustoPoolPrincipalAssignments;
import com.azure.resourcemanager.synapse.models.KustoPoolPrivateLinkResourcesOperations;
import com.azure.resourcemanager.synapse.models.KustoPools;
import com.azure.resourcemanager.synapse.models.Libraries;
import com.azure.resourcemanager.synapse.models.LibrariesOperations;
import com.azure.resourcemanager.synapse.models.Operations;
import com.azure.resourcemanager.synapse.models.PrivateEndpointConnections;
import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionsPrivateLinkHubs;
import com.azure.resourcemanager.synapse.models.PrivateLinkHubPrivateLinkResources;
import com.azure.resourcemanager.synapse.models.PrivateLinkHubs;
import com.azure.resourcemanager.synapse.models.PrivateLinkResourcesOperations;
import com.azure.resourcemanager.synapse.models.RestorableDroppedSqlPools;
import com.azure.resourcemanager.synapse.models.SparkConfigurations;
import com.azure.resourcemanager.synapse.models.SparkConfigurationsOperations;
import com.azure.resourcemanager.synapse.models.SqlPoolBlobAuditingPolicies;
import com.azure.resourcemanager.synapse.models.SqlPoolColumns;
import com.azure.resourcemanager.synapse.models.SqlPoolConnectionPolicies;
import com.azure.resourcemanager.synapse.models.SqlPoolDataWarehouseUserActivities;
import com.azure.resourcemanager.synapse.models.SqlPoolGeoBackupPolicies;
import com.azure.resourcemanager.synapse.models.SqlPoolMaintenanceWindowOptions;
import com.azure.resourcemanager.synapse.models.SqlPoolMaintenanceWindows;
import com.azure.resourcemanager.synapse.models.SqlPoolMetadataSyncConfigs;
import com.azure.resourcemanager.synapse.models.SqlPoolOperationResults;
import com.azure.resourcemanager.synapse.models.SqlPoolOperations;
import com.azure.resourcemanager.synapse.models.SqlPoolRecommendedSensitivityLabels;
import com.azure.resourcemanager.synapse.models.SqlPoolReplicationLinks;
import com.azure.resourcemanager.synapse.models.SqlPoolRestorePoints;
import com.azure.resourcemanager.synapse.models.SqlPoolSchemas;
import com.azure.resourcemanager.synapse.models.SqlPoolSecurityAlertPolicies;
import com.azure.resourcemanager.synapse.models.SqlPoolSensitivityLabels;
import com.azure.resourcemanager.synapse.models.SqlPoolTableColumns;
import com.azure.resourcemanager.synapse.models.SqlPoolTables;
import com.azure.resourcemanager.synapse.models.SqlPoolTransparentDataEncryptions;
import com.azure.resourcemanager.synapse.models.SqlPoolUsages;
import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaselines;
import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentScans;
import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessments;
import com.azure.resourcemanager.synapse.models.SqlPoolWorkloadClassifiers;
import com.azure.resourcemanager.synapse.models.SqlPoolWorkloadGroups;
import com.azure.resourcemanager.synapse.models.SqlPools;
import com.azure.resourcemanager.synapse.models.WorkspaceAadAdmins;
import com.azure.resourcemanager.synapse.models.WorkspaceManagedIdentitySqlControlSettings;
import com.azure.resourcemanager.synapse.models.WorkspaceManagedSqlServerBlobAuditingPolicies;
import com.azure.resourcemanager.synapse.models.WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettings;
import com.azure.resourcemanager.synapse.models.WorkspaceManagedSqlServerEncryptionProtectors;
import com.azure.resourcemanager.synapse.models.WorkspaceManagedSqlServerExtendedBlobAuditingPolicies;
import com.azure.resourcemanager.synapse.models.WorkspaceManagedSqlServerRecoverableSqlPools;
import com.azure.resourcemanager.synapse.models.WorkspaceManagedSqlServerSecurityAlertPolicies;
import com.azure.resourcemanager.synapse.models.WorkspaceManagedSqlServerUsages;
import com.azure.resourcemanager.synapse.models.WorkspaceManagedSqlServerVulnerabilityAssessments;
import com.azure.resourcemanager.synapse.models.WorkspaceSqlAadAdmins;
import com.azure.resourcemanager.synapse.models.Workspaces;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/** Entry point to SynapseManager. Azure Synapse Analytics Management Client. */
public final class SynapseManager {
    private AzureADOnlyAuthentications azureADOnlyAuthentications;

    private Operations operations;

    private IpFirewallRules ipFirewallRules;

    private Keys keys;

    private PrivateEndpointConnections privateEndpointConnections;

    private PrivateLinkResourcesOperations privateLinkResourcesOperations;

    private PrivateLinkHubPrivateLinkResources privateLinkHubPrivateLinkResources;

    private PrivateLinkHubs privateLinkHubs;

    private PrivateEndpointConnectionsPrivateLinkHubs privateEndpointConnectionsPrivateLinkHubs;

    private SqlPools sqlPools;

    private SqlPoolMetadataSyncConfigs sqlPoolMetadataSyncConfigs;

    private SqlPoolOperationResults sqlPoolOperationResults;

    private SqlPoolGeoBackupPolicies sqlPoolGeoBackupPolicies;

    private SqlPoolDataWarehouseUserActivities sqlPoolDataWarehouseUserActivities;

    private SqlPoolRestorePoints sqlPoolRestorePoints;

    private SqlPoolReplicationLinks sqlPoolReplicationLinks;

    private SqlPoolMaintenanceWindows sqlPoolMaintenanceWindows;

    private SqlPoolMaintenanceWindowOptions sqlPoolMaintenanceWindowOptions;

    private SqlPoolTransparentDataEncryptions sqlPoolTransparentDataEncryptions;

    private SqlPoolBlobAuditingPolicies sqlPoolBlobAuditingPolicies;

    private SqlPoolOperations sqlPoolOperations;

    private SqlPoolUsages sqlPoolUsages;

    private SqlPoolSensitivityLabels sqlPoolSensitivityLabels;

    private SqlPoolRecommendedSensitivityLabels sqlPoolRecommendedSensitivityLabels;

    private SqlPoolSchemas sqlPoolSchemas;

    private SqlPoolTables sqlPoolTables;

    private SqlPoolTableColumns sqlPoolTableColumns;

    private SqlPoolConnectionPolicies sqlPoolConnectionPolicies;

    private SqlPoolVulnerabilityAssessments sqlPoolVulnerabilityAssessments;

    private SqlPoolVulnerabilityAssessmentScans sqlPoolVulnerabilityAssessmentScans;

    private SqlPoolSecurityAlertPolicies sqlPoolSecurityAlertPolicies;

    private SqlPoolVulnerabilityAssessmentRuleBaselines sqlPoolVulnerabilityAssessmentRuleBaselines;

    private ExtendedSqlPoolBlobAuditingPolicies extendedSqlPoolBlobAuditingPolicies;

    private DataMaskingPolicies dataMaskingPolicies;

    private DataMaskingRules dataMaskingRules;

    private SqlPoolColumns sqlPoolColumns;

    private SqlPoolWorkloadGroups sqlPoolWorkloadGroups;

    private SqlPoolWorkloadClassifiers sqlPoolWorkloadClassifiers;

    private WorkspaceManagedSqlServerBlobAuditingPolicies workspaceManagedSqlServerBlobAuditingPolicies;

    private WorkspaceManagedSqlServerExtendedBlobAuditingPolicies workspaceManagedSqlServerExtendedBlobAuditingPolicies;

    private WorkspaceManagedSqlServerSecurityAlertPolicies workspaceManagedSqlServerSecurityAlertPolicies;

    private WorkspaceManagedSqlServerVulnerabilityAssessments workspaceManagedSqlServerVulnerabilityAssessments;

    private WorkspaceManagedSqlServerEncryptionProtectors workspaceManagedSqlServerEncryptionProtectors;

    private WorkspaceManagedSqlServerUsages workspaceManagedSqlServerUsages;

    private WorkspaceManagedSqlServerRecoverableSqlPools workspaceManagedSqlServerRecoverableSqlPools;

    private WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettings
        workspaceManagedSqlServerDedicatedSqlMinimalTlsSettings;

    private Workspaces workspaces;

    private WorkspaceAadAdmins workspaceAadAdmins;

    private WorkspaceSqlAadAdmins workspaceSqlAadAdmins;

    private WorkspaceManagedIdentitySqlControlSettings workspaceManagedIdentitySqlControlSettings;

    private RestorableDroppedSqlPools restorableDroppedSqlPools;

    private BigDataPools bigDataPools;

    private Libraries libraries;

    private LibrariesOperations librariesOperations;

    private IntegrationRuntimes integrationRuntimes;

    private IntegrationRuntimeNodeIpAddressOperations integrationRuntimeNodeIpAddressOperations;

    private IntegrationRuntimeObjectMetadatas integrationRuntimeObjectMetadatas;

    private IntegrationRuntimeNodes integrationRuntimeNodes;

    private IntegrationRuntimeCredentials integrationRuntimeCredentials;

    private IntegrationRuntimeConnectionInfos integrationRuntimeConnectionInfos;

    private IntegrationRuntimeAuthKeysOperations integrationRuntimeAuthKeysOperations;

    private IntegrationRuntimeMonitoringDatas integrationRuntimeMonitoringDatas;

    private IntegrationRuntimeStatusOperations integrationRuntimeStatusOperations;

    private Gets gets;

    private SparkConfigurations sparkConfigurations;

    private SparkConfigurationsOperations sparkConfigurationsOperations;

    private KustoOperations kustoOperations;

    private KustoPools kustoPools;

    private KustoPoolChildResources kustoPoolChildResources;

    private KustoPoolAttachedDatabaseConfigurations kustoPoolAttachedDatabaseConfigurations;

    private KustoPoolDatabases kustoPoolDatabases;

    private KustoPoolDataConnections kustoPoolDataConnections;

    private KustoPoolPrincipalAssignments kustoPoolPrincipalAssignments;

    private KustoPoolDatabasePrincipalAssignments kustoPoolDatabasePrincipalAssignments;

    private KustoPoolPrivateLinkResourcesOperations kustoPoolPrivateLinkResourcesOperations;

    private final SynapseManagementClient clientObject;

    private SynapseManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
        Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
        Objects.requireNonNull(profile, "'profile' cannot be null.");
        this.clientObject =
            new SynapseManagementClientBuilder()
                .pipeline(httpPipeline)
                .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
                .subscriptionId(profile.getSubscriptionId())
                .defaultPollInterval(defaultPollInterval)
                .buildClient();
    }

    /**
     * Creates an instance of Synapse service API entry point.
     *
     * @param credential the credential to use.
     * @param profile the Azure profile for client.
     * @return the Synapse service API instance.
     */
    public static SynapseManager authenticate(TokenCredential credential, AzureProfile profile) {
        Objects.requireNonNull(credential, "'credential' cannot be null.");
        Objects.requireNonNull(profile, "'profile' cannot be null.");
        return configure().authenticate(credential, profile);
    }

    /**
     * Creates an instance of Synapse service API entry point.
     *
     * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
     * @param profile the Azure profile for client.
     * @return the Synapse service API instance.
     */
    public static SynapseManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
        Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
        Objects.requireNonNull(profile, "'profile' cannot be null.");
        return new SynapseManager(httpPipeline, profile, null);
    }

    /**
     * Gets a Configurable instance that can be used to create SynapseManager with optional configuration.
     *
     * @return the Configurable instance allowing configurations.
     */
    public static Configurable configure() {
        return new SynapseManager.Configurable();
    }

    /** The Configurable allowing configurations to be set. */
    public static final class Configurable {
        private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);

        private HttpClient httpClient;
        private HttpLogOptions httpLogOptions;
        private final List<HttpPipelinePolicy> policies = new ArrayList<>();
        private final List<String> scopes = new ArrayList<>();
        private RetryPolicy retryPolicy;
        private RetryOptions retryOptions;
        private Duration defaultPollInterval;

        private Configurable() {
        }

        /**
         * Sets the http client.
         *
         * @param httpClient the HTTP client.
         * @return the configurable object itself.
         */
        public Configurable withHttpClient(HttpClient httpClient) {
            this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
            return this;
        }

        /**
         * Sets the logging options to the HTTP pipeline.
         *
         * @param httpLogOptions the HTTP log options.
         * @return the configurable object itself.
         */
        public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
            this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
            return this;
        }

        /**
         * Adds the pipeline policy to the HTTP pipeline.
         *
         * @param policy the HTTP pipeline policy.
         * @return the configurable object itself.
         */
        public Configurable withPolicy(HttpPipelinePolicy policy) {
            this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
            return this;
        }

        /**
         * Adds the scope to permission sets.
         *
         * @param scope the scope.
         * @return the configurable object itself.
         */
        public Configurable withScope(String scope) {
            this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
            return this;
        }

        /**
         * Sets the retry policy to the HTTP pipeline.
         *
         * @param retryPolicy the HTTP pipeline retry policy.
         * @return the configurable object itself.
         */
        public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
            this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
            return this;
        }

        /**
         * Sets the retry options for the HTTP pipeline retry policy.
         *
         * <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
         *
         * @param retryOptions the retry options for the HTTP pipeline retry policy.
         * @return the configurable object itself.
         */
        public Configurable withRetryOptions(RetryOptions retryOptions) {
            this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
            return this;
        }

        /**
         * Sets the default poll interval, used when service does not provide "Retry-After" header.
         *
         * @param defaultPollInterval the default poll interval.
         * @return the configurable object itself.
         */
        public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
            this.defaultPollInterval =
                Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
            if (this.defaultPollInterval.isNegative()) {
                throw LOGGER
                    .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
            }
            return this;
        }

        /**
         * Creates an instance of Synapse service API entry point.
         *
         * @param credential the credential to use.
         * @param profile the Azure profile for client.
         * @return the Synapse service API instance.
         */
        public SynapseManager authenticate(TokenCredential credential, AzureProfile profile) {
            Objects.requireNonNull(credential, "'credential' cannot be null.");
            Objects.requireNonNull(profile, "'profile' cannot be null.");

            StringBuilder userAgentBuilder = new StringBuilder();
            userAgentBuilder
                .append("azsdk-java")
                .append("-")
                .append("com.azure.resourcemanager.synapse")
                .append("/")
                .append("1.0.0-beta.7");
            if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
                userAgentBuilder
                    .append(" (")
                    .append(Configuration.getGlobalConfiguration().get("java.version"))
                    .append("; ")
                    .append(Configuration.getGlobalConfiguration().get("os.name"))
                    .append("; ")
                    .append(Configuration.getGlobalConfiguration().get("os.version"))
                    .append("; auto-generated)");
            } else {
                userAgentBuilder.append(" (auto-generated)");
            }

            if (scopes.isEmpty()) {
                scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
            }
            if (retryPolicy == null) {
                if (retryOptions != null) {
                    retryPolicy = new RetryPolicy(retryOptions);
                } else {
                    retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
                }
            }
            List<HttpPipelinePolicy> policies = new ArrayList<>();
            policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
            policies.add(new AddHeadersFromContextPolicy());
            policies.add(new RequestIdPolicy());
            policies
                .addAll(
                    this
                        .policies
                        .stream()
                        .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
                        .collect(Collectors.toList()));
            HttpPolicyProviders.addBeforeRetryPolicies(policies);
            policies.add(retryPolicy);
            policies.add(new AddDatePolicy());
            policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
            policies
                .addAll(
                    this
                        .policies
                        .stream()
                        .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
                        .collect(Collectors.toList()));
            HttpPolicyProviders.addAfterRetryPolicies(policies);
            policies.add(new HttpLoggingPolicy(httpLogOptions));
            HttpPipeline httpPipeline =
                new HttpPipelineBuilder()
                    .httpClient(httpClient)
                    .policies(policies.toArray(new HttpPipelinePolicy[0]))
                    .build();
            return new SynapseManager(httpPipeline, profile, defaultPollInterval);
        }
    }

    /**
     * Gets the resource collection API of AzureADOnlyAuthentications. It manages AzureADOnlyAuthentication.
     *
     * @return Resource collection API of AzureADOnlyAuthentications.
     */
    public AzureADOnlyAuthentications azureADOnlyAuthentications() {
        if (this.azureADOnlyAuthentications == null) {
            this.azureADOnlyAuthentications =
                new AzureADOnlyAuthenticationsImpl(clientObject.getAzureADOnlyAuthentications(), this);
        }
        return azureADOnlyAuthentications;
    }

    /**
     * Gets the resource collection API of Operations.
     *
     * @return Resource collection API of Operations.
     */
    public Operations operations() {
        if (this.operations == null) {
            this.operations = new OperationsImpl(clientObject.getOperations(), this);
        }
        return operations;
    }

    /**
     * Gets the resource collection API of IpFirewallRules. It manages IpFirewallRuleInfo.
     *
     * @return Resource collection API of IpFirewallRules.
     */
    public IpFirewallRules ipFirewallRules() {
        if (this.ipFirewallRules == null) {
            this.ipFirewallRules = new IpFirewallRulesImpl(clientObject.getIpFirewallRules(), this);
        }
        return ipFirewallRules;
    }

    /**
     * Gets the resource collection API of Keys. It manages Key.
     *
     * @return Resource collection API of Keys.
     */
    public Keys keys() {
        if (this.keys == null) {
            this.keys = new KeysImpl(clientObject.getKeys(), this);
        }
        return keys;
    }

    /**
     * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection.
     *
     * @return Resource collection API of PrivateEndpointConnections.
     */
    public PrivateEndpointConnections privateEndpointConnections() {
        if (this.privateEndpointConnections == null) {
            this.privateEndpointConnections =
                new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
        }
        return privateEndpointConnections;
    }

    /**
     * Gets the resource collection API of PrivateLinkResourcesOperations.
     *
     * @return Resource collection API of PrivateLinkResourcesOperations.
     */
    public PrivateLinkResourcesOperations privateLinkResourcesOperations() {
        if (this.privateLinkResourcesOperations == null) {
            this.privateLinkResourcesOperations =
                new PrivateLinkResourcesOperationsImpl(clientObject.getPrivateLinkResourcesOperations(), this);
        }
        return privateLinkResourcesOperations;
    }

    /**
     * Gets the resource collection API of PrivateLinkHubPrivateLinkResources.
     *
     * @return Resource collection API of PrivateLinkHubPrivateLinkResources.
     */
    public PrivateLinkHubPrivateLinkResources privateLinkHubPrivateLinkResources() {
        if (this.privateLinkHubPrivateLinkResources == null) {
            this.privateLinkHubPrivateLinkResources =
                new PrivateLinkHubPrivateLinkResourcesImpl(clientObject.getPrivateLinkHubPrivateLinkResources(), this);
        }
        return privateLinkHubPrivateLinkResources;
    }

    /**
     * Gets the resource collection API of PrivateLinkHubs. It manages PrivateLinkHub.
     *
     * @return Resource collection API of PrivateLinkHubs.
     */
    public PrivateLinkHubs privateLinkHubs() {
        if (this.privateLinkHubs == null) {
            this.privateLinkHubs = new PrivateLinkHubsImpl(clientObject.getPrivateLinkHubs(), this);
        }
        return privateLinkHubs;
    }

    /**
     * Gets the resource collection API of PrivateEndpointConnectionsPrivateLinkHubs.
     *
     * @return Resource collection API of PrivateEndpointConnectionsPrivateLinkHubs.
     */
    public PrivateEndpointConnectionsPrivateLinkHubs privateEndpointConnectionsPrivateLinkHubs() {
        if (this.privateEndpointConnectionsPrivateLinkHubs == null) {
            this.privateEndpointConnectionsPrivateLinkHubs =
                new PrivateEndpointConnectionsPrivateLinkHubsImpl(
                    clientObject.getPrivateEndpointConnectionsPrivateLinkHubs(), this);
        }
        return privateEndpointConnectionsPrivateLinkHubs;
    }

    /**
     * Gets the resource collection API of SqlPools. It manages SqlPool.
     *
     * @return Resource collection API of SqlPools.
     */
    public SqlPools sqlPools() {
        if (this.sqlPools == null) {
            this.sqlPools = new SqlPoolsImpl(clientObject.getSqlPools(), this);
        }
        return sqlPools;
    }

    /**
     * Gets the resource collection API of SqlPoolMetadataSyncConfigs.
     *
     * @return Resource collection API of SqlPoolMetadataSyncConfigs.
     */
    public SqlPoolMetadataSyncConfigs sqlPoolMetadataSyncConfigs() {
        if (this.sqlPoolMetadataSyncConfigs == null) {
            this.sqlPoolMetadataSyncConfigs =
                new SqlPoolMetadataSyncConfigsImpl(clientObject.getSqlPoolMetadataSyncConfigs(), this);
        }
        return sqlPoolMetadataSyncConfigs;
    }

    /**
     * Gets the resource collection API of SqlPoolOperationResults.
     *
     * @return Resource collection API of SqlPoolOperationResults.
     */
    public SqlPoolOperationResults sqlPoolOperationResults() {
        if (this.sqlPoolOperationResults == null) {
            this.sqlPoolOperationResults =
                new SqlPoolOperationResultsImpl(clientObject.getSqlPoolOperationResults(), this);
        }
        return sqlPoolOperationResults;
    }

    /**
     * Gets the resource collection API of SqlPoolGeoBackupPolicies. It manages GeoBackupPolicy.
     *
     * @return Resource collection API of SqlPoolGeoBackupPolicies.
     */
    public SqlPoolGeoBackupPolicies sqlPoolGeoBackupPolicies() {
        if (this.sqlPoolGeoBackupPolicies == null) {
            this.sqlPoolGeoBackupPolicies =
                new SqlPoolGeoBackupPoliciesImpl(clientObject.getSqlPoolGeoBackupPolicies(), this);
        }
        return sqlPoolGeoBackupPolicies;
    }

    /**
     * Gets the resource collection API of SqlPoolDataWarehouseUserActivities.
     *
     * @return Resource collection API of SqlPoolDataWarehouseUserActivities.
     */
    public SqlPoolDataWarehouseUserActivities sqlPoolDataWarehouseUserActivities() {
        if (this.sqlPoolDataWarehouseUserActivities == null) {
            this.sqlPoolDataWarehouseUserActivities =
                new SqlPoolDataWarehouseUserActivitiesImpl(clientObject.getSqlPoolDataWarehouseUserActivities(), this);
        }
        return sqlPoolDataWarehouseUserActivities;
    }

    /**
     * Gets the resource collection API of SqlPoolRestorePoints.
     *
     * @return Resource collection API of SqlPoolRestorePoints.
     */
    public SqlPoolRestorePoints sqlPoolRestorePoints() {
        if (this.sqlPoolRestorePoints == null) {
            this.sqlPoolRestorePoints = new SqlPoolRestorePointsImpl(clientObject.getSqlPoolRestorePoints(), this);
        }
        return sqlPoolRestorePoints;
    }

    /**
     * Gets the resource collection API of SqlPoolReplicationLinks.
     *
     * @return Resource collection API of SqlPoolReplicationLinks.
     */
    public SqlPoolReplicationLinks sqlPoolReplicationLinks() {
        if (this.sqlPoolReplicationLinks == null) {
            this.sqlPoolReplicationLinks =
                new SqlPoolReplicationLinksImpl(clientObject.getSqlPoolReplicationLinks(), this);
        }
        return sqlPoolReplicationLinks;
    }

    /**
     * Gets the resource collection API of SqlPoolMaintenanceWindows.
     *
     * @return Resource collection API of SqlPoolMaintenanceWindows.
     */
    public SqlPoolMaintenanceWindows sqlPoolMaintenanceWindows() {
        if (this.sqlPoolMaintenanceWindows == null) {
            this.sqlPoolMaintenanceWindows =
                new SqlPoolMaintenanceWindowsImpl(clientObject.getSqlPoolMaintenanceWindows(), this);
        }
        return sqlPoolMaintenanceWindows;
    }

    /**
     * Gets the resource collection API of SqlPoolMaintenanceWindowOptions.
     *
     * @return Resource collection API of SqlPoolMaintenanceWindowOptions.
     */
    public SqlPoolMaintenanceWindowOptions sqlPoolMaintenanceWindowOptions() {
        if (this.sqlPoolMaintenanceWindowOptions == null) {
            this.sqlPoolMaintenanceWindowOptions =
                new SqlPoolMaintenanceWindowOptionsImpl(clientObject.getSqlPoolMaintenanceWindowOptions(), this);
        }
        return sqlPoolMaintenanceWindowOptions;
    }

    /**
     * Gets the resource collection API of SqlPoolTransparentDataEncryptions. It manages TransparentDataEncryption.
     *
     * @return Resource collection API of SqlPoolTransparentDataEncryptions.
     */
    public SqlPoolTransparentDataEncryptions sqlPoolTransparentDataEncryptions() {
        if (this.sqlPoolTransparentDataEncryptions == null) {
            this.sqlPoolTransparentDataEncryptions =
                new SqlPoolTransparentDataEncryptionsImpl(clientObject.getSqlPoolTransparentDataEncryptions(), this);
        }
        return sqlPoolTransparentDataEncryptions;
    }

    /**
     * Gets the resource collection API of SqlPoolBlobAuditingPolicies. It manages SqlPoolBlobAuditingPolicy.
     *
     * @return Resource collection API of SqlPoolBlobAuditingPolicies.
     */
    public SqlPoolBlobAuditingPolicies sqlPoolBlobAuditingPolicies() {
        if (this.sqlPoolBlobAuditingPolicies == null) {
            this.sqlPoolBlobAuditingPolicies =
                new SqlPoolBlobAuditingPoliciesImpl(clientObject.getSqlPoolBlobAuditingPolicies(), this);
        }
        return sqlPoolBlobAuditingPolicies;
    }

    /**
     * Gets the resource collection API of SqlPoolOperations.
     *
     * @return Resource collection API of SqlPoolOperations.
     */
    public SqlPoolOperations sqlPoolOperations() {
        if (this.sqlPoolOperations == null) {
            this.sqlPoolOperations = new SqlPoolOperationsImpl(clientObject.getSqlPoolOperations(), this);
        }
        return sqlPoolOperations;
    }

    /**
     * Gets the resource collection API of SqlPoolUsages.
     *
     * @return Resource collection API of SqlPoolUsages.
     */
    public SqlPoolUsages sqlPoolUsages() {
        if (this.sqlPoolUsages == null) {
            this.sqlPoolUsages = new SqlPoolUsagesImpl(clientObject.getSqlPoolUsages(), this);
        }
        return sqlPoolUsages;
    }

    /**
     * Gets the resource collection API of SqlPoolSensitivityLabels. It manages SensitivityLabel.
     *
     * @return Resource collection API of SqlPoolSensitivityLabels.
     */
    public SqlPoolSensitivityLabels sqlPoolSensitivityLabels() {
        if (this.sqlPoolSensitivityLabels == null) {
            this.sqlPoolSensitivityLabels =
                new SqlPoolSensitivityLabelsImpl(clientObject.getSqlPoolSensitivityLabels(), this);
        }
        return sqlPoolSensitivityLabels;
    }

    /**
     * Gets the resource collection API of SqlPoolRecommendedSensitivityLabels.
     *
     * @return Resource collection API of SqlPoolRecommendedSensitivityLabels.
     */
    public SqlPoolRecommendedSensitivityLabels sqlPoolRecommendedSensitivityLabels() {
        if (this.sqlPoolRecommendedSensitivityLabels == null) {
            this.sqlPoolRecommendedSensitivityLabels =
                new SqlPoolRecommendedSensitivityLabelsImpl(
                    clientObject.getSqlPoolRecommendedSensitivityLabels(), this);
        }
        return sqlPoolRecommendedSensitivityLabels;
    }

    /**
     * Gets the resource collection API of SqlPoolSchemas.
     *
     * @return Resource collection API of SqlPoolSchemas.
     */
    public SqlPoolSchemas sqlPoolSchemas() {
        if (this.sqlPoolSchemas == null) {
            this.sqlPoolSchemas = new SqlPoolSchemasImpl(clientObject.getSqlPoolSchemas(), this);
        }
        return sqlPoolSchemas;
    }

    /**
     * Gets the resource collection API of SqlPoolTables.
     *
     * @return Resource collection API of SqlPoolTables.
     */
    public SqlPoolTables sqlPoolTables() {
        if (this.sqlPoolTables == null) {
            this.sqlPoolTables = new SqlPoolTablesImpl(clientObject.getSqlPoolTables(), this);
        }
        return sqlPoolTables;
    }

    /**
     * Gets the resource collection API of SqlPoolTableColumns.
     *
     * @return Resource collection API of SqlPoolTableColumns.
     */
    public SqlPoolTableColumns sqlPoolTableColumns() {
        if (this.sqlPoolTableColumns == null) {
            this.sqlPoolTableColumns = new SqlPoolTableColumnsImpl(clientObject.getSqlPoolTableColumns(), this);
        }
        return sqlPoolTableColumns;
    }

    /**
     * Gets the resource collection API of SqlPoolConnectionPolicies.
     *
     * @return Resource collection API of SqlPoolConnectionPolicies.
     */
    public SqlPoolConnectionPolicies sqlPoolConnectionPolicies() {
        if (this.sqlPoolConnectionPolicies == null) {
            this.sqlPoolConnectionPolicies =
                new SqlPoolConnectionPoliciesImpl(clientObject.getSqlPoolConnectionPolicies(), this);
        }
        return sqlPoolConnectionPolicies;
    }

    /**
     * Gets the resource collection API of SqlPoolVulnerabilityAssessments. It manages SqlPoolVulnerabilityAssessment.
     *
     * @return Resource collection API of SqlPoolVulnerabilityAssessments.
     */
    public SqlPoolVulnerabilityAssessments sqlPoolVulnerabilityAssessments() {
        if (this.sqlPoolVulnerabilityAssessments == null) {
            this.sqlPoolVulnerabilityAssessments =
                new SqlPoolVulnerabilityAssessmentsImpl(clientObject.getSqlPoolVulnerabilityAssessments(), this);
        }
        return sqlPoolVulnerabilityAssessments;
    }

    /**
     * Gets the resource collection API of SqlPoolVulnerabilityAssessmentScans.
     *
     * @return Resource collection API of SqlPoolVulnerabilityAssessmentScans.
     */
    public SqlPoolVulnerabilityAssessmentScans sqlPoolVulnerabilityAssessmentScans() {
        if (this.sqlPoolVulnerabilityAssessmentScans == null) {
            this.sqlPoolVulnerabilityAssessmentScans =
                new SqlPoolVulnerabilityAssessmentScansImpl(
                    clientObject.getSqlPoolVulnerabilityAssessmentScans(), this);
        }
        return sqlPoolVulnerabilityAssessmentScans;
    }

    /**
     * Gets the resource collection API of SqlPoolSecurityAlertPolicies. It manages SqlPoolSecurityAlertPolicy.
     *
     * @return Resource collection API of SqlPoolSecurityAlertPolicies.
     */
    public SqlPoolSecurityAlertPolicies sqlPoolSecurityAlertPolicies() {
        if (this.sqlPoolSecurityAlertPolicies == null) {
            this.sqlPoolSecurityAlertPolicies =
                new SqlPoolSecurityAlertPoliciesImpl(clientObject.getSqlPoolSecurityAlertPolicies(), this);
        }
        return sqlPoolSecurityAlertPolicies;
    }

    /**
     * Gets the resource collection API of SqlPoolVulnerabilityAssessmentRuleBaselines. It manages
     * SqlPoolVulnerabilityAssessmentRuleBaseline.
     *
     * @return Resource collection API of SqlPoolVulnerabilityAssessmentRuleBaselines.
     */
    public SqlPoolVulnerabilityAssessmentRuleBaselines sqlPoolVulnerabilityAssessmentRuleBaselines() {
        if (this.sqlPoolVulnerabilityAssessmentRuleBaselines == null) {
            this.sqlPoolVulnerabilityAssessmentRuleBaselines =
                new SqlPoolVulnerabilityAssessmentRuleBaselinesImpl(
                    clientObject.getSqlPoolVulnerabilityAssessmentRuleBaselines(), this);
        }
        return sqlPoolVulnerabilityAssessmentRuleBaselines;
    }

    /**
     * Gets the resource collection API of ExtendedSqlPoolBlobAuditingPolicies. It manages
     * ExtendedSqlPoolBlobAuditingPolicy.
     *
     * @return Resource collection API of ExtendedSqlPoolBlobAuditingPolicies.
     */
    public ExtendedSqlPoolBlobAuditingPolicies extendedSqlPoolBlobAuditingPolicies() {
        if (this.extendedSqlPoolBlobAuditingPolicies == null) {
            this.extendedSqlPoolBlobAuditingPolicies =
                new ExtendedSqlPoolBlobAuditingPoliciesImpl(
                    clientObject.getExtendedSqlPoolBlobAuditingPolicies(), this);
        }
        return extendedSqlPoolBlobAuditingPolicies;
    }

    /**
     * Gets the resource collection API of DataMaskingPolicies. It manages DataMaskingPolicy.
     *
     * @return Resource collection API of DataMaskingPolicies.
     */
    public DataMaskingPolicies dataMaskingPolicies() {
        if (this.dataMaskingPolicies == null) {
            this.dataMaskingPolicies = new DataMaskingPoliciesImpl(clientObject.getDataMaskingPolicies(), this);
        }
        return dataMaskingPolicies;
    }

    /**
     * Gets the resource collection API of DataMaskingRules. It manages DataMaskingRule.
     *
     * @return Resource collection API of DataMaskingRules.
     */
    public DataMaskingRules dataMaskingRules() {
        if (this.dataMaskingRules == null) {
            this.dataMaskingRules = new DataMaskingRulesImpl(clientObject.getDataMaskingRules(), this);
        }
        return dataMaskingRules;
    }

    /**
     * Gets the resource collection API of SqlPoolColumns.
     *
     * @return Resource collection API of SqlPoolColumns.
     */
    public SqlPoolColumns sqlPoolColumns() {
        if (this.sqlPoolColumns == null) {
            this.sqlPoolColumns = new SqlPoolColumnsImpl(clientObject.getSqlPoolColumns(), this);
        }
        return sqlPoolColumns;
    }

    /**
     * Gets the resource collection API of SqlPoolWorkloadGroups. It manages WorkloadGroup.
     *
     * @return Resource collection API of SqlPoolWorkloadGroups.
     */
    public SqlPoolWorkloadGroups sqlPoolWorkloadGroups() {
        if (this.sqlPoolWorkloadGroups == null) {
            this.sqlPoolWorkloadGroups = new SqlPoolWorkloadGroupsImpl(clientObject.getSqlPoolWorkloadGroups(), this);
        }
        return sqlPoolWorkloadGroups;
    }

    /**
     * Gets the resource collection API of SqlPoolWorkloadClassifiers. It manages WorkloadClassifier.
     *
     * @return Resource collection API of SqlPoolWorkloadClassifiers.
     */
    public SqlPoolWorkloadClassifiers sqlPoolWorkloadClassifiers() {
        if (this.sqlPoolWorkloadClassifiers == null) {
            this.sqlPoolWorkloadClassifiers =
                new SqlPoolWorkloadClassifiersImpl(clientObject.getSqlPoolWorkloadClassifiers(), this);
        }
        return sqlPoolWorkloadClassifiers;
    }

    /**
     * Gets the resource collection API of WorkspaceManagedSqlServerBlobAuditingPolicies. It manages
     * ServerBlobAuditingPolicy.
     *
     * @return Resource collection API of WorkspaceManagedSqlServerBlobAuditingPolicies.
     */
    public WorkspaceManagedSqlServerBlobAuditingPolicies workspaceManagedSqlServerBlobAuditingPolicies() {
        if (this.workspaceManagedSqlServerBlobAuditingPolicies == null) {
            this.workspaceManagedSqlServerBlobAuditingPolicies =
                new WorkspaceManagedSqlServerBlobAuditingPoliciesImpl(
                    clientObject.getWorkspaceManagedSqlServerBlobAuditingPolicies(), this);
        }
        return workspaceManagedSqlServerBlobAuditingPolicies;
    }

    /**
     * Gets the resource collection API of WorkspaceManagedSqlServerExtendedBlobAuditingPolicies. It manages
     * ExtendedServerBlobAuditingPolicy.
     *
     * @return Resource collection API of WorkspaceManagedSqlServerExtendedBlobAuditingPolicies.
     */
    public WorkspaceManagedSqlServerExtendedBlobAuditingPolicies
        workspaceManagedSqlServerExtendedBlobAuditingPolicies() {
        if (this.workspaceManagedSqlServerExtendedBlobAuditingPolicies == null) {
            this.workspaceManagedSqlServerExtendedBlobAuditingPolicies =
                new WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesImpl(
                    clientObject.getWorkspaceManagedSqlServerExtendedBlobAuditingPolicies(), this);
        }
        return workspaceManagedSqlServerExtendedBlobAuditingPolicies;
    }

    /**
     * Gets the resource collection API of WorkspaceManagedSqlServerSecurityAlertPolicies. It manages
     * ServerSecurityAlertPolicy.
     *
     * @return Resource collection API of WorkspaceManagedSqlServerSecurityAlertPolicies.
     */
    public WorkspaceManagedSqlServerSecurityAlertPolicies workspaceManagedSqlServerSecurityAlertPolicies() {
        if (this.workspaceManagedSqlServerSecurityAlertPolicies == null) {
            this.workspaceManagedSqlServerSecurityAlertPolicies =
                new WorkspaceManagedSqlServerSecurityAlertPoliciesImpl(
                    clientObject.getWorkspaceManagedSqlServerSecurityAlertPolicies(), this);
        }
        return workspaceManagedSqlServerSecurityAlertPolicies;
    }

    /**
     * Gets the resource collection API of WorkspaceManagedSqlServerVulnerabilityAssessments. It manages
     * ServerVulnerabilityAssessment.
     *
     * @return Resource collection API of WorkspaceManagedSqlServerVulnerabilityAssessments.
     */
    public WorkspaceManagedSqlServerVulnerabilityAssessments workspaceManagedSqlServerVulnerabilityAssessments() {
        if (this.workspaceManagedSqlServerVulnerabilityAssessments == null) {
            this.workspaceManagedSqlServerVulnerabilityAssessments =
                new WorkspaceManagedSqlServerVulnerabilityAssessmentsImpl(
                    clientObject.getWorkspaceManagedSqlServerVulnerabilityAssessments(), this);
        }
        return workspaceManagedSqlServerVulnerabilityAssessments;
    }

    /**
     * Gets the resource collection API of WorkspaceManagedSqlServerEncryptionProtectors. It manages
     * EncryptionProtector.
     *
     * @return Resource collection API of WorkspaceManagedSqlServerEncryptionProtectors.
     */
    public WorkspaceManagedSqlServerEncryptionProtectors workspaceManagedSqlServerEncryptionProtectors() {
        if (this.workspaceManagedSqlServerEncryptionProtectors == null) {
            this.workspaceManagedSqlServerEncryptionProtectors =
                new WorkspaceManagedSqlServerEncryptionProtectorsImpl(
                    clientObject.getWorkspaceManagedSqlServerEncryptionProtectors(), this);
        }
        return workspaceManagedSqlServerEncryptionProtectors;
    }

    /**
     * Gets the resource collection API of WorkspaceManagedSqlServerUsages.
     *
     * @return Resource collection API of WorkspaceManagedSqlServerUsages.
     */
    public WorkspaceManagedSqlServerUsages workspaceManagedSqlServerUsages() {
        if (this.workspaceManagedSqlServerUsages == null) {
            this.workspaceManagedSqlServerUsages =
                new WorkspaceManagedSqlServerUsagesImpl(clientObject.getWorkspaceManagedSqlServerUsages(), this);
        }
        return workspaceManagedSqlServerUsages;
    }

    /**
     * Gets the resource collection API of WorkspaceManagedSqlServerRecoverableSqlPools.
     *
     * @return Resource collection API of WorkspaceManagedSqlServerRecoverableSqlPools.
     */
    public WorkspaceManagedSqlServerRecoverableSqlPools workspaceManagedSqlServerRecoverableSqlPools() {
        if (this.workspaceManagedSqlServerRecoverableSqlPools == null) {
            this.workspaceManagedSqlServerRecoverableSqlPools =
                new WorkspaceManagedSqlServerRecoverableSqlPoolsImpl(
                    clientObject.getWorkspaceManagedSqlServerRecoverableSqlPools(), this);
        }
        return workspaceManagedSqlServerRecoverableSqlPools;
    }

    /**
     * Gets the resource collection API of WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettings.
     *
     * @return Resource collection API of WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettings.
     */
    public WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettings
        workspaceManagedSqlServerDedicatedSqlMinimalTlsSettings() {
        if (this.workspaceManagedSqlServerDedicatedSqlMinimalTlsSettings == null) {
            this.workspaceManagedSqlServerDedicatedSqlMinimalTlsSettings =
                new WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsImpl(
                    clientObject.getWorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettings(), this);
        }
        return workspaceManagedSqlServerDedicatedSqlMinimalTlsSettings;
    }

    /**
     * Gets the resource collection API of Workspaces. It manages Workspace.
     *
     * @return Resource collection API of Workspaces.
     */
    public Workspaces workspaces() {
        if (this.workspaces == null) {
            this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this);
        }
        return workspaces;
    }

    /**
     * Gets the resource collection API of WorkspaceAadAdmins.
     *
     * @return Resource collection API of WorkspaceAadAdmins.
     */
    public WorkspaceAadAdmins workspaceAadAdmins() {
        if (this.workspaceAadAdmins == null) {
            this.workspaceAadAdmins = new WorkspaceAadAdminsImpl(clientObject.getWorkspaceAadAdmins(), this);
        }
        return workspaceAadAdmins;
    }

    /**
     * Gets the resource collection API of WorkspaceSqlAadAdmins.
     *
     * @return Resource collection API of WorkspaceSqlAadAdmins.
     */
    public WorkspaceSqlAadAdmins workspaceSqlAadAdmins() {
        if (this.workspaceSqlAadAdmins == null) {
            this.workspaceSqlAadAdmins = new WorkspaceSqlAadAdminsImpl(clientObject.getWorkspaceSqlAadAdmins(), this);
        }
        return workspaceSqlAadAdmins;
    }

    /**
     * Gets the resource collection API of WorkspaceManagedIdentitySqlControlSettings.
     *
     * @return Resource collection API of WorkspaceManagedIdentitySqlControlSettings.
     */
    public WorkspaceManagedIdentitySqlControlSettings workspaceManagedIdentitySqlControlSettings() {
        if (this.workspaceManagedIdentitySqlControlSettings == null) {
            this.workspaceManagedIdentitySqlControlSettings =
                new WorkspaceManagedIdentitySqlControlSettingsImpl(
                    clientObject.getWorkspaceManagedIdentitySqlControlSettings(), this);
        }
        return workspaceManagedIdentitySqlControlSettings;
    }

    /**
     * Gets the resource collection API of RestorableDroppedSqlPools.
     *
     * @return Resource collection API of RestorableDroppedSqlPools.
     */
    public RestorableDroppedSqlPools restorableDroppedSqlPools() {
        if (this.restorableDroppedSqlPools == null) {
            this.restorableDroppedSqlPools =
                new RestorableDroppedSqlPoolsImpl(clientObject.getRestorableDroppedSqlPools(), this);
        }
        return restorableDroppedSqlPools;
    }

    /**
     * Gets the resource collection API of BigDataPools. It manages BigDataPoolResourceInfo.
     *
     * @return Resource collection API of BigDataPools.
     */
    public BigDataPools bigDataPools() {
        if (this.bigDataPools == null) {
            this.bigDataPools = new BigDataPoolsImpl(clientObject.getBigDataPools(), this);
        }
        return bigDataPools;
    }

    /**
     * Gets the resource collection API of Libraries.
     *
     * @return Resource collection API of Libraries.
     */
    public Libraries libraries() {
        if (this.libraries == null) {
            this.libraries = new LibrariesImpl(clientObject.getLibraries(), this);
        }
        return libraries;
    }

    /**
     * Gets the resource collection API of LibrariesOperations.
     *
     * @return Resource collection API of LibrariesOperations.
     */
    public LibrariesOperations librariesOperations() {
        if (this.librariesOperations == null) {
            this.librariesOperations = new LibrariesOperationsImpl(clientObject.getLibrariesOperations(), this);
        }
        return librariesOperations;
    }

    /**
     * Gets the resource collection API of IntegrationRuntimes. It manages IntegrationRuntimeResource.
     *
     * @return Resource collection API of IntegrationRuntimes.
     */
    public IntegrationRuntimes integrationRuntimes() {
        if (this.integrationRuntimes == null) {
            this.integrationRuntimes = new IntegrationRuntimesImpl(clientObject.getIntegrationRuntimes(), this);
        }
        return integrationRuntimes;
    }

    /**
     * Gets the resource collection API of IntegrationRuntimeNodeIpAddressOperations.
     *
     * @return Resource collection API of IntegrationRuntimeNodeIpAddressOperations.
     */
    public IntegrationRuntimeNodeIpAddressOperations integrationRuntimeNodeIpAddressOperations() {
        if (this.integrationRuntimeNodeIpAddressOperations == null) {
            this.integrationRuntimeNodeIpAddressOperations =
                new IntegrationRuntimeNodeIpAddressOperationsImpl(
                    clientObject.getIntegrationRuntimeNodeIpAddressOperations(), this);
        }
        return integrationRuntimeNodeIpAddressOperations;
    }

    /**
     * Gets the resource collection API of IntegrationRuntimeObjectMetadatas.
     *
     * @return Resource collection API of IntegrationRuntimeObjectMetadatas.
     */
    public IntegrationRuntimeObjectMetadatas integrationRuntimeObjectMetadatas() {
        if (this.integrationRuntimeObjectMetadatas == null) {
            this.integrationRuntimeObjectMetadatas =
                new IntegrationRuntimeObjectMetadatasImpl(clientObject.getIntegrationRuntimeObjectMetadatas(), this);
        }
        return integrationRuntimeObjectMetadatas;
    }

    /**
     * Gets the resource collection API of IntegrationRuntimeNodes.
     *
     * @return Resource collection API of IntegrationRuntimeNodes.
     */
    public IntegrationRuntimeNodes integrationRuntimeNodes() {
        if (this.integrationRuntimeNodes == null) {
            this.integrationRuntimeNodes =
                new IntegrationRuntimeNodesImpl(clientObject.getIntegrationRuntimeNodes(), this);
        }
        return integrationRuntimeNodes;
    }

    /**
     * Gets the resource collection API of IntegrationRuntimeCredentials.
     *
     * @return Resource collection API of IntegrationRuntimeCredentials.
     */
    public IntegrationRuntimeCredentials integrationRuntimeCredentials() {
        if (this.integrationRuntimeCredentials == null) {
            this.integrationRuntimeCredentials =
                new IntegrationRuntimeCredentialsImpl(clientObject.getIntegrationRuntimeCredentials(), this);
        }
        return integrationRuntimeCredentials;
    }

    /**
     * Gets the resource collection API of IntegrationRuntimeConnectionInfos.
     *
     * @return Resource collection API of IntegrationRuntimeConnectionInfos.
     */
    public IntegrationRuntimeConnectionInfos integrationRuntimeConnectionInfos() {
        if (this.integrationRuntimeConnectionInfos == null) {
            this.integrationRuntimeConnectionInfos =
                new IntegrationRuntimeConnectionInfosImpl(clientObject.getIntegrationRuntimeConnectionInfos(), this);
        }
        return integrationRuntimeConnectionInfos;
    }

    /**
     * Gets the resource collection API of IntegrationRuntimeAuthKeysOperations.
     *
     * @return Resource collection API of IntegrationRuntimeAuthKeysOperations.
     */
    public IntegrationRuntimeAuthKeysOperations integrationRuntimeAuthKeysOperations() {
        if (this.integrationRuntimeAuthKeysOperations == null) {
            this.integrationRuntimeAuthKeysOperations =
                new IntegrationRuntimeAuthKeysOperationsImpl(
                    clientObject.getIntegrationRuntimeAuthKeysOperations(), this);
        }
        return integrationRuntimeAuthKeysOperations;
    }

    /**
     * Gets the resource collection API of IntegrationRuntimeMonitoringDatas.
     *
     * @return Resource collection API of IntegrationRuntimeMonitoringDatas.
     */
    public IntegrationRuntimeMonitoringDatas integrationRuntimeMonitoringDatas() {
        if (this.integrationRuntimeMonitoringDatas == null) {
            this.integrationRuntimeMonitoringDatas =
                new IntegrationRuntimeMonitoringDatasImpl(clientObject.getIntegrationRuntimeMonitoringDatas(), this);
        }
        return integrationRuntimeMonitoringDatas;
    }

    /**
     * Gets the resource collection API of IntegrationRuntimeStatusOperations.
     *
     * @return Resource collection API of IntegrationRuntimeStatusOperations.
     */
    public IntegrationRuntimeStatusOperations integrationRuntimeStatusOperations() {
        if (this.integrationRuntimeStatusOperations == null) {
            this.integrationRuntimeStatusOperations =
                new IntegrationRuntimeStatusOperationsImpl(clientObject.getIntegrationRuntimeStatusOperations(), this);
        }
        return integrationRuntimeStatusOperations;
    }

    /**
     * Gets the resource collection API of Gets.
     *
     * @return Resource collection API of Gets.
     */
    public Gets gets() {
        if (this.gets == null) {
            this.gets = new GetsImpl(clientObject.getGets(), this);
        }
        return gets;
    }

    /**
     * Gets the resource collection API of SparkConfigurations.
     *
     * @return Resource collection API of SparkConfigurations.
     */
    public SparkConfigurations sparkConfigurations() {
        if (this.sparkConfigurations == null) {
            this.sparkConfigurations = new SparkConfigurationsImpl(clientObject.getSparkConfigurations(), this);
        }
        return sparkConfigurations;
    }

    /**
     * Gets the resource collection API of SparkConfigurationsOperations.
     *
     * @return Resource collection API of SparkConfigurationsOperations.
     */
    public SparkConfigurationsOperations sparkConfigurationsOperations() {
        if (this.sparkConfigurationsOperations == null) {
            this.sparkConfigurationsOperations =
                new SparkConfigurationsOperationsImpl(clientObject.getSparkConfigurationsOperations(), this);
        }
        return sparkConfigurationsOperations;
    }

    /**
     * Gets the resource collection API of KustoOperations.
     *
     * @return Resource collection API of KustoOperations.
     */
    public KustoOperations kustoOperations() {
        if (this.kustoOperations == null) {
            this.kustoOperations = new KustoOperationsImpl(clientObject.getKustoOperations(), this);
        }
        return kustoOperations;
    }

    /**
     * Gets the resource collection API of KustoPools. It manages KustoPool.
     *
     * @return Resource collection API of KustoPools.
     */
    public KustoPools kustoPools() {
        if (this.kustoPools == null) {
            this.kustoPools = new KustoPoolsImpl(clientObject.getKustoPools(), this);
        }
        return kustoPools;
    }

    /**
     * Gets the resource collection API of KustoPoolChildResources.
     *
     * @return Resource collection API of KustoPoolChildResources.
     */
    public KustoPoolChildResources kustoPoolChildResources() {
        if (this.kustoPoolChildResources == null) {
            this.kustoPoolChildResources =
                new KustoPoolChildResourcesImpl(clientObject.getKustoPoolChildResources(), this);
        }
        return kustoPoolChildResources;
    }

    /**
     * Gets the resource collection API of KustoPoolAttachedDatabaseConfigurations. It manages
     * AttachedDatabaseConfiguration.
     *
     * @return Resource collection API of KustoPoolAttachedDatabaseConfigurations.
     */
    public KustoPoolAttachedDatabaseConfigurations kustoPoolAttachedDatabaseConfigurations() {
        if (this.kustoPoolAttachedDatabaseConfigurations == null) {
            this.kustoPoolAttachedDatabaseConfigurations =
                new KustoPoolAttachedDatabaseConfigurationsImpl(
                    clientObject.getKustoPoolAttachedDatabaseConfigurations(), this);
        }
        return kustoPoolAttachedDatabaseConfigurations;
    }

    /**
     * Gets the resource collection API of KustoPoolDatabases.
     *
     * @return Resource collection API of KustoPoolDatabases.
     */
    public KustoPoolDatabases kustoPoolDatabases() {
        if (this.kustoPoolDatabases == null) {
            this.kustoPoolDatabases = new KustoPoolDatabasesImpl(clientObject.getKustoPoolDatabases(), this);
        }
        return kustoPoolDatabases;
    }

    /**
     * Gets the resource collection API of KustoPoolDataConnections.
     *
     * @return Resource collection API of KustoPoolDataConnections.
     */
    public KustoPoolDataConnections kustoPoolDataConnections() {
        if (this.kustoPoolDataConnections == null) {
            this.kustoPoolDataConnections =
                new KustoPoolDataConnectionsImpl(clientObject.getKustoPoolDataConnections(), this);
        }
        return kustoPoolDataConnections;
    }

    /**
     * Gets the resource collection API of KustoPoolPrincipalAssignments. It manages ClusterPrincipalAssignment.
     *
     * @return Resource collection API of KustoPoolPrincipalAssignments.
     */
    public KustoPoolPrincipalAssignments kustoPoolPrincipalAssignments() {
        if (this.kustoPoolPrincipalAssignments == null) {
            this.kustoPoolPrincipalAssignments =
                new KustoPoolPrincipalAssignmentsImpl(clientObject.getKustoPoolPrincipalAssignments(), this);
        }
        return kustoPoolPrincipalAssignments;
    }

    /**
     * Gets the resource collection API of KustoPoolDatabasePrincipalAssignments. It manages
     * DatabasePrincipalAssignment.
     *
     * @return Resource collection API of KustoPoolDatabasePrincipalAssignments.
     */
    public KustoPoolDatabasePrincipalAssignments kustoPoolDatabasePrincipalAssignments() {
        if (this.kustoPoolDatabasePrincipalAssignments == null) {
            this.kustoPoolDatabasePrincipalAssignments =
                new KustoPoolDatabasePrincipalAssignmentsImpl(
                    clientObject.getKustoPoolDatabasePrincipalAssignments(), this);
        }
        return kustoPoolDatabasePrincipalAssignments;
    }

    /**
     * Gets the resource collection API of KustoPoolPrivateLinkResourcesOperations.
     *
     * @return Resource collection API of KustoPoolPrivateLinkResourcesOperations.
     */
    public KustoPoolPrivateLinkResourcesOperations kustoPoolPrivateLinkResourcesOperations() {
        if (this.kustoPoolPrivateLinkResourcesOperations == null) {
            this.kustoPoolPrivateLinkResourcesOperations =
                new KustoPoolPrivateLinkResourcesOperationsImpl(
                    clientObject.getKustoPoolPrivateLinkResourcesOperations(), this);
        }
        return kustoPoolPrivateLinkResourcesOperations;
    }

    /**
     * @return Wrapped service client SynapseManagementClient providing direct access to the underlying auto-generated
     *     API implementation, based on Azure REST API.
     */
    public SynapseManagementClient serviceClient() {
        return this.clientObject;
    }
}
