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

package com.azure.resourcemanager.sqlvirtualmachine.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Set the connectivity, storage and workload settings. */
@Fluent
public final class ServerConfigurationsManagementSettings {
    /*
     * SQL connectivity type settings.
     */
    @JsonProperty(value = "sqlConnectivityUpdateSettings")
    private SqlConnectivityUpdateSettings sqlConnectivityUpdateSettings;

    /*
     * SQL workload type settings.
     */
    @JsonProperty(value = "sqlWorkloadTypeUpdateSettings")
    private SqlWorkloadTypeUpdateSettings sqlWorkloadTypeUpdateSettings;

    /*
     * SQL storage update settings.
     */
    @JsonProperty(value = "sqlStorageUpdateSettings")
    private SqlStorageUpdateSettings sqlStorageUpdateSettings;

    /*
     * Additional SQL feature settings.
     */
    @JsonProperty(value = "additionalFeaturesServerConfigurations")
    private AdditionalFeaturesServerConfigurations additionalFeaturesServerConfigurations;

    /*
     * SQL Instance settings.
     */
    @JsonProperty(value = "sqlInstanceSettings")
    private SqlInstanceSettings sqlInstanceSettings;

    /*
     * Azure AD authentication Settings.
     */
    @JsonProperty(value = "azureAdAuthenticationSettings")
    private AadAuthenticationSettings azureAdAuthenticationSettings;

    /** Creates an instance of ServerConfigurationsManagementSettings class. */
    public ServerConfigurationsManagementSettings() {
    }

    /**
     * Get the sqlConnectivityUpdateSettings property: SQL connectivity type settings.
     *
     * @return the sqlConnectivityUpdateSettings value.
     */
    public SqlConnectivityUpdateSettings sqlConnectivityUpdateSettings() {
        return this.sqlConnectivityUpdateSettings;
    }

    /**
     * Set the sqlConnectivityUpdateSettings property: SQL connectivity type settings.
     *
     * @param sqlConnectivityUpdateSettings the sqlConnectivityUpdateSettings value to set.
     * @return the ServerConfigurationsManagementSettings object itself.
     */
    public ServerConfigurationsManagementSettings withSqlConnectivityUpdateSettings(
        SqlConnectivityUpdateSettings sqlConnectivityUpdateSettings) {
        this.sqlConnectivityUpdateSettings = sqlConnectivityUpdateSettings;
        return this;
    }

    /**
     * Get the sqlWorkloadTypeUpdateSettings property: SQL workload type settings.
     *
     * @return the sqlWorkloadTypeUpdateSettings value.
     */
    public SqlWorkloadTypeUpdateSettings sqlWorkloadTypeUpdateSettings() {
        return this.sqlWorkloadTypeUpdateSettings;
    }

    /**
     * Set the sqlWorkloadTypeUpdateSettings property: SQL workload type settings.
     *
     * @param sqlWorkloadTypeUpdateSettings the sqlWorkloadTypeUpdateSettings value to set.
     * @return the ServerConfigurationsManagementSettings object itself.
     */
    public ServerConfigurationsManagementSettings withSqlWorkloadTypeUpdateSettings(
        SqlWorkloadTypeUpdateSettings sqlWorkloadTypeUpdateSettings) {
        this.sqlWorkloadTypeUpdateSettings = sqlWorkloadTypeUpdateSettings;
        return this;
    }

    /**
     * Get the sqlStorageUpdateSettings property: SQL storage update settings.
     *
     * @return the sqlStorageUpdateSettings value.
     */
    public SqlStorageUpdateSettings sqlStorageUpdateSettings() {
        return this.sqlStorageUpdateSettings;
    }

    /**
     * Set the sqlStorageUpdateSettings property: SQL storage update settings.
     *
     * @param sqlStorageUpdateSettings the sqlStorageUpdateSettings value to set.
     * @return the ServerConfigurationsManagementSettings object itself.
     */
    public ServerConfigurationsManagementSettings withSqlStorageUpdateSettings(
        SqlStorageUpdateSettings sqlStorageUpdateSettings) {
        this.sqlStorageUpdateSettings = sqlStorageUpdateSettings;
        return this;
    }

    /**
     * Get the additionalFeaturesServerConfigurations property: Additional SQL feature settings.
     *
     * @return the additionalFeaturesServerConfigurations value.
     */
    public AdditionalFeaturesServerConfigurations additionalFeaturesServerConfigurations() {
        return this.additionalFeaturesServerConfigurations;
    }

    /**
     * Set the additionalFeaturesServerConfigurations property: Additional SQL feature settings.
     *
     * @param additionalFeaturesServerConfigurations the additionalFeaturesServerConfigurations value to set.
     * @return the ServerConfigurationsManagementSettings object itself.
     */
    public ServerConfigurationsManagementSettings withAdditionalFeaturesServerConfigurations(
        AdditionalFeaturesServerConfigurations additionalFeaturesServerConfigurations) {
        this.additionalFeaturesServerConfigurations = additionalFeaturesServerConfigurations;
        return this;
    }

    /**
     * Get the sqlInstanceSettings property: SQL Instance settings.
     *
     * @return the sqlInstanceSettings value.
     */
    public SqlInstanceSettings sqlInstanceSettings() {
        return this.sqlInstanceSettings;
    }

    /**
     * Set the sqlInstanceSettings property: SQL Instance settings.
     *
     * @param sqlInstanceSettings the sqlInstanceSettings value to set.
     * @return the ServerConfigurationsManagementSettings object itself.
     */
    public ServerConfigurationsManagementSettings withSqlInstanceSettings(SqlInstanceSettings sqlInstanceSettings) {
        this.sqlInstanceSettings = sqlInstanceSettings;
        return this;
    }

    /**
     * Get the azureAdAuthenticationSettings property: Azure AD authentication Settings.
     *
     * @return the azureAdAuthenticationSettings value.
     */
    public AadAuthenticationSettings azureAdAuthenticationSettings() {
        return this.azureAdAuthenticationSettings;
    }

    /**
     * Set the azureAdAuthenticationSettings property: Azure AD authentication Settings.
     *
     * @param azureAdAuthenticationSettings the azureAdAuthenticationSettings value to set.
     * @return the ServerConfigurationsManagementSettings object itself.
     */
    public ServerConfigurationsManagementSettings withAzureAdAuthenticationSettings(
        AadAuthenticationSettings azureAdAuthenticationSettings) {
        this.azureAdAuthenticationSettings = azureAdAuthenticationSettings;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (sqlConnectivityUpdateSettings() != null) {
            sqlConnectivityUpdateSettings().validate();
        }
        if (sqlWorkloadTypeUpdateSettings() != null) {
            sqlWorkloadTypeUpdateSettings().validate();
        }
        if (sqlStorageUpdateSettings() != null) {
            sqlStorageUpdateSettings().validate();
        }
        if (additionalFeaturesServerConfigurations() != null) {
            additionalFeaturesServerConfigurations().validate();
        }
        if (sqlInstanceSettings() != null) {
            sqlInstanceSettings().validate();
        }
        if (azureAdAuthenticationSettings() != null) {
            azureAdAuthenticationSettings().validate();
        }
    }
}
