diff --git a/sdk/sql/mgmt-v2018_06_01_preview/pom.xml b/sdk/sql/mgmt-v2018_06_01_preview/pom.xml
index e80ed8c520c34..74af17cb02605 100644
--- a/sdk/sql/mgmt-v2018_06_01_preview/pom.xml
+++ b/sdk/sql/mgmt-v2018_06_01_preview/pom.xml
@@ -11,8 +11,8 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
- ../../parents/azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
azure-mgmt-sql
1.0.0-beta
@@ -71,6 +71,8 @@
azure-arm-client-runtime
test-jar
test
+
+ 1.6.5
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CatalogCollationType.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CatalogCollationType.java
new file mode 100644
index 0000000000000..085313fa204b0
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CatalogCollationType.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for CatalogCollationType.
+ */
+public final class CatalogCollationType extends ExpandableStringEnum {
+ /** Static value DATABASE_DEFAULT for CatalogCollationType. */
+ public static final CatalogCollationType DATABASE_DEFAULT = fromString("DATABASE_DEFAULT");
+
+ /** Static value SQL_Latin1_General_CP1_CI_AS for CatalogCollationType. */
+ public static final CatalogCollationType SQL_LATIN1_GENERAL_CP1_CI_AS = fromString("SQL_Latin1_General_CP1_CI_AS");
+
+ /**
+ * Creates or finds a CatalogCollationType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding CatalogCollationType
+ */
+ @JsonCreator
+ public static CatalogCollationType fromString(String name) {
+ return fromString(name, CatalogCollationType.class);
+ }
+
+ /**
+ * @return known CatalogCollationType values
+ */
+ public static Collection values() {
+ return values(CatalogCollationType.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CompleteDatabaseRestoreDefinition.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CompleteDatabaseRestoreDefinition.java
new file mode 100644
index 0000000000000..6e842f0ec27ac
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CompleteDatabaseRestoreDefinition.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Contains the information necessary to perform a complete database restore
+ * operation.
+ */
+public class CompleteDatabaseRestoreDefinition {
+ /**
+ * The last backup name to apply.
+ */
+ @JsonProperty(value = "lastBackupName", required = true)
+ private String lastBackupName;
+
+ /**
+ * Get the last backup name to apply.
+ *
+ * @return the lastBackupName value
+ */
+ public String lastBackupName() {
+ return this.lastBackupName;
+ }
+
+ /**
+ * Set the last backup name to apply.
+ *
+ * @param lastBackupName the lastBackupName value to set
+ * @return the CompleteDatabaseRestoreDefinition object itself.
+ */
+ public CompleteDatabaseRestoreDefinition withLastBackupName(String lastBackupName) {
+ this.lastBackupName = lastBackupName;
+ return this;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CurrentSensitivityLabels.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CurrentSensitivityLabels.java
new file mode 100644
index 0000000000000..824a83a9221b6
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CurrentSensitivityLabels.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SensitivityLabelInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+
+/**
+ * Type representing CurrentSensitivityLabels.
+ */
+public interface CurrentSensitivityLabels extends HasInner, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the informationType value.
+ */
+ String informationType();
+
+ /**
+ * @return the informationTypeId value.
+ */
+ String informationTypeId();
+
+ /**
+ * @return the isDisabled value.
+ */
+ Boolean isDisabled();
+
+ /**
+ * @return the labelId value.
+ */
+ String labelId();
+
+ /**
+ * @return the labelName value.
+ */
+ String labelName();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the rank value.
+ */
+ SensitivityLabelRank rank();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseSecurityAlertPolicies.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseSecurityAlertPolicies.java
new file mode 100644
index 0000000000000..2a9d172227456
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseSecurityAlertPolicies.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.DatabaseSecurityAlertPoliciesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing DatabaseSecurityAlertPolicies.
+ */
+public interface DatabaseSecurityAlertPolicies extends SupportsCreating, HasInner {
+ /**
+ * Gets a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String serverName, String databaseName);
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseSecurityAlertPolicy.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseSecurityAlertPolicy.java
new file mode 100644
index 0000000000000..a9b72df9026ea
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseSecurityAlertPolicy.java
@@ -0,0 +1,287 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.DatabaseSecurityAlertPolicyInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+import java.util.List;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing DatabaseSecurityAlertPolicy.
+ */
+public interface DatabaseSecurityAlertPolicy extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the creationTime value.
+ */
+ DateTime creationTime();
+
+ /**
+ * @return the disabledAlerts value.
+ */
+ List disabledAlerts();
+
+ /**
+ * @return the emailAccountAdmins value.
+ */
+ Boolean emailAccountAdmins();
+
+ /**
+ * @return the emailAddresses value.
+ */
+ List emailAddresses();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the retentionDays value.
+ */
+ Integer retentionDays();
+
+ /**
+ * @return the state value.
+ */
+ SecurityAlertPolicyState state();
+
+ /**
+ * @return the storageAccountAccessKey value.
+ */
+ String storageAccountAccessKey();
+
+ /**
+ * @return the storageEndpoint value.
+ */
+ String storageEndpoint();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the DatabaseSecurityAlertPolicy definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDatabasis, DefinitionStages.WithState, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of DatabaseSecurityAlertPolicy definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a DatabaseSecurityAlertPolicy definition.
+ */
+ interface Blank extends WithDatabasis {
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy definition allowing to specify Databasis.
+ */
+ interface WithDatabasis {
+ /**
+ * Specifies resourceGroupName, serverName, databaseName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param serverName The name of the server
+ * @param databaseName The name of the database for which the security alert policy is defined
+ * @return the next definition stage
+ */
+ WithState withExistingDatabasis(String resourceGroupName, String serverName, String databaseName);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy definition allowing to specify State.
+ */
+ interface WithState {
+ /**
+ * Specifies state.
+ * @param state Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. Possible values include: 'New', 'Enabled', 'Disabled'
+ * @return the next definition stage
+ */
+ WithCreate withState(SecurityAlertPolicyState state);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy definition allowing to specify DisabledAlerts.
+ */
+ interface WithDisabledAlerts {
+ /**
+ * Specifies disabledAlerts.
+ * @param disabledAlerts Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action
+ * @return the next definition stage
+ */
+ WithCreate withDisabledAlerts(List disabledAlerts);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy definition allowing to specify EmailAccountAdmins.
+ */
+ interface WithEmailAccountAdmins {
+ /**
+ * Specifies emailAccountAdmins.
+ * @param emailAccountAdmins Specifies that the alert is sent to the account administrators
+ * @return the next definition stage
+ */
+ WithCreate withEmailAccountAdmins(Boolean emailAccountAdmins);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy definition allowing to specify EmailAddresses.
+ */
+ interface WithEmailAddresses {
+ /**
+ * Specifies emailAddresses.
+ * @param emailAddresses Specifies an array of e-mail addresses to which the alert is sent
+ * @return the next definition stage
+ */
+ WithCreate withEmailAddresses(List emailAddresses);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy definition allowing to specify RetentionDays.
+ */
+ interface WithRetentionDays {
+ /**
+ * Specifies retentionDays.
+ * @param retentionDays Specifies the number of days to keep in the Threat Detection audit logs
+ * @return the next definition stage
+ */
+ WithCreate withRetentionDays(Integer retentionDays);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy definition allowing to specify StorageAccountAccessKey.
+ */
+ interface WithStorageAccountAccessKey {
+ /**
+ * Specifies storageAccountAccessKey.
+ * @param storageAccountAccessKey Specifies the identifier key of the Threat Detection audit storage account
+ * @return the next definition stage
+ */
+ WithCreate withStorageAccountAccessKey(String storageAccountAccessKey);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy definition allowing to specify StorageEndpoint.
+ */
+ interface WithStorageEndpoint {
+ /**
+ * Specifies storageEndpoint.
+ * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs
+ * @return the next definition stage
+ */
+ WithCreate withStorageEndpoint(String storageEndpoint);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithDisabledAlerts, DefinitionStages.WithEmailAccountAdmins, DefinitionStages.WithEmailAddresses, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageEndpoint {
+ }
+ }
+ /**
+ * The template for a DatabaseSecurityAlertPolicy update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithDisabledAlerts, UpdateStages.WithEmailAccountAdmins, UpdateStages.WithEmailAddresses, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageEndpoint {
+ }
+
+ /**
+ * Grouping of DatabaseSecurityAlertPolicy update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the databasesecurityalertpolicy update allowing to specify DisabledAlerts.
+ */
+ interface WithDisabledAlerts {
+ /**
+ * Specifies disabledAlerts.
+ * @param disabledAlerts Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action
+ * @return the next update stage
+ */
+ Update withDisabledAlerts(List disabledAlerts);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy update allowing to specify EmailAccountAdmins.
+ */
+ interface WithEmailAccountAdmins {
+ /**
+ * Specifies emailAccountAdmins.
+ * @param emailAccountAdmins Specifies that the alert is sent to the account administrators
+ * @return the next update stage
+ */
+ Update withEmailAccountAdmins(Boolean emailAccountAdmins);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy update allowing to specify EmailAddresses.
+ */
+ interface WithEmailAddresses {
+ /**
+ * Specifies emailAddresses.
+ * @param emailAddresses Specifies an array of e-mail addresses to which the alert is sent
+ * @return the next update stage
+ */
+ Update withEmailAddresses(List emailAddresses);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy update allowing to specify RetentionDays.
+ */
+ interface WithRetentionDays {
+ /**
+ * Specifies retentionDays.
+ * @param retentionDays Specifies the number of days to keep in the Threat Detection audit logs
+ * @return the next update stage
+ */
+ Update withRetentionDays(Integer retentionDays);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy update allowing to specify StorageAccountAccessKey.
+ */
+ interface WithStorageAccountAccessKey {
+ /**
+ * Specifies storageAccountAccessKey.
+ * @param storageAccountAccessKey Specifies the identifier key of the Threat Detection audit storage account
+ * @return the next update stage
+ */
+ Update withStorageAccountAccessKey(String storageAccountAccessKey);
+ }
+
+ /**
+ * The stage of the databasesecurityalertpolicy update allowing to specify StorageEndpoint.
+ */
+ interface WithStorageEndpoint {
+ /**
+ * Specifies storageEndpoint.
+ * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs
+ * @return the next update stage
+ */
+ Update withStorageEndpoint(String storageEndpoint);
+ }
+
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseState.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseState.java
new file mode 100644
index 0000000000000..eccf918464264
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseState.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for DatabaseState.
+ */
+public final class DatabaseState extends ExpandableStringEnum {
+ /** Static value All for DatabaseState. */
+ public static final DatabaseState ALL = fromString("All");
+
+ /** Static value Live for DatabaseState. */
+ public static final DatabaseState LIVE = fromString("Live");
+
+ /** Static value Deleted for DatabaseState. */
+ public static final DatabaseState DELETED = fromString("Deleted");
+
+ /**
+ * Creates or finds a DatabaseState from its string representation.
+ * @param name a name to look for
+ * @return the corresponding DatabaseState
+ */
+ @JsonCreator
+ public static DatabaseState fromString(String name) {
+ return fromString(name, DatabaseState.class);
+ }
+
+ /**
+ * @return known DatabaseState values
+ */
+ public static Collection values() {
+ return values(DatabaseState.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Databases.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Databases.java
new file mode 100644
index 0000000000000..87bb5cd32216b
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Databases.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import rx.Completable;
+
+/**
+ * Type representing Databases.
+ */
+public interface Databases {
+ /**
+ * Failovers a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database to failover.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable failoverAsync(String resourceGroupName, String serverName, String databaseName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ElasticPools.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ElasticPools.java
new file mode 100644
index 0000000000000..8558918dba84e
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ElasticPools.java
@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import rx.Completable;
+
+/**
+ * Type representing ElasticPools.
+ */
+public interface ElasticPools {
+ /**
+ * Failovers an elastic pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param elasticPoolName The name of the elastic pool to failover.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable failoverAsync(String resourceGroupName, String serverName, String elasticPoolName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/IdentityType.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/IdentityType.java
new file mode 100644
index 0000000000000..3f3e8108ef518
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/IdentityType.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for IdentityType.
+ */
+public final class IdentityType extends ExpandableStringEnum {
+ /** Static value SystemAssigned for IdentityType. */
+ public static final IdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned");
+
+ /**
+ * Creates or finds a IdentityType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding IdentityType
+ */
+ @JsonCreator
+ public static IdentityType fromString(String name) {
+ return fromString(name, IdentityType.class);
+ }
+
+ /**
+ * @return known IdentityType values
+ */
+ public static Collection values() {
+ return values(IdentityType.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePool.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePool.java
new file mode 100644
index 0000000000000..745b2bb78cd65
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePool.java
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.Resource;
+import com.microsoft.azure.arm.resources.models.GroupableResourceCore;
+import com.microsoft.azure.arm.resources.models.HasResourceGroup;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.InstancePoolInner;
+
+/**
+ * Type representing InstancePool.
+ */
+public interface InstancePool extends HasInner, Resource, GroupableResourceCore, HasResourceGroup, Refreshable, Updatable, HasManager {
+ /**
+ * @return the licenseType value.
+ */
+ InstancePoolLicenseType licenseType();
+
+ /**
+ * @return the sku value.
+ */
+ Sku sku();
+
+ /**
+ * @return the subnetId value.
+ */
+ String subnetId();
+
+ /**
+ * @return the vCores value.
+ */
+ int vCores();
+
+ /**
+ * The entirety of the InstancePool definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithLicenseType, DefinitionStages.WithSubnetId, DefinitionStages.WithVCores, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of InstancePool definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a InstancePool definition.
+ */
+ interface Blank extends GroupableResourceCore.DefinitionWithRegion {
+ }
+
+ /**
+ * The stage of the InstancePool definition allowing to specify the resource group.
+ */
+ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup {
+ }
+
+ /**
+ * The stage of the instancepool definition allowing to specify LicenseType.
+ */
+ interface WithLicenseType {
+ /**
+ * Specifies licenseType.
+ * @param licenseType The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). Possible values include: 'LicenseIncluded', 'BasePrice'
+ * @return the next definition stage
+*/
+ WithSubnetId withLicenseType(InstancePoolLicenseType licenseType);
+ }
+
+ /**
+ * The stage of the instancepool definition allowing to specify SubnetId.
+ */
+ interface WithSubnetId {
+ /**
+ * Specifies subnetId.
+ * @param subnetId Resource ID of the subnet to place this instance pool in
+ * @return the next definition stage
+*/
+ WithVCores withSubnetId(String subnetId);
+ }
+
+ /**
+ * The stage of the instancepool definition allowing to specify VCores.
+ */
+ interface WithVCores {
+ /**
+ * Specifies vCores.
+ * @param vCores Count of vCores belonging to this instance pool
+ * @return the next definition stage
+*/
+ WithCreate withVCores(int vCores);
+ }
+
+ /**
+ * The stage of the instancepool definition allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku The name and tier of the SKU
+ * @return the next definition stage
+ */
+ WithCreate withSku(Sku sku);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithSku {
+ }
+ }
+ /**
+ * The template for a InstancePool update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithSku {
+ }
+
+ /**
+ * Grouping of InstancePool update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the instancepool update allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku The name and tier of the SKU
+ * @return the next update stage
+ */
+ Update withSku(Sku sku);
+ }
+
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePoolLicenseType.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePoolLicenseType.java
new file mode 100644
index 0000000000000..e60936bc2c522
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePoolLicenseType.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for InstancePoolLicenseType.
+ */
+public final class InstancePoolLicenseType extends ExpandableStringEnum {
+ /** Static value LicenseIncluded for InstancePoolLicenseType. */
+ public static final InstancePoolLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded");
+
+ /** Static value BasePrice for InstancePoolLicenseType. */
+ public static final InstancePoolLicenseType BASE_PRICE = fromString("BasePrice");
+
+ /**
+ * Creates or finds a InstancePoolLicenseType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding InstancePoolLicenseType
+ */
+ @JsonCreator
+ public static InstancePoolLicenseType fromString(String name) {
+ return fromString(name, InstancePoolLicenseType.class);
+ }
+
+ /**
+ * @return known InstancePoolLicenseType values
+ */
+ public static Collection values() {
+ return values(InstancePoolLicenseType.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePoolUpdate.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePoolUpdate.java
new file mode 100644
index 0000000000000..6b5ca0c0f12d2
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePoolUpdate.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * An update to an Instance pool.
+ */
+public class InstancePoolUpdate {
+ /**
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get resource tags.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set resource tags.
+ *
+ * @param tags the tags value to set
+ * @return the InstancePoolUpdate object itself.
+ */
+ public InstancePoolUpdate withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePools.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePools.java
new file mode 100644
index 0000000000000..1b5d82f79ac12
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePools.java
@@ -0,0 +1,25 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import com.microsoft.azure.arm.resources.collection.SupportsDeletingByResourceGroup;
+import com.microsoft.azure.arm.resources.collection.SupportsBatchDeletion;
+import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup;
+import rx.Observable;
+import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup;
+import com.microsoft.azure.arm.collection.SupportsListing;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.InstancePoolsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing InstancePools.
+ */
+public interface InstancePools extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner {
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/LongTermRetentionManagedInstanceBackups.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/LongTermRetentionManagedInstanceBackups.java
new file mode 100644
index 0000000000000..172788f225d29
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/LongTermRetentionManagedInstanceBackups.java
@@ -0,0 +1,133 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.LongTermRetentionManagedInstanceBackupsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing LongTermRetentionManagedInstanceBackups.
+ */
+public interface LongTermRetentionManagedInstanceBackups extends HasInner {
+ /**
+ * Lists the long term retention backups for a given managed instance.
+ *
+ * @param locationName The location of the database
+ * @param managedInstanceName The name of the managed instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByInstanceAsync(final String locationName, final String managedInstanceName);
+
+ /**
+ * Lists the long term retention backups for managed databases in a given location.
+ *
+ * @param locationName The location of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByLocationAsync(final String locationName);
+
+ /**
+ * Gets a long term retention backup for a managed database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param locationName The location of the database.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the managed database.
+ * @param backupName The backup name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getByResourceGroupAsync(String resourceGroupName, String locationName, String managedInstanceName, String databaseName, String backupName);
+
+ /**
+ * Deletes a long term retention backup.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param locationName The location of the database
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the managed database.
+ * @param backupName The backup name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteByResourceGroupAsync(String resourceGroupName, String locationName, String managedInstanceName, String databaseName, String backupName);
+
+ /**
+ * Lists all long term retention backups for a managed database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param locationName The location of the database
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the managed database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceGroupDatabaseAsync(final String resourceGroupName, final String locationName, final String managedInstanceName, final String databaseName);
+
+ /**
+ * Lists the long term retention backups for a given managed instance.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param locationName The location of the database.
+ * @param managedInstanceName The name of the managed instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceGroupInstanceAsync(final String resourceGroupName, final String locationName, final String managedInstanceName);
+
+ /**
+ * Lists the long term retention backups for managed databases in a given location.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param locationName The location of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceGroupLocationAsync(final String resourceGroupName, final String locationName);
+
+ /**
+ * Gets a long term retention backup for a managed database.
+ *
+ * @param locationName The location of the database.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the managed database.
+ * @param backupName The backup name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String locationName, String managedInstanceName, String databaseName, String backupName);
+
+ /**
+ * Lists all long term retention backups for a managed database.
+ *
+ * @param locationName The location of the database.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the managed database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByDatabaseAsync(final String locationName, final String managedInstanceName, final String databaseName);
+
+ /**
+ * Deletes a long term retention backup.
+ *
+ * @param locationName The location of the database.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the managed database.
+ * @param backupName The backup name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String locationName, String managedInstanceName, String databaseName, String backupName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabase.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabase.java
new file mode 100644
index 0000000000000..218580c4679fe
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabase.java
@@ -0,0 +1,451 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.ManagedDatabaseInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+import org.joda.time.DateTime;
+import java.util.Map;
+
+/**
+ * Type representing ManagedDatabase.
+ */
+public interface ManagedDatabase extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the catalogCollation value.
+ */
+ CatalogCollationType catalogCollation();
+
+ /**
+ * @return the collation value.
+ */
+ String collation();
+
+ /**
+ * @return the createMode value.
+ */
+ ManagedDatabaseCreateMode createMode();
+
+ /**
+ * @return the creationDate value.
+ */
+ DateTime creationDate();
+
+ /**
+ * @return the defaultSecondaryLocation value.
+ */
+ String defaultSecondaryLocation();
+
+ /**
+ * @return the earliestRestorePoint value.
+ */
+ DateTime earliestRestorePoint();
+
+ /**
+ * @return the failoverGroupId value.
+ */
+ String failoverGroupId();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the longTermRetentionBackupResourceId value.
+ */
+ String longTermRetentionBackupResourceId();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the recoverableDatabaseId value.
+ */
+ String recoverableDatabaseId();
+
+ /**
+ * @return the restorableDroppedDatabaseId value.
+ */
+ String restorableDroppedDatabaseId();
+
+ /**
+ * @return the restorePointInTime value.
+ */
+ DateTime restorePointInTime();
+
+ /**
+ * @return the sourceDatabaseId value.
+ */
+ String sourceDatabaseId();
+
+ /**
+ * @return the status value.
+ */
+ ManagedDatabaseStatus status();
+
+ /**
+ * @return the storageContainerSasToken value.
+ */
+ String storageContainerSasToken();
+
+ /**
+ * @return the storageContainerUri value.
+ */
+ String storageContainerUri();
+
+ /**
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the ManagedDatabase definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithManagedInstance, DefinitionStages.WithLocation, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of ManagedDatabase definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a ManagedDatabase definition.
+ */
+ interface Blank extends WithManagedInstance {
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify ManagedInstance.
+ */
+ interface WithManagedInstance {
+ /**
+ * Specifies resourceGroupName, managedInstanceName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param managedInstanceName The name of the managed instance
+ * @return the next definition stage
+ */
+ WithLocation withExistingManagedInstance(String resourceGroupName, String managedInstanceName);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ * @param location Resource location
+ * @return the next definition stage
+ */
+ WithCreate withLocation(String location);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify CatalogCollation.
+ */
+ interface WithCatalogCollation {
+ /**
+ * Specifies catalogCollation.
+ * @param catalogCollation Collation of the metadata catalog. Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS'
+ * @return the next definition stage
+ */
+ WithCreate withCatalogCollation(CatalogCollationType catalogCollation);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify Collation.
+ */
+ interface WithCollation {
+ /**
+ * Specifies collation.
+ * @param collation Collation of the managed database
+ * @return the next definition stage
+ */
+ WithCreate withCollation(String collation);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify CreateMode.
+ */
+ interface WithCreateMode {
+ /**
+ * Specifies createMode.
+ * @param createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup'
+ * @return the next definition stage
+ */
+ WithCreate withCreateMode(ManagedDatabaseCreateMode createMode);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify LongTermRetentionBackupResourceId.
+ */
+ interface WithLongTermRetentionBackupResourceId {
+ /**
+ * Specifies longTermRetentionBackupResourceId.
+ * @param longTermRetentionBackupResourceId The name of the Long Term Retention backup to be used for restore of this managed database
+ * @return the next definition stage
+ */
+ WithCreate withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify RecoverableDatabaseId.
+ */
+ interface WithRecoverableDatabaseId {
+ /**
+ * Specifies recoverableDatabaseId.
+ * @param recoverableDatabaseId The resource identifier of the recoverable database associated with create operation of this database
+ * @return the next definition stage
+ */
+ WithCreate withRecoverableDatabaseId(String recoverableDatabaseId);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify RestorableDroppedDatabaseId.
+ */
+ interface WithRestorableDroppedDatabaseId {
+ /**
+ * Specifies restorableDroppedDatabaseId.
+ * @param restorableDroppedDatabaseId The restorable dropped database resource id to restore when creating this database
+ * @return the next definition stage
+ */
+ WithCreate withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify RestorePointInTime.
+ */
+ interface WithRestorePointInTime {
+ /**
+ * Specifies restorePointInTime.
+ * @param restorePointInTime Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database
+ * @return the next definition stage
+ */
+ WithCreate withRestorePointInTime(DateTime restorePointInTime);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify SourceDatabaseId.
+ */
+ interface WithSourceDatabaseId {
+ /**
+ * Specifies sourceDatabaseId.
+ * @param sourceDatabaseId The resource identifier of the source database associated with create operation of this database
+ * @return the next definition stage
+ */
+ WithCreate withSourceDatabaseId(String sourceDatabaseId);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify StorageContainerSasToken.
+ */
+ interface WithStorageContainerSasToken {
+ /**
+ * Specifies storageContainerSasToken.
+ * @param storageContainerSasToken Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token
+ * @return the next definition stage
+ */
+ WithCreate withStorageContainerSasToken(String storageContainerSasToken);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify StorageContainerUri.
+ */
+ interface WithStorageContainerUri {
+ /**
+ * Specifies storageContainerUri.
+ * @param storageContainerUri Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored
+ * @return the next definition stage
+ */
+ WithCreate withStorageContainerUri(String storageContainerUri);
+ }
+
+ /**
+ * The stage of the manageddatabase definition allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next definition stage
+ */
+ WithCreate withTags(Map tags);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithLongTermRetentionBackupResourceId, DefinitionStages.WithRecoverableDatabaseId, DefinitionStages.WithRestorableDroppedDatabaseId, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithStorageContainerSasToken, DefinitionStages.WithStorageContainerUri, DefinitionStages.WithTags {
+ }
+ }
+ /**
+ * The template for a ManagedDatabase update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithLongTermRetentionBackupResourceId, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSourceDatabaseId, UpdateStages.WithStorageContainerSasToken, UpdateStages.WithStorageContainerUri, UpdateStages.WithTags {
+ }
+
+ /**
+ * Grouping of ManagedDatabase update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the manageddatabase update allowing to specify CatalogCollation.
+ */
+ interface WithCatalogCollation {
+ /**
+ * Specifies catalogCollation.
+ * @param catalogCollation Collation of the metadata catalog. Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS'
+ * @return the next update stage
+ */
+ Update withCatalogCollation(CatalogCollationType catalogCollation);
+ }
+
+ /**
+ * The stage of the manageddatabase update allowing to specify Collation.
+ */
+ interface WithCollation {
+ /**
+ * Specifies collation.
+ * @param collation Collation of the managed database
+ * @return the next update stage
+ */
+ Update withCollation(String collation);
+ }
+
+ /**
+ * The stage of the manageddatabase update allowing to specify CreateMode.
+ */
+ interface WithCreateMode {
+ /**
+ * Specifies createMode.
+ * @param createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup'
+ * @return the next update stage
+ */
+ Update withCreateMode(ManagedDatabaseCreateMode createMode);
+ }
+
+ /**
+ * The stage of the manageddatabase update allowing to specify LongTermRetentionBackupResourceId.
+ */
+ interface WithLongTermRetentionBackupResourceId {
+ /**
+ * Specifies longTermRetentionBackupResourceId.
+ * @param longTermRetentionBackupResourceId The name of the Long Term Retention backup to be used for restore of this managed database
+ * @return the next update stage
+ */
+ Update withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId);
+ }
+
+ /**
+ * The stage of the manageddatabase update allowing to specify RecoverableDatabaseId.
+ */
+ interface WithRecoverableDatabaseId {
+ /**
+ * Specifies recoverableDatabaseId.
+ * @param recoverableDatabaseId The resource identifier of the recoverable database associated with create operation of this database
+ * @return the next update stage
+ */
+ Update withRecoverableDatabaseId(String recoverableDatabaseId);
+ }
+
+ /**
+ * The stage of the manageddatabase update allowing to specify RestorableDroppedDatabaseId.
+ */
+ interface WithRestorableDroppedDatabaseId {
+ /**
+ * Specifies restorableDroppedDatabaseId.
+ * @param restorableDroppedDatabaseId The restorable dropped database resource id to restore when creating this database
+ * @return the next update stage
+ */
+ Update withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId);
+ }
+
+ /**
+ * The stage of the manageddatabase update allowing to specify RestorePointInTime.
+ */
+ interface WithRestorePointInTime {
+ /**
+ * Specifies restorePointInTime.
+ * @param restorePointInTime Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database
+ * @return the next update stage
+ */
+ Update withRestorePointInTime(DateTime restorePointInTime);
+ }
+
+ /**
+ * The stage of the manageddatabase update allowing to specify SourceDatabaseId.
+ */
+ interface WithSourceDatabaseId {
+ /**
+ * Specifies sourceDatabaseId.
+ * @param sourceDatabaseId The resource identifier of the source database associated with create operation of this database
+ * @return the next update stage
+ */
+ Update withSourceDatabaseId(String sourceDatabaseId);
+ }
+
+ /**
+ * The stage of the manageddatabase update allowing to specify StorageContainerSasToken.
+ */
+ interface WithStorageContainerSasToken {
+ /**
+ * Specifies storageContainerSasToken.
+ * @param storageContainerSasToken Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token
+ * @return the next update stage
+ */
+ Update withStorageContainerSasToken(String storageContainerSasToken);
+ }
+
+ /**
+ * The stage of the manageddatabase update allowing to specify StorageContainerUri.
+ */
+ interface WithStorageContainerUri {
+ /**
+ * Specifies storageContainerUri.
+ * @param storageContainerUri Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored
+ * @return the next update stage
+ */
+ Update withStorageContainerUri(String storageContainerUri);
+ }
+
+ /**
+ * The stage of the manageddatabase update allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next update stage
+ */
+ Update withTags(Map tags);
+ }
+
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseCreateMode.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseCreateMode.java
new file mode 100644
index 0000000000000..0866411a9d619
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseCreateMode.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ManagedDatabaseCreateMode.
+ */
+public final class ManagedDatabaseCreateMode extends ExpandableStringEnum {
+ /** Static value Default for ManagedDatabaseCreateMode. */
+ public static final ManagedDatabaseCreateMode DEFAULT = fromString("Default");
+
+ /** Static value RestoreExternalBackup for ManagedDatabaseCreateMode. */
+ public static final ManagedDatabaseCreateMode RESTORE_EXTERNAL_BACKUP = fromString("RestoreExternalBackup");
+
+ /** Static value PointInTimeRestore for ManagedDatabaseCreateMode. */
+ public static final ManagedDatabaseCreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore");
+
+ /** Static value Recovery for ManagedDatabaseCreateMode. */
+ public static final ManagedDatabaseCreateMode RECOVERY = fromString("Recovery");
+
+ /** Static value RestoreLongTermRetentionBackup for ManagedDatabaseCreateMode. */
+ public static final ManagedDatabaseCreateMode RESTORE_LONG_TERM_RETENTION_BACKUP = fromString("RestoreLongTermRetentionBackup");
+
+ /**
+ * Creates or finds a ManagedDatabaseCreateMode from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ManagedDatabaseCreateMode
+ */
+ @JsonCreator
+ public static ManagedDatabaseCreateMode fromString(String name) {
+ return fromString(name, ManagedDatabaseCreateMode.class);
+ }
+
+ /**
+ * @return known ManagedDatabaseCreateMode values
+ */
+ public static Collection values() {
+ return values(ManagedDatabaseCreateMode.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseRestoreDetails.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseRestoreDetails.java
new file mode 100644
index 0000000000000..d5ea5e83dc7c3
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseRestoreDetails.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.ManagedDatabaseRestoreDetailsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ManagedDatabaseRestoreDetails.
+ */
+public interface ManagedDatabaseRestoreDetails extends HasInner {
+ /**
+ * Gets managed database restore details.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseRestoreDetailsResult.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseRestoreDetailsResult.java
new file mode 100644
index 0000000000000..df5785a8e5e76
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseRestoreDetailsResult.java
@@ -0,0 +1,89 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.ManagedDatabaseRestoreDetailsResultInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+import org.joda.time.DateTime;
+import java.util.List;
+
+/**
+ * Type representing ManagedDatabaseRestoreDetailsResult.
+ */
+public interface ManagedDatabaseRestoreDetailsResult extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the blockReason value.
+ */
+ String blockReason();
+
+ /**
+ * @return the currentRestoringFileName value.
+ */
+ String currentRestoringFileName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the lastRestoredFileName value.
+ */
+ String lastRestoredFileName();
+
+ /**
+ * @return the lastRestoredFileTime value.
+ */
+ DateTime lastRestoredFileTime();
+
+ /**
+ * @return the lastUploadedFileName value.
+ */
+ String lastUploadedFileName();
+
+ /**
+ * @return the lastUploadedFileTime value.
+ */
+ DateTime lastUploadedFileTime();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the numberOfFilesDetected value.
+ */
+ Long numberOfFilesDetected();
+
+ /**
+ * @return the percentCompleted value.
+ */
+ Double percentCompleted();
+
+ /**
+ * @return the status value.
+ */
+ String status();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the unrestorableFiles value.
+ */
+ List unrestorableFiles();
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseSensitivityLabels.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseSensitivityLabels.java
new file mode 100644
index 0000000000000..939f23a3d5e92
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseSensitivityLabels.java
@@ -0,0 +1,106 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import rx.Observable;
+import rx.Completable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.CurrentSensitivityLabels;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.RecommendedSensitivityLabels;
+
+/**
+ * Type representing ManagedDatabaseSensitivityLabels.
+ */
+public interface ManagedDatabaseSensitivityLabels {
+ /**
+ * Begins definition for a new SensitivityLabel resource.
+ * @param name resource name.
+ * @return the first stage of the new SensitivityLabel definition.
+ */
+ SensitivityLabels.DefinitionStages.Blank defineSensitivityLabel(String name);
+
+ /**
+ * Gets the sensitivity label of a given column.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param tableName The name of the table.
+ * @param columnName The name of the column.
+ * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: 'current', 'recommended'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource);
+
+ /**
+ * Deletes the sensitivity label of a given column.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param tableName The name of the table.
+ * @param columnName The name of the column.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName);
+
+ /**
+ * Disables sensitivity recommendations on a given column.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param tableName The name of the table.
+ * @param columnName The name of the column.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable disableRecommendationAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName);
+
+ /**
+ * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns).
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param schemaName The name of the schema.
+ * @param tableName The name of the table.
+ * @param columnName The name of the column.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable enableRecommendationAsync(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName);
+
+ /**
+ * Gets the sensitivity labels of a given database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listCurrentByDatabaseAsync(final String resourceGroupName, final String managedInstanceName, final String databaseName);
+
+ /**
+ * Gets the sensitivity labels of a given database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listRecommendedByDatabaseAsync(final String resourceGroupName, final String managedInstanceName, final String databaseName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseStatus.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseStatus.java
new file mode 100644
index 0000000000000..deb8a89dd767d
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseStatus.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ManagedDatabaseStatus.
+ */
+public final class ManagedDatabaseStatus extends ExpandableStringEnum {
+ /** Static value Online for ManagedDatabaseStatus. */
+ public static final ManagedDatabaseStatus ONLINE = fromString("Online");
+
+ /** Static value Offline for ManagedDatabaseStatus. */
+ public static final ManagedDatabaseStatus OFFLINE = fromString("Offline");
+
+ /** Static value Shutdown for ManagedDatabaseStatus. */
+ public static final ManagedDatabaseStatus SHUTDOWN = fromString("Shutdown");
+
+ /** Static value Creating for ManagedDatabaseStatus. */
+ public static final ManagedDatabaseStatus CREATING = fromString("Creating");
+
+ /** Static value Inaccessible for ManagedDatabaseStatus. */
+ public static final ManagedDatabaseStatus INACCESSIBLE = fromString("Inaccessible");
+
+ /** Static value Restoring for ManagedDatabaseStatus. */
+ public static final ManagedDatabaseStatus RESTORING = fromString("Restoring");
+
+ /** Static value Updating for ManagedDatabaseStatus. */
+ public static final ManagedDatabaseStatus UPDATING = fromString("Updating");
+
+ /**
+ * Creates or finds a ManagedDatabaseStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ManagedDatabaseStatus
+ */
+ @JsonCreator
+ public static ManagedDatabaseStatus fromString(String name) {
+ return fromString(name, ManagedDatabaseStatus.class);
+ }
+
+ /**
+ * @return known ManagedDatabaseStatus values
+ */
+ public static Collection values() {
+ return values(ManagedDatabaseStatus.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseUpdate.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseUpdate.java
new file mode 100644
index 0000000000000..1c942c10af6f4
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseUpdate.java
@@ -0,0 +1,403 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import org.joda.time.DateTime;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * An managed database update.
+ */
+@JsonFlatten
+public class ManagedDatabaseUpdate {
+ /**
+ * Collation of the managed database.
+ */
+ @JsonProperty(value = "properties.collation")
+ private String collation;
+
+ /**
+ * Status of the database. Possible values include: 'Online', 'Offline',
+ * 'Shutdown', 'Creating', 'Inaccessible', 'Restoring', 'Updating'.
+ */
+ @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
+ private ManagedDatabaseStatus status;
+
+ /**
+ * Creation date of the database.
+ */
+ @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime creationDate;
+
+ /**
+ * Earliest restore point in time for point in time restore.
+ */
+ @JsonProperty(value = "properties.earliestRestorePoint", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime earliestRestorePoint;
+
+ /**
+ * Conditional. If createMode is PointInTimeRestore, this value is
+ * required. Specifies the point in time (ISO8601 format) of the source
+ * database that will be restored to create the new database.
+ */
+ @JsonProperty(value = "properties.restorePointInTime")
+ private DateTime restorePointInTime;
+
+ /**
+ * Geo paired region.
+ */
+ @JsonProperty(value = "properties.defaultSecondaryLocation", access = JsonProperty.Access.WRITE_ONLY)
+ private String defaultSecondaryLocation;
+
+ /**
+ * Collation of the metadata catalog. Possible values include:
+ * 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS'.
+ */
+ @JsonProperty(value = "properties.catalogCollation")
+ private CatalogCollationType catalogCollation;
+
+ /**
+ * Managed database create mode. PointInTimeRestore: Create a database by
+ * restoring a point in time backup of an existing database.
+ * SourceDatabaseName, SourceManagedInstanceName and PointInTime must be
+ * specified. RestoreExternalBackup: Create a database by restoring from
+ * external backup files. Collation, StorageContainerUri and
+ * StorageContainerSasToken must be specified. Recovery: Creates a database
+ * by restoring a geo-replicated backup. RecoverableDatabaseId must be
+ * specified as the recoverable database resource ID to restore. Possible
+ * values include: 'Default', 'RestoreExternalBackup',
+ * 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup'.
+ */
+ @JsonProperty(value = "properties.createMode")
+ private ManagedDatabaseCreateMode createMode;
+
+ /**
+ * Conditional. If createMode is RestoreExternalBackup, this value is
+ * required. Specifies the uri of the storage container where backups for
+ * this restore are stored.
+ */
+ @JsonProperty(value = "properties.storageContainerUri")
+ private String storageContainerUri;
+
+ /**
+ * The resource identifier of the source database associated with create
+ * operation of this database.
+ */
+ @JsonProperty(value = "properties.sourceDatabaseId")
+ private String sourceDatabaseId;
+
+ /**
+ * The restorable dropped database resource id to restore when creating
+ * this database.
+ */
+ @JsonProperty(value = "properties.restorableDroppedDatabaseId")
+ private String restorableDroppedDatabaseId;
+
+ /**
+ * Conditional. If createMode is RestoreExternalBackup, this value is
+ * required. Specifies the storage container sas token.
+ */
+ @JsonProperty(value = "properties.storageContainerSasToken")
+ private String storageContainerSasToken;
+
+ /**
+ * Instance Failover Group resource identifier that this managed database
+ * belongs to.
+ */
+ @JsonProperty(value = "properties.failoverGroupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String failoverGroupId;
+
+ /**
+ * The resource identifier of the recoverable database associated with
+ * create operation of this database.
+ */
+ @JsonProperty(value = "properties.recoverableDatabaseId")
+ private String recoverableDatabaseId;
+
+ /**
+ * The name of the Long Term Retention backup to be used for restore of
+ * this managed database.
+ */
+ @JsonProperty(value = "properties.longTermRetentionBackupResourceId")
+ private String longTermRetentionBackupResourceId;
+
+ /**
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get collation of the managed database.
+ *
+ * @return the collation value
+ */
+ public String collation() {
+ return this.collation;
+ }
+
+ /**
+ * Set collation of the managed database.
+ *
+ * @param collation the collation value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withCollation(String collation) {
+ this.collation = collation;
+ return this;
+ }
+
+ /**
+ * Get status of the database. Possible values include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Restoring', 'Updating'.
+ *
+ * @return the status value
+ */
+ public ManagedDatabaseStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get creation date of the database.
+ *
+ * @return the creationDate value
+ */
+ public DateTime creationDate() {
+ return this.creationDate;
+ }
+
+ /**
+ * Get earliest restore point in time for point in time restore.
+ *
+ * @return the earliestRestorePoint value
+ */
+ public DateTime earliestRestorePoint() {
+ return this.earliestRestorePoint;
+ }
+
+ /**
+ * Get conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
+ *
+ * @return the restorePointInTime value
+ */
+ public DateTime restorePointInTime() {
+ return this.restorePointInTime;
+ }
+
+ /**
+ * Set conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
+ *
+ * @param restorePointInTime the restorePointInTime value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withRestorePointInTime(DateTime restorePointInTime) {
+ this.restorePointInTime = restorePointInTime;
+ return this;
+ }
+
+ /**
+ * Get geo paired region.
+ *
+ * @return the defaultSecondaryLocation value
+ */
+ public String defaultSecondaryLocation() {
+ return this.defaultSecondaryLocation;
+ }
+
+ /**
+ * Get collation of the metadata catalog. Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS'.
+ *
+ * @return the catalogCollation value
+ */
+ public CatalogCollationType catalogCollation() {
+ return this.catalogCollation;
+ }
+
+ /**
+ * Set collation of the metadata catalog. Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS'.
+ *
+ * @param catalogCollation the catalogCollation value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withCatalogCollation(CatalogCollationType catalogCollation) {
+ this.catalogCollation = catalogCollation;
+ return this;
+ }
+
+ /**
+ * Get managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup'.
+ *
+ * @return the createMode value
+ */
+ public ManagedDatabaseCreateMode createMode() {
+ return this.createMode;
+ }
+
+ /**
+ * Set managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup'.
+ *
+ * @param createMode the createMode value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withCreateMode(ManagedDatabaseCreateMode createMode) {
+ this.createMode = createMode;
+ return this;
+ }
+
+ /**
+ * Get conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.
+ *
+ * @return the storageContainerUri value
+ */
+ public String storageContainerUri() {
+ return this.storageContainerUri;
+ }
+
+ /**
+ * Set conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.
+ *
+ * @param storageContainerUri the storageContainerUri value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withStorageContainerUri(String storageContainerUri) {
+ this.storageContainerUri = storageContainerUri;
+ return this;
+ }
+
+ /**
+ * Get the resource identifier of the source database associated with create operation of this database.
+ *
+ * @return the sourceDatabaseId value
+ */
+ public String sourceDatabaseId() {
+ return this.sourceDatabaseId;
+ }
+
+ /**
+ * Set the resource identifier of the source database associated with create operation of this database.
+ *
+ * @param sourceDatabaseId the sourceDatabaseId value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withSourceDatabaseId(String sourceDatabaseId) {
+ this.sourceDatabaseId = sourceDatabaseId;
+ return this;
+ }
+
+ /**
+ * Get the restorable dropped database resource id to restore when creating this database.
+ *
+ * @return the restorableDroppedDatabaseId value
+ */
+ public String restorableDroppedDatabaseId() {
+ return this.restorableDroppedDatabaseId;
+ }
+
+ /**
+ * Set the restorable dropped database resource id to restore when creating this database.
+ *
+ * @param restorableDroppedDatabaseId the restorableDroppedDatabaseId value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId) {
+ this.restorableDroppedDatabaseId = restorableDroppedDatabaseId;
+ return this;
+ }
+
+ /**
+ * Get conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.
+ *
+ * @return the storageContainerSasToken value
+ */
+ public String storageContainerSasToken() {
+ return this.storageContainerSasToken;
+ }
+
+ /**
+ * Set conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token.
+ *
+ * @param storageContainerSasToken the storageContainerSasToken value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withStorageContainerSasToken(String storageContainerSasToken) {
+ this.storageContainerSasToken = storageContainerSasToken;
+ return this;
+ }
+
+ /**
+ * Get instance Failover Group resource identifier that this managed database belongs to.
+ *
+ * @return the failoverGroupId value
+ */
+ public String failoverGroupId() {
+ return this.failoverGroupId;
+ }
+
+ /**
+ * Get the resource identifier of the recoverable database associated with create operation of this database.
+ *
+ * @return the recoverableDatabaseId value
+ */
+ public String recoverableDatabaseId() {
+ return this.recoverableDatabaseId;
+ }
+
+ /**
+ * Set the resource identifier of the recoverable database associated with create operation of this database.
+ *
+ * @param recoverableDatabaseId the recoverableDatabaseId value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withRecoverableDatabaseId(String recoverableDatabaseId) {
+ this.recoverableDatabaseId = recoverableDatabaseId;
+ return this;
+ }
+
+ /**
+ * Get the name of the Long Term Retention backup to be used for restore of this managed database.
+ *
+ * @return the longTermRetentionBackupResourceId value
+ */
+ public String longTermRetentionBackupResourceId() {
+ return this.longTermRetentionBackupResourceId;
+ }
+
+ /**
+ * Set the name of the Long Term Retention backup to be used for restore of this managed database.
+ *
+ * @param longTermRetentionBackupResourceId the longTermRetentionBackupResourceId value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId) {
+ this.longTermRetentionBackupResourceId = longTermRetentionBackupResourceId;
+ return this;
+ }
+
+ /**
+ * Get resource tags.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set resource tags.
+ *
+ * @param tags the tags value to set
+ * @return the ManagedDatabaseUpdate object itself.
+ */
+ public ManagedDatabaseUpdate withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabases.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabases.java
new file mode 100644
index 0000000000000..5633f5645f170
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabases.java
@@ -0,0 +1,70 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.ManagedDatabase;
+import rx.Completable;
+
+/**
+ * Type representing ManagedDatabases.
+ */
+public interface ManagedDatabases {
+ /**
+ * Begins definition for a new Databasis resource.
+ * @param name resource name.
+ * @return the first stage of the new Databasis definition.
+ */
+ ManagedDatabase.DefinitionStages.Blank defineDatabasis(String name);
+
+ /**
+ * Gets a managed database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName);
+
+ /**
+ * Gets a list of managed databases.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByInstanceAsync(final String resourceGroupName, final String managedInstanceName);
+
+ /**
+ * Deletes a managed database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName);
+
+ /**
+ * Completes the restore operation on a managed database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param lastBackupName The last backup name to apply
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable completeRestoreAsync(String resourceGroupName, String managedInstanceName, String databaseName, String lastBackupName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstance.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstance.java
new file mode 100644
index 0000000000000..93ff1bddeae11
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstance.java
@@ -0,0 +1,702 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.ManagedInstanceInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+import org.joda.time.DateTime;
+import java.util.Map;
+
+/**
+ * Type representing ManagedInstance.
+ */
+public interface ManagedInstance extends HasInner, Indexable, Updatable, HasManager {
+ /**
+ * @return the administratorLogin value.
+ */
+ String administratorLogin();
+
+ /**
+ * @return the administratorLoginPassword value.
+ */
+ String administratorLoginPassword();
+
+ /**
+ * @return the collation value.
+ */
+ String collation();
+
+ /**
+ * @return the dnsZone value.
+ */
+ String dnsZone();
+
+ /**
+ * @return the dnsZonePartner value.
+ */
+ String dnsZonePartner();
+
+ /**
+ * @return the fullyQualifiedDomainName value.
+ */
+ String fullyQualifiedDomainName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the identity value.
+ */
+ ResourceIdentity identity();
+
+ /**
+ * @return the instancePoolId value.
+ */
+ String instancePoolId();
+
+ /**
+ * @return the licenseType value.
+ */
+ ManagedInstanceLicenseType licenseType();
+
+ /**
+ * @return the location value.
+ */
+ String location();
+
+ /**
+ * @return the maintenanceConfigurationId value.
+ */
+ String maintenanceConfigurationId();
+
+ /**
+ * @return the managedInstanceCreateMode value.
+ */
+ ManagedServerCreateMode managedInstanceCreateMode();
+
+ /**
+ * @return the minimalTlsVersion value.
+ */
+ String minimalTlsVersion();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the proxyOverride value.
+ */
+ ManagedInstanceProxyOverride proxyOverride();
+
+ /**
+ * @return the publicDataEndpointEnabled value.
+ */
+ Boolean publicDataEndpointEnabled();
+
+ /**
+ * @return the restorePointInTime value.
+ */
+ DateTime restorePointInTime();
+
+ /**
+ * @return the sku value.
+ */
+ Sku sku();
+
+ /**
+ * @return the sourceManagedInstanceId value.
+ */
+ String sourceManagedInstanceId();
+
+ /**
+ * @return the state value.
+ */
+ String state();
+
+ /**
+ * @return the storageSizeInGB value.
+ */
+ Integer storageSizeInGB();
+
+ /**
+ * @return the subnetId value.
+ */
+ String subnetId();
+
+ /**
+ * @return the tags value.
+ */
+ Map tags();
+
+ /**
+ * @return the timezoneId value.
+ */
+ String timezoneId();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the vCores value.
+ */
+ Integer vCores();
+
+ /**
+ * The entirety of the ManagedInstance definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithInstancePool, DefinitionStages.WithLocation, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of ManagedInstance definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a ManagedInstance definition.
+ */
+ interface Blank extends WithInstancePool {
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify InstancePool.
+ */
+ interface WithInstancePool {
+ /**
+ * Specifies resourceGroupName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @return the next definition stage
+ */
+ WithLocation withExistingInstancePool(String resourceGroupName);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify Location.
+ */
+ interface WithLocation {
+ /**
+ * Specifies location.
+ * @param location Resource location
+ * @return the next definition stage
+ */
+ WithCreate withLocation(String location);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify AdministratorLogin.
+ */
+ interface WithAdministratorLogin {
+ /**
+ * Specifies administratorLogin.
+ * @param administratorLogin Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation)
+ * @return the next definition stage
+ */
+ WithCreate withAdministratorLogin(String administratorLogin);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify AdministratorLoginPassword.
+ */
+ interface WithAdministratorLoginPassword {
+ /**
+ * Specifies administratorLoginPassword.
+ * @param administratorLoginPassword The administrator login password (required for managed instance creation)
+ * @return the next definition stage
+ */
+ WithCreate withAdministratorLoginPassword(String administratorLoginPassword);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify Collation.
+ */
+ interface WithCollation {
+ /**
+ * Specifies collation.
+ * @param collation Collation of the managed instance
+ * @return the next definition stage
+ */
+ WithCreate withCollation(String collation);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify DnsZonePartner.
+ */
+ interface WithDnsZonePartner {
+ /**
+ * Specifies dnsZonePartner.
+ * @param dnsZonePartner The resource id of another managed instance whose DNS zone this managed instance will share after creation
+ * @return the next definition stage
+ */
+ WithCreate withDnsZonePartner(String dnsZonePartner);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify Identity.
+ */
+ interface WithIdentity {
+ /**
+ * Specifies identity.
+ * @param identity The Azure Active Directory identity of the managed instance
+ * @return the next definition stage
+ */
+ WithCreate withIdentity(ResourceIdentity identity);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify InstancePoolId.
+ */
+ interface WithInstancePoolId {
+ /**
+ * Specifies instancePoolId.
+ * @param instancePoolId The Id of the instance pool this managed server belongs to
+ * @return the next definition stage
+ */
+ WithCreate withInstancePoolId(String instancePoolId);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify LicenseType.
+ */
+ interface WithLicenseType {
+ /**
+ * Specifies licenseType.
+ * @param licenseType The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Possible values include: 'LicenseIncluded', 'BasePrice'
+ * @return the next definition stage
+ */
+ WithCreate withLicenseType(ManagedInstanceLicenseType licenseType);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify MaintenanceConfigurationId.
+ */
+ interface WithMaintenanceConfigurationId {
+ /**
+ * Specifies maintenanceConfigurationId.
+ * @param maintenanceConfigurationId Specifies maintenance configuration id to apply to this managed instance
+ * @return the next definition stage
+ */
+ WithCreate withMaintenanceConfigurationId(String maintenanceConfigurationId);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify ManagedInstanceCreateMode.
+ */
+ interface WithManagedInstanceCreateMode {
+ /**
+ * Specifies managedInstanceCreateMode.
+ * @param managedInstanceCreateMode Specifies the mode of database creation.
+ Default: Regular instance creation.
+ Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: 'Default', 'PointInTimeRestore'
+ * @return the next definition stage
+ */
+ WithCreate withManagedInstanceCreateMode(ManagedServerCreateMode managedInstanceCreateMode);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify MinimalTlsVersion.
+ */
+ interface WithMinimalTlsVersion {
+ /**
+ * Specifies minimalTlsVersion.
+ * @param minimalTlsVersion Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'
+ * @return the next definition stage
+ */
+ WithCreate withMinimalTlsVersion(String minimalTlsVersion);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify ProxyOverride.
+ */
+ interface WithProxyOverride {
+ /**
+ * Specifies proxyOverride.
+ * @param proxyOverride Connection type used for connecting to the instance. Possible values include: 'Proxy', 'Redirect', 'Default'
+ * @return the next definition stage
+ */
+ WithCreate withProxyOverride(ManagedInstanceProxyOverride proxyOverride);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify PublicDataEndpointEnabled.
+ */
+ interface WithPublicDataEndpointEnabled {
+ /**
+ * Specifies publicDataEndpointEnabled.
+ * @param publicDataEndpointEnabled Whether or not the public data endpoint is enabled
+ * @return the next definition stage
+ */
+ WithCreate withPublicDataEndpointEnabled(Boolean publicDataEndpointEnabled);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify RestorePointInTime.
+ */
+ interface WithRestorePointInTime {
+ /**
+ * Specifies restorePointInTime.
+ * @param restorePointInTime Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database
+ * @return the next definition stage
+ */
+ WithCreate withRestorePointInTime(DateTime restorePointInTime);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, BC_Gen5
+ * @return the next definition stage
+ */
+ WithCreate withSku(Sku sku);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify SourceManagedInstanceId.
+ */
+ interface WithSourceManagedInstanceId {
+ /**
+ * Specifies sourceManagedInstanceId.
+ * @param sourceManagedInstanceId The resource identifier of the source managed instance associated with create operation of this instance
+ * @return the next definition stage
+ */
+ WithCreate withSourceManagedInstanceId(String sourceManagedInstanceId);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify StorageSizeInGB.
+ */
+ interface WithStorageSizeInGB {
+ /**
+ * Specifies storageSizeInGB.
+ * @param storageSizeInGB Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only
+ * @return the next definition stage
+ */
+ WithCreate withStorageSizeInGB(Integer storageSizeInGB);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify SubnetId.
+ */
+ interface WithSubnetId {
+ /**
+ * Specifies subnetId.
+ * @param subnetId Subnet resource ID for the managed instance
+ * @return the next definition stage
+ */
+ WithCreate withSubnetId(String subnetId);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next definition stage
+ */
+ WithCreate withTags(Map tags);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify TimezoneId.
+ */
+ interface WithTimezoneId {
+ /**
+ * Specifies timezoneId.
+ * @param timezoneId Id of the timezone. Allowed values are timezones supported by Windows.
+ Windows keeps details on supported timezones, including the id, in registry under
+ KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
+ You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.
+ List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
+ An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time"
+ * @return the next definition stage
+ */
+ WithCreate withTimezoneId(String timezoneId);
+ }
+
+ /**
+ * The stage of the managedinstance definition allowing to specify VCores.
+ */
+ interface WithVCores {
+ /**
+ * Specifies vCores.
+ * @param vCores The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80
+ * @return the next definition stage
+ */
+ WithCreate withVCores(Integer vCores);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithAdministratorLogin, DefinitionStages.WithAdministratorLoginPassword, DefinitionStages.WithCollation, DefinitionStages.WithDnsZonePartner, DefinitionStages.WithIdentity, DefinitionStages.WithInstancePoolId, DefinitionStages.WithLicenseType, DefinitionStages.WithMaintenanceConfigurationId, DefinitionStages.WithManagedInstanceCreateMode, DefinitionStages.WithMinimalTlsVersion, DefinitionStages.WithProxyOverride, DefinitionStages.WithPublicDataEndpointEnabled, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSku, DefinitionStages.WithSourceManagedInstanceId, DefinitionStages.WithStorageSizeInGB, DefinitionStages.WithSubnetId, DefinitionStages.WithTags, DefinitionStages.WithTimezoneId, DefinitionStages.WithVCores {
+ }
+ }
+ /**
+ * The template for a ManagedInstance update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithAdministratorLogin, UpdateStages.WithAdministratorLoginPassword, UpdateStages.WithCollation, UpdateStages.WithDnsZonePartner, UpdateStages.WithInstancePoolId, UpdateStages.WithLicenseType, UpdateStages.WithMaintenanceConfigurationId, UpdateStages.WithManagedInstanceCreateMode, UpdateStages.WithMinimalTlsVersion, UpdateStages.WithProxyOverride, UpdateStages.WithPublicDataEndpointEnabled, UpdateStages.WithRestorePointInTime, UpdateStages.WithSku, UpdateStages.WithSourceManagedInstanceId, UpdateStages.WithStorageSizeInGB, UpdateStages.WithSubnetId, UpdateStages.WithTags, UpdateStages.WithTimezoneId, UpdateStages.WithVCores {
+ }
+
+ /**
+ * Grouping of ManagedInstance update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the managedinstance update allowing to specify AdministratorLogin.
+ */
+ interface WithAdministratorLogin {
+ /**
+ * Specifies administratorLogin.
+ * @param administratorLogin Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation)
+ * @return the next update stage
+ */
+ Update withAdministratorLogin(String administratorLogin);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify AdministratorLoginPassword.
+ */
+ interface WithAdministratorLoginPassword {
+ /**
+ * Specifies administratorLoginPassword.
+ * @param administratorLoginPassword The administrator login password (required for managed instance creation)
+ * @return the next update stage
+ */
+ Update withAdministratorLoginPassword(String administratorLoginPassword);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify Collation.
+ */
+ interface WithCollation {
+ /**
+ * Specifies collation.
+ * @param collation Collation of the managed instance
+ * @return the next update stage
+ */
+ Update withCollation(String collation);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify DnsZonePartner.
+ */
+ interface WithDnsZonePartner {
+ /**
+ * Specifies dnsZonePartner.
+ * @param dnsZonePartner The resource id of another managed instance whose DNS zone this managed instance will share after creation
+ * @return the next update stage
+ */
+ Update withDnsZonePartner(String dnsZonePartner);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify InstancePoolId.
+ */
+ interface WithInstancePoolId {
+ /**
+ * Specifies instancePoolId.
+ * @param instancePoolId The Id of the instance pool this managed server belongs to
+ * @return the next update stage
+ */
+ Update withInstancePoolId(String instancePoolId);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify LicenseType.
+ */
+ interface WithLicenseType {
+ /**
+ * Specifies licenseType.
+ * @param licenseType The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Possible values include: 'LicenseIncluded', 'BasePrice'
+ * @return the next update stage
+ */
+ Update withLicenseType(ManagedInstanceLicenseType licenseType);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify MaintenanceConfigurationId.
+ */
+ interface WithMaintenanceConfigurationId {
+ /**
+ * Specifies maintenanceConfigurationId.
+ * @param maintenanceConfigurationId Specifies maintenance configuration id to apply to this managed instance
+ * @return the next update stage
+ */
+ Update withMaintenanceConfigurationId(String maintenanceConfigurationId);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify ManagedInstanceCreateMode.
+ */
+ interface WithManagedInstanceCreateMode {
+ /**
+ * Specifies managedInstanceCreateMode.
+ * @param managedInstanceCreateMode Specifies the mode of database creation.
+ Default: Regular instance creation.
+ Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: 'Default', 'PointInTimeRestore'
+ * @return the next update stage
+ */
+ Update withManagedInstanceCreateMode(ManagedServerCreateMode managedInstanceCreateMode);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify MinimalTlsVersion.
+ */
+ interface WithMinimalTlsVersion {
+ /**
+ * Specifies minimalTlsVersion.
+ * @param minimalTlsVersion Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'
+ * @return the next update stage
+ */
+ Update withMinimalTlsVersion(String minimalTlsVersion);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify ProxyOverride.
+ */
+ interface WithProxyOverride {
+ /**
+ * Specifies proxyOverride.
+ * @param proxyOverride Connection type used for connecting to the instance. Possible values include: 'Proxy', 'Redirect', 'Default'
+ * @return the next update stage
+ */
+ Update withProxyOverride(ManagedInstanceProxyOverride proxyOverride);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify PublicDataEndpointEnabled.
+ */
+ interface WithPublicDataEndpointEnabled {
+ /**
+ * Specifies publicDataEndpointEnabled.
+ * @param publicDataEndpointEnabled Whether or not the public data endpoint is enabled
+ * @return the next update stage
+ */
+ Update withPublicDataEndpointEnabled(Boolean publicDataEndpointEnabled);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify RestorePointInTime.
+ */
+ interface WithRestorePointInTime {
+ /**
+ * Specifies restorePointInTime.
+ * @param restorePointInTime Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database
+ * @return the next update stage
+ */
+ Update withRestorePointInTime(DateTime restorePointInTime);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify Sku.
+ */
+ interface WithSku {
+ /**
+ * Specifies sku.
+ * @param sku Managed instance sku
+ * @return the next update stage
+ */
+ Update withSku(Sku sku);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify SourceManagedInstanceId.
+ */
+ interface WithSourceManagedInstanceId {
+ /**
+ * Specifies sourceManagedInstanceId.
+ * @param sourceManagedInstanceId The resource identifier of the source managed instance associated with create operation of this instance
+ * @return the next update stage
+ */
+ Update withSourceManagedInstanceId(String sourceManagedInstanceId);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify StorageSizeInGB.
+ */
+ interface WithStorageSizeInGB {
+ /**
+ * Specifies storageSizeInGB.
+ * @param storageSizeInGB Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only
+ * @return the next update stage
+ */
+ Update withStorageSizeInGB(Integer storageSizeInGB);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify SubnetId.
+ */
+ interface WithSubnetId {
+ /**
+ * Specifies subnetId.
+ * @param subnetId Subnet resource ID for the managed instance
+ * @return the next update stage
+ */
+ Update withSubnetId(String subnetId);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify Tags.
+ */
+ interface WithTags {
+ /**
+ * Specifies tags.
+ * @param tags Resource tags
+ * @return the next update stage
+ */
+ Update withTags(Map tags);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify TimezoneId.
+ */
+ interface WithTimezoneId {
+ /**
+ * Specifies timezoneId.
+ * @param timezoneId Id of the timezone. Allowed values are timezones supported by Windows.
+ Windows keeps details on supported timezones, including the id, in registry under
+ KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
+ You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.
+ List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
+ An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time"
+ * @return the next update stage
+ */
+ Update withTimezoneId(String timezoneId);
+ }
+
+ /**
+ * The stage of the managedinstance update allowing to specify VCores.
+ */
+ interface WithVCores {
+ /**
+ * Specifies vCores.
+ * @param vCores The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80
+ * @return the next update stage
+ */
+ Update withVCores(Integer vCores);
+ }
+
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLicenseType.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLicenseType.java
new file mode 100644
index 0000000000000..15add2f1065de
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLicenseType.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ManagedInstanceLicenseType.
+ */
+public final class ManagedInstanceLicenseType extends ExpandableStringEnum {
+ /** Static value LicenseIncluded for ManagedInstanceLicenseType. */
+ public static final ManagedInstanceLicenseType LICENSE_INCLUDED = fromString("LicenseIncluded");
+
+ /** Static value BasePrice for ManagedInstanceLicenseType. */
+ public static final ManagedInstanceLicenseType BASE_PRICE = fromString("BasePrice");
+
+ /**
+ * Creates or finds a ManagedInstanceLicenseType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ManagedInstanceLicenseType
+ */
+ @JsonCreator
+ public static ManagedInstanceLicenseType fromString(String name) {
+ return fromString(name, ManagedInstanceLicenseType.class);
+ }
+
+ /**
+ * @return known ManagedInstanceLicenseType values
+ */
+ public static Collection values() {
+ return values(ManagedInstanceLicenseType.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLongTermRetentionBackup.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLongTermRetentionBackup.java
new file mode 100644
index 0000000000000..c00d5cb9ca368
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLongTermRetentionBackup.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.ManagedInstanceLongTermRetentionBackupInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing ManagedInstanceLongTermRetentionBackup.
+ */
+public interface ManagedInstanceLongTermRetentionBackup extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the backupExpirationTime value.
+ */
+ DateTime backupExpirationTime();
+
+ /**
+ * @return the backupTime value.
+ */
+ DateTime backupTime();
+
+ /**
+ * @return the databaseDeletionTime value.
+ */
+ DateTime databaseDeletionTime();
+
+ /**
+ * @return the databaseName value.
+ */
+ String databaseName();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the managedInstanceCreateTime value.
+ */
+ DateTime managedInstanceCreateTime();
+
+ /**
+ * @return the managedInstanceName value.
+ */
+ String managedInstanceName();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLongTermRetentionPolicies.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLongTermRetentionPolicies.java
new file mode 100644
index 0000000000000..74486d2ced289
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLongTermRetentionPolicies.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.ManagedInstanceLongTermRetentionPoliciesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ManagedInstanceLongTermRetentionPolicies.
+ */
+public interface ManagedInstanceLongTermRetentionPolicies extends SupportsCreating, HasInner {
+ /**
+ * Gets a managed database's long term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName);
+
+ /**
+ * Gets a database's long term retention policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByDatabaseAsync(final String resourceGroupName, final String managedInstanceName, final String databaseName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLongTermRetentionPolicy.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLongTermRetentionPolicy.java
new file mode 100644
index 0000000000000..d787642524891
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLongTermRetentionPolicy.java
@@ -0,0 +1,205 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.ManagedInstanceLongTermRetentionPolicyInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+
+/**
+ * Type representing ManagedInstanceLongTermRetentionPolicy.
+ */
+public interface ManagedInstanceLongTermRetentionPolicy extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the monthlyRetention value.
+ */
+ String monthlyRetention();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the weeklyRetention value.
+ */
+ String weeklyRetention();
+
+ /**
+ * @return the weekOfYear value.
+ */
+ Integer weekOfYear();
+
+ /**
+ * @return the yearlyRetention value.
+ */
+ String yearlyRetention();
+
+ /**
+ * The entirety of the ManagedInstanceLongTermRetentionPolicy definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDatabasis, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of ManagedInstanceLongTermRetentionPolicy definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a ManagedInstanceLongTermRetentionPolicy definition.
+ */
+ interface Blank extends WithDatabasis {
+ }
+
+ /**
+ * The stage of the managedinstancelongtermretentionpolicy definition allowing to specify Databasis.
+ */
+ interface WithDatabasis {
+ /**
+ * Specifies resourceGroupName, managedInstanceName, databaseName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param managedInstanceName The name of the managed instance
+ * @param databaseName The name of the database
+ * @return the next definition stage
+ */
+ WithCreate withExistingDatabasis(String resourceGroupName, String managedInstanceName, String databaseName);
+ }
+
+ /**
+ * The stage of the managedinstancelongtermretentionpolicy definition allowing to specify MonthlyRetention.
+ */
+ interface WithMonthlyRetention {
+ /**
+ * Specifies monthlyRetention.
+ * @param monthlyRetention The monthly retention policy for an LTR backup in an ISO 8601 format
+ * @return the next definition stage
+ */
+ WithCreate withMonthlyRetention(String monthlyRetention);
+ }
+
+ /**
+ * The stage of the managedinstancelongtermretentionpolicy definition allowing to specify WeeklyRetention.
+ */
+ interface WithWeeklyRetention {
+ /**
+ * Specifies weeklyRetention.
+ * @param weeklyRetention The weekly retention policy for an LTR backup in an ISO 8601 format
+ * @return the next definition stage
+ */
+ WithCreate withWeeklyRetention(String weeklyRetention);
+ }
+
+ /**
+ * The stage of the managedinstancelongtermretentionpolicy definition allowing to specify WeekOfYear.
+ */
+ interface WithWeekOfYear {
+ /**
+ * Specifies weekOfYear.
+ * @param weekOfYear The week of year to take the yearly backup in an ISO 8601 format
+ * @return the next definition stage
+ */
+ WithCreate withWeekOfYear(Integer weekOfYear);
+ }
+
+ /**
+ * The stage of the managedinstancelongtermretentionpolicy definition allowing to specify YearlyRetention.
+ */
+ interface WithYearlyRetention {
+ /**
+ * Specifies yearlyRetention.
+ * @param yearlyRetention The yearly retention policy for an LTR backup in an ISO 8601 format
+ * @return the next definition stage
+ */
+ WithCreate withYearlyRetention(String yearlyRetention);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithMonthlyRetention, DefinitionStages.WithWeeklyRetention, DefinitionStages.WithWeekOfYear, DefinitionStages.WithYearlyRetention {
+ }
+ }
+ /**
+ * The template for a ManagedInstanceLongTermRetentionPolicy update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithMonthlyRetention, UpdateStages.WithWeeklyRetention, UpdateStages.WithWeekOfYear, UpdateStages.WithYearlyRetention {
+ }
+
+ /**
+ * Grouping of ManagedInstanceLongTermRetentionPolicy update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the managedinstancelongtermretentionpolicy update allowing to specify MonthlyRetention.
+ */
+ interface WithMonthlyRetention {
+ /**
+ * Specifies monthlyRetention.
+ * @param monthlyRetention The monthly retention policy for an LTR backup in an ISO 8601 format
+ * @return the next update stage
+ */
+ Update withMonthlyRetention(String monthlyRetention);
+ }
+
+ /**
+ * The stage of the managedinstancelongtermretentionpolicy update allowing to specify WeeklyRetention.
+ */
+ interface WithWeeklyRetention {
+ /**
+ * Specifies weeklyRetention.
+ * @param weeklyRetention The weekly retention policy for an LTR backup in an ISO 8601 format
+ * @return the next update stage
+ */
+ Update withWeeklyRetention(String weeklyRetention);
+ }
+
+ /**
+ * The stage of the managedinstancelongtermretentionpolicy update allowing to specify WeekOfYear.
+ */
+ interface WithWeekOfYear {
+ /**
+ * Specifies weekOfYear.
+ * @param weekOfYear The week of year to take the yearly backup in an ISO 8601 format
+ * @return the next update stage
+ */
+ Update withWeekOfYear(Integer weekOfYear);
+ }
+
+ /**
+ * The stage of the managedinstancelongtermretentionpolicy update allowing to specify YearlyRetention.
+ */
+ interface WithYearlyRetention {
+ /**
+ * Specifies yearlyRetention.
+ * @param yearlyRetention The yearly retention policy for an LTR backup in an ISO 8601 format
+ * @return the next update stage
+ */
+ Update withYearlyRetention(String yearlyRetention);
+ }
+
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperation.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperation.java
new file mode 100644
index 0000000000000..4462343266690
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperation.java
@@ -0,0 +1,113 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.ManagedInstanceOperationInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing ManagedInstanceOperation.
+ */
+public interface ManagedInstanceOperation extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the description value.
+ */
+ String description();
+
+ /**
+ * @return the errorCode value.
+ */
+ Integer errorCode();
+
+ /**
+ * @return the errorDescription value.
+ */
+ String errorDescription();
+
+ /**
+ * @return the errorSeverity value.
+ */
+ Integer errorSeverity();
+
+ /**
+ * @return the estimatedCompletionTime value.
+ */
+ DateTime estimatedCompletionTime();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the isCancellable value.
+ */
+ Boolean isCancellable();
+
+ /**
+ * @return the isUserError value.
+ */
+ Boolean isUserError();
+
+ /**
+ * @return the managedInstanceName value.
+ */
+ String managedInstanceName();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the operation value.
+ */
+ String operation();
+
+ /**
+ * @return the operationFriendlyName value.
+ */
+ String operationFriendlyName();
+
+ /**
+ * @return the operationParameters value.
+ */
+ ManagedInstanceOperationParametersPair operationParameters();
+
+ /**
+ * @return the operationSteps value.
+ */
+ ManagedInstanceOperationSteps operationSteps();
+
+ /**
+ * @return the percentComplete value.
+ */
+ Integer percentComplete();
+
+ /**
+ * @return the startTime value.
+ */
+ DateTime startTime();
+
+ /**
+ * @return the state value.
+ */
+ ManagementOperationState state();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperationParametersPair.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperationParametersPair.java
new file mode 100644
index 0000000000000..09968b76157e9
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperationParametersPair.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The parameters of a managed instance operation.
+ */
+public class ManagedInstanceOperationParametersPair {
+ /**
+ * The current parameters.
+ */
+ @JsonProperty(value = "currentParameters", access = JsonProperty.Access.WRITE_ONLY)
+ private UpsertManagedServerOperationParameters currentParameters;
+
+ /**
+ * The requested parameters.
+ */
+ @JsonProperty(value = "requestedParameters", access = JsonProperty.Access.WRITE_ONLY)
+ private UpsertManagedServerOperationParameters requestedParameters;
+
+ /**
+ * Get the current parameters.
+ *
+ * @return the currentParameters value
+ */
+ public UpsertManagedServerOperationParameters currentParameters() {
+ return this.currentParameters;
+ }
+
+ /**
+ * Get the requested parameters.
+ *
+ * @return the requestedParameters value
+ */
+ public UpsertManagedServerOperationParameters requestedParameters() {
+ return this.requestedParameters;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperationSteps.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperationSteps.java
new file mode 100644
index 0000000000000..2066adaba9e46
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperationSteps.java
@@ -0,0 +1,63 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The steps of a managed instance operation.
+ */
+public class ManagedInstanceOperationSteps {
+ /**
+ * The total number of operation steps.
+ */
+ @JsonProperty(value = "totalSteps", access = JsonProperty.Access.WRITE_ONLY)
+ private String totalSteps;
+
+ /**
+ * The number of current operation steps.
+ */
+ @JsonProperty(value = "currentStep", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer currentStep;
+
+ /**
+ * The operation steps list.
+ */
+ @JsonProperty(value = "stepsList", access = JsonProperty.Access.WRITE_ONLY)
+ private List stepsList;
+
+ /**
+ * Get the total number of operation steps.
+ *
+ * @return the totalSteps value
+ */
+ public String totalSteps() {
+ return this.totalSteps;
+ }
+
+ /**
+ * Get the number of current operation steps.
+ *
+ * @return the currentStep value
+ */
+ public Integer currentStep() {
+ return this.currentStep;
+ }
+
+ /**
+ * Get the operation steps list.
+ *
+ * @return the stepsList value
+ */
+ public List stepsList() {
+ return this.stepsList;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperations.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperations.java
new file mode 100644
index 0000000000000..8d5b9fbb7be77
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceOperations.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.ManagedInstanceOperation;
+
+/**
+ * Type representing ManagedInstanceOperations.
+ */
+public interface ManagedInstanceOperations {
+ /**
+ * Gets a management operation on a managed instance.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param operationId the UUID value
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName, UUID operationId);
+
+ /**
+ * Gets a list of operations performed on the managed instance.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByManagedInstanceAsync(final String resourceGroupName, final String managedInstanceName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceProxyOverride.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceProxyOverride.java
new file mode 100644
index 0000000000000..58fa06c5df64b
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceProxyOverride.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ManagedInstanceProxyOverride.
+ */
+public final class ManagedInstanceProxyOverride extends ExpandableStringEnum {
+ /** Static value Proxy for ManagedInstanceProxyOverride. */
+ public static final ManagedInstanceProxyOverride PROXY = fromString("Proxy");
+
+ /** Static value Redirect for ManagedInstanceProxyOverride. */
+ public static final ManagedInstanceProxyOverride REDIRECT = fromString("Redirect");
+
+ /** Static value Default for ManagedInstanceProxyOverride. */
+ public static final ManagedInstanceProxyOverride DEFAULT = fromString("Default");
+
+ /**
+ * Creates or finds a ManagedInstanceProxyOverride from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ManagedInstanceProxyOverride
+ */
+ @JsonCreator
+ public static ManagedInstanceProxyOverride fromString(String name) {
+ return fromString(name, ManagedInstanceProxyOverride.class);
+ }
+
+ /**
+ * @return known ManagedInstanceProxyOverride values
+ */
+ public static Collection values() {
+ return values(ManagedInstanceProxyOverride.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceUpdate.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceUpdate.java
new file mode 100644
index 0000000000000..299010982f56c
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceUpdate.java
@@ -0,0 +1,602 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import org.joda.time.DateTime;
+import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+
+/**
+ * An update request for an Azure SQL Database managed instance.
+ */
+@JsonFlatten
+public class ManagedInstanceUpdate {
+ /**
+ * Managed instance sku.
+ */
+ @JsonProperty(value = "sku")
+ private Sku sku;
+
+ /**
+ * Specifies the mode of database creation.
+ *
+ * Default: Regular instance creation.
+ *
+ * Restore: Creates an instance by restoring a set of backups to specific
+ * point in time. RestorePointInTime and SourceManagedInstanceId must be
+ * specified. Possible values include: 'Default', 'PointInTimeRestore'.
+ */
+ @JsonProperty(value = "properties.managedInstanceCreateMode")
+ private ManagedServerCreateMode managedInstanceCreateMode;
+
+ /**
+ * The fully qualified domain name of the managed instance.
+ */
+ @JsonProperty(value = "properties.fullyQualifiedDomainName", access = JsonProperty.Access.WRITE_ONLY)
+ private String fullyQualifiedDomainName;
+
+ /**
+ * Administrator username for the managed instance. Can only be specified
+ * when the managed instance is being created (and is required for
+ * creation).
+ */
+ @JsonProperty(value = "properties.administratorLogin")
+ private String administratorLogin;
+
+ /**
+ * The administrator login password (required for managed instance
+ * creation).
+ */
+ @JsonProperty(value = "properties.administratorLoginPassword")
+ private String administratorLoginPassword;
+
+ /**
+ * Subnet resource ID for the managed instance.
+ */
+ @JsonProperty(value = "properties.subnetId")
+ private String subnetId;
+
+ /**
+ * The state of the managed instance.
+ */
+ @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
+ private String state;
+
+ /**
+ * The license type. Possible values are 'LicenseIncluded' (regular price
+ * inclusive of a new SQL license) and 'BasePrice' (discounted AHB price
+ * for bringing your own SQL licenses). Possible values include:
+ * 'LicenseIncluded', 'BasePrice'.
+ */
+ @JsonProperty(value = "properties.licenseType")
+ private ManagedInstanceLicenseType licenseType;
+
+ /**
+ * The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80.
+ */
+ @JsonProperty(value = "properties.vCores")
+ private Integer vCores;
+
+ /**
+ * Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments
+ * of 32 GB allowed only.
+ */
+ @JsonProperty(value = "properties.storageSizeInGB")
+ private Integer storageSizeInGB;
+
+ /**
+ * Collation of the managed instance.
+ */
+ @JsonProperty(value = "properties.collation")
+ private String collation;
+
+ /**
+ * The Dns Zone that the managed instance is in.
+ */
+ @JsonProperty(value = "properties.dnsZone", access = JsonProperty.Access.WRITE_ONLY)
+ private String dnsZone;
+
+ /**
+ * The resource id of another managed instance whose DNS zone this managed
+ * instance will share after creation.
+ */
+ @JsonProperty(value = "properties.dnsZonePartner")
+ private String dnsZonePartner;
+
+ /**
+ * Whether or not the public data endpoint is enabled.
+ */
+ @JsonProperty(value = "properties.publicDataEndpointEnabled")
+ private Boolean publicDataEndpointEnabled;
+
+ /**
+ * The resource identifier of the source managed instance associated with
+ * create operation of this instance.
+ */
+ @JsonProperty(value = "properties.sourceManagedInstanceId")
+ private String sourceManagedInstanceId;
+
+ /**
+ * Specifies the point in time (ISO8601 format) of the source database that
+ * will be restored to create the new database.
+ */
+ @JsonProperty(value = "properties.restorePointInTime")
+ private DateTime restorePointInTime;
+
+ /**
+ * Connection type used for connecting to the instance. Possible values
+ * include: 'Proxy', 'Redirect', 'Default'.
+ */
+ @JsonProperty(value = "properties.proxyOverride")
+ private ManagedInstanceProxyOverride proxyOverride;
+
+ /**
+ * Id of the timezone. Allowed values are timezones supported by Windows.
+ * Windows keeps details on supported timezones, including the id, in
+ * registry under
+ * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time
+ * Zones.
+ * You can get those registry values via SQL Server by querying SELECT name
+ * AS timezone_id FROM sys.time_zone_info.
+ * List of Ids can also be obtained by executing
+ * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
+ * An example of valid timezone id is "Pacific Standard Time" or "W. Europe
+ * Standard Time".
+ */
+ @JsonProperty(value = "properties.timezoneId")
+ private String timezoneId;
+
+ /**
+ * The Id of the instance pool this managed server belongs to.
+ */
+ @JsonProperty(value = "properties.instancePoolId")
+ private String instancePoolId;
+
+ /**
+ * Specifies maintenance configuration id to apply to this managed
+ * instance.
+ */
+ @JsonProperty(value = "properties.maintenanceConfigurationId")
+ private String maintenanceConfigurationId;
+
+ /**
+ * Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'.
+ */
+ @JsonProperty(value = "properties.minimalTlsVersion")
+ private String minimalTlsVersion;
+
+ /**
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get managed instance sku.
+ *
+ * @return the sku value
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set managed instance sku.
+ *
+ * @param sku the sku value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get specifies the mode of database creation.
+ Default: Regular instance creation.
+ Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: 'Default', 'PointInTimeRestore'.
+ *
+ * @return the managedInstanceCreateMode value
+ */
+ public ManagedServerCreateMode managedInstanceCreateMode() {
+ return this.managedInstanceCreateMode;
+ }
+
+ /**
+ * Set specifies the mode of database creation.
+ Default: Regular instance creation.
+ Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. Possible values include: 'Default', 'PointInTimeRestore'.
+ *
+ * @param managedInstanceCreateMode the managedInstanceCreateMode value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withManagedInstanceCreateMode(ManagedServerCreateMode managedInstanceCreateMode) {
+ this.managedInstanceCreateMode = managedInstanceCreateMode;
+ return this;
+ }
+
+ /**
+ * Get the fully qualified domain name of the managed instance.
+ *
+ * @return the fullyQualifiedDomainName value
+ */
+ public String fullyQualifiedDomainName() {
+ return this.fullyQualifiedDomainName;
+ }
+
+ /**
+ * Get administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation).
+ *
+ * @return the administratorLogin value
+ */
+ public String administratorLogin() {
+ return this.administratorLogin;
+ }
+
+ /**
+ * Set administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation).
+ *
+ * @param administratorLogin the administratorLogin value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withAdministratorLogin(String administratorLogin) {
+ this.administratorLogin = administratorLogin;
+ return this;
+ }
+
+ /**
+ * Get the administrator login password (required for managed instance creation).
+ *
+ * @return the administratorLoginPassword value
+ */
+ public String administratorLoginPassword() {
+ return this.administratorLoginPassword;
+ }
+
+ /**
+ * Set the administrator login password (required for managed instance creation).
+ *
+ * @param administratorLoginPassword the administratorLoginPassword value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withAdministratorLoginPassword(String administratorLoginPassword) {
+ this.administratorLoginPassword = administratorLoginPassword;
+ return this;
+ }
+
+ /**
+ * Get subnet resource ID for the managed instance.
+ *
+ * @return the subnetId value
+ */
+ public String subnetId() {
+ return this.subnetId;
+ }
+
+ /**
+ * Set subnet resource ID for the managed instance.
+ *
+ * @param subnetId the subnetId value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withSubnetId(String subnetId) {
+ this.subnetId = subnetId;
+ return this;
+ }
+
+ /**
+ * Get the state of the managed instance.
+ *
+ * @return the state value
+ */
+ public String state() {
+ return this.state;
+ }
+
+ /**
+ * Get the license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Possible values include: 'LicenseIncluded', 'BasePrice'.
+ *
+ * @return the licenseType value
+ */
+ public ManagedInstanceLicenseType licenseType() {
+ return this.licenseType;
+ }
+
+ /**
+ * Set the license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). Possible values include: 'LicenseIncluded', 'BasePrice'.
+ *
+ * @param licenseType the licenseType value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withLicenseType(ManagedInstanceLicenseType licenseType) {
+ this.licenseType = licenseType;
+ return this;
+ }
+
+ /**
+ * Get the number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80.
+ *
+ * @return the vCores value
+ */
+ public Integer vCores() {
+ return this.vCores;
+ }
+
+ /**
+ * Set the number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80.
+ *
+ * @param vCores the vCores value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withVCores(Integer vCores) {
+ this.vCores = vCores;
+ return this;
+ }
+
+ /**
+ * Get storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only.
+ *
+ * @return the storageSizeInGB value
+ */
+ public Integer storageSizeInGB() {
+ return this.storageSizeInGB;
+ }
+
+ /**
+ * Set storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only.
+ *
+ * @param storageSizeInGB the storageSizeInGB value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withStorageSizeInGB(Integer storageSizeInGB) {
+ this.storageSizeInGB = storageSizeInGB;
+ return this;
+ }
+
+ /**
+ * Get collation of the managed instance.
+ *
+ * @return the collation value
+ */
+ public String collation() {
+ return this.collation;
+ }
+
+ /**
+ * Set collation of the managed instance.
+ *
+ * @param collation the collation value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withCollation(String collation) {
+ this.collation = collation;
+ return this;
+ }
+
+ /**
+ * Get the Dns Zone that the managed instance is in.
+ *
+ * @return the dnsZone value
+ */
+ public String dnsZone() {
+ return this.dnsZone;
+ }
+
+ /**
+ * Get the resource id of another managed instance whose DNS zone this managed instance will share after creation.
+ *
+ * @return the dnsZonePartner value
+ */
+ public String dnsZonePartner() {
+ return this.dnsZonePartner;
+ }
+
+ /**
+ * Set the resource id of another managed instance whose DNS zone this managed instance will share after creation.
+ *
+ * @param dnsZonePartner the dnsZonePartner value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withDnsZonePartner(String dnsZonePartner) {
+ this.dnsZonePartner = dnsZonePartner;
+ return this;
+ }
+
+ /**
+ * Get whether or not the public data endpoint is enabled.
+ *
+ * @return the publicDataEndpointEnabled value
+ */
+ public Boolean publicDataEndpointEnabled() {
+ return this.publicDataEndpointEnabled;
+ }
+
+ /**
+ * Set whether or not the public data endpoint is enabled.
+ *
+ * @param publicDataEndpointEnabled the publicDataEndpointEnabled value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withPublicDataEndpointEnabled(Boolean publicDataEndpointEnabled) {
+ this.publicDataEndpointEnabled = publicDataEndpointEnabled;
+ return this;
+ }
+
+ /**
+ * Get the resource identifier of the source managed instance associated with create operation of this instance.
+ *
+ * @return the sourceManagedInstanceId value
+ */
+ public String sourceManagedInstanceId() {
+ return this.sourceManagedInstanceId;
+ }
+
+ /**
+ * Set the resource identifier of the source managed instance associated with create operation of this instance.
+ *
+ * @param sourceManagedInstanceId the sourceManagedInstanceId value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withSourceManagedInstanceId(String sourceManagedInstanceId) {
+ this.sourceManagedInstanceId = sourceManagedInstanceId;
+ return this;
+ }
+
+ /**
+ * Get specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
+ *
+ * @return the restorePointInTime value
+ */
+ public DateTime restorePointInTime() {
+ return this.restorePointInTime;
+ }
+
+ /**
+ * Set specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
+ *
+ * @param restorePointInTime the restorePointInTime value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withRestorePointInTime(DateTime restorePointInTime) {
+ this.restorePointInTime = restorePointInTime;
+ return this;
+ }
+
+ /**
+ * Get connection type used for connecting to the instance. Possible values include: 'Proxy', 'Redirect', 'Default'.
+ *
+ * @return the proxyOverride value
+ */
+ public ManagedInstanceProxyOverride proxyOverride() {
+ return this.proxyOverride;
+ }
+
+ /**
+ * Set connection type used for connecting to the instance. Possible values include: 'Proxy', 'Redirect', 'Default'.
+ *
+ * @param proxyOverride the proxyOverride value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withProxyOverride(ManagedInstanceProxyOverride proxyOverride) {
+ this.proxyOverride = proxyOverride;
+ return this;
+ }
+
+ /**
+ * Get id of the timezone. Allowed values are timezones supported by Windows.
+ Windows keeps details on supported timezones, including the id, in registry under
+ KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
+ You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.
+ List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
+ An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time".
+ *
+ * @return the timezoneId value
+ */
+ public String timezoneId() {
+ return this.timezoneId;
+ }
+
+ /**
+ * Set id of the timezone. Allowed values are timezones supported by Windows.
+ Windows keeps details on supported timezones, including the id, in registry under
+ KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.
+ You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info.
+ List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell.
+ An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time".
+ *
+ * @param timezoneId the timezoneId value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withTimezoneId(String timezoneId) {
+ this.timezoneId = timezoneId;
+ return this;
+ }
+
+ /**
+ * Get the Id of the instance pool this managed server belongs to.
+ *
+ * @return the instancePoolId value
+ */
+ public String instancePoolId() {
+ return this.instancePoolId;
+ }
+
+ /**
+ * Set the Id of the instance pool this managed server belongs to.
+ *
+ * @param instancePoolId the instancePoolId value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withInstancePoolId(String instancePoolId) {
+ this.instancePoolId = instancePoolId;
+ return this;
+ }
+
+ /**
+ * Get specifies maintenance configuration id to apply to this managed instance.
+ *
+ * @return the maintenanceConfigurationId value
+ */
+ public String maintenanceConfigurationId() {
+ return this.maintenanceConfigurationId;
+ }
+
+ /**
+ * Set specifies maintenance configuration id to apply to this managed instance.
+ *
+ * @param maintenanceConfigurationId the maintenanceConfigurationId value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withMaintenanceConfigurationId(String maintenanceConfigurationId) {
+ this.maintenanceConfigurationId = maintenanceConfigurationId;
+ return this;
+ }
+
+ /**
+ * Get minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'.
+ *
+ * @return the minimalTlsVersion value
+ */
+ public String minimalTlsVersion() {
+ return this.minimalTlsVersion;
+ }
+
+ /**
+ * Set minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'.
+ *
+ * @param minimalTlsVersion the minimalTlsVersion value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withMinimalTlsVersion(String minimalTlsVersion) {
+ this.minimalTlsVersion = minimalTlsVersion;
+ return this;
+ }
+
+ /**
+ * Get resource tags.
+ *
+ * @return the tags value
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set resource tags.
+ *
+ * @param tags the tags value to set
+ * @return the ManagedInstanceUpdate object itself.
+ */
+ public ManagedInstanceUpdate withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceVulnerabilityAssessment.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceVulnerabilityAssessment.java
index ffae1802476df..762197872f648 100644
--- a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceVulnerabilityAssessment.java
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceVulnerabilityAssessment.java
@@ -128,7 +128,7 @@ interface WithStorageAccountAccessKey {
interface WithStorageContainerSasKey {
/**
* Specifies storageContainerSasKey.
- * @param storageContainerSasKey A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required
+ * @param storageContainerSasKey A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required
* @return the next definition stage
*/
WithCreate withStorageContainerSasKey(String storageContainerSasKey);
@@ -182,7 +182,7 @@ interface WithStorageAccountAccessKey {
interface WithStorageContainerSasKey {
/**
* Specifies storageContainerSasKey.
- * @param storageContainerSasKey A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required
+ * @param storageContainerSasKey A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required
* @return the next update stage
*/
Update withStorageContainerSasKey(String storageContainerSasKey);
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstances.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstances.java
new file mode 100644
index 0000000000000..13c10cae8766c
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstances.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Observable;
+import rx.Completable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.ManagedInstancesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ManagedInstances.
+ */
+public interface ManagedInstances extends SupportsCreating, HasInner {
+ /**
+ * Gets a managed instance.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getByResourceGroupAsync(String resourceGroupName, String managedInstanceName);
+
+ /**
+ * Deletes a managed instance.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String managedInstanceName);
+
+ /**
+ * Gets a list of managed instances in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByResourceGroupAsync(final String resourceGroupName);
+
+ /**
+ * Gets a list of all managed instances in the subscription.
+ *
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync();
+
+ /**
+ * Gets a list of all managed instances in an instance pool.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The instance pool name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByInstancePoolAsync(final String resourceGroupName, final String instancePoolName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedServerCreateMode.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedServerCreateMode.java
new file mode 100644
index 0000000000000..dbf9d80629613
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedServerCreateMode.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ManagedServerCreateMode.
+ */
+public final class ManagedServerCreateMode extends ExpandableStringEnum {
+ /** Static value Default for ManagedServerCreateMode. */
+ public static final ManagedServerCreateMode DEFAULT = fromString("Default");
+
+ /** Static value PointInTimeRestore for ManagedServerCreateMode. */
+ public static final ManagedServerCreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore");
+
+ /**
+ * Creates or finds a ManagedServerCreateMode from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ManagedServerCreateMode
+ */
+ @JsonCreator
+ public static ManagedServerCreateMode fromString(String name) {
+ return fromString(name, ManagedServerCreateMode.class);
+ }
+
+ /**
+ * @return known ManagedServerCreateMode values
+ */
+ public static Collection values() {
+ return values(ManagedServerCreateMode.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagementOperationState.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagementOperationState.java
new file mode 100644
index 0000000000000..9adf67dd7d599
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagementOperationState.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ManagementOperationState.
+ */
+public final class ManagementOperationState extends ExpandableStringEnum {
+ /** Static value Pending for ManagementOperationState. */
+ public static final ManagementOperationState PENDING = fromString("Pending");
+
+ /** Static value InProgress for ManagementOperationState. */
+ public static final ManagementOperationState IN_PROGRESS = fromString("InProgress");
+
+ /** Static value Succeeded for ManagementOperationState. */
+ public static final ManagementOperationState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for ManagementOperationState. */
+ public static final ManagementOperationState FAILED = fromString("Failed");
+
+ /** Static value CancelInProgress for ManagementOperationState. */
+ public static final ManagementOperationState CANCEL_IN_PROGRESS = fromString("CancelInProgress");
+
+ /** Static value Cancelled for ManagementOperationState. */
+ public static final ManagementOperationState CANCELLED = fromString("Cancelled");
+
+ /**
+ * Creates or finds a ManagementOperationState from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ManagementOperationState
+ */
+ @JsonCreator
+ public static ManagementOperationState fromString(String name) {
+ return fromString(name, ManagementOperationState.class);
+ }
+
+ /**
+ * @return known ManagementOperationState values
+ */
+ public static Collection values() {
+ return values(ManagementOperationState.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Name.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Name.java
new file mode 100644
index 0000000000000..84e216d07f39a
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Name.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * ARM Usage Name.
+ */
+public class Name {
+ /**
+ * Usage name value.
+ */
+ @JsonProperty(value = "value")
+ private String value;
+
+ /**
+ * Usage name localized value.
+ */
+ @JsonProperty(value = "localizedValue")
+ private String localizedValue;
+
+ /**
+ * Get usage name value.
+ *
+ * @return the value value
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set usage name value.
+ *
+ * @param value the value value to set
+ * @return the Name object itself.
+ */
+ public Name withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get usage name localized value.
+ *
+ * @return the localizedValue value
+ */
+ public String localizedValue() {
+ return this.localizedValue;
+ }
+
+ /**
+ * Set usage name localized value.
+ *
+ * @param localizedValue the localizedValue value to set
+ * @return the Name object itself.
+ */
+ public Name withLocalizedValue(String localizedValue) {
+ this.localizedValue = localizedValue;
+ return this;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateEndpointConnection.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateEndpointConnection.java
new file mode 100644
index 0000000000000..ece75b931d3dd
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateEndpointConnection.java
@@ -0,0 +1,151 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.PrivateEndpointConnectionInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+
+/**
+ * Type representing PrivateEndpointConnection.
+ */
+public interface PrivateEndpointConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the privateEndpoint value.
+ */
+ PrivateEndpointProperty privateEndpoint();
+
+ /**
+ * @return the privateLinkServiceConnectionState value.
+ */
+ PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState();
+
+ /**
+ * @return the provisioningState value.
+ */
+ String provisioningState();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the PrivateEndpointConnection definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithServer, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of PrivateEndpointConnection definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a PrivateEndpointConnection definition.
+ */
+ interface Blank extends WithServer {
+ }
+
+ /**
+ * The stage of the privateendpointconnection definition allowing to specify Server.
+ */
+ interface WithServer {
+ /**
+ * Specifies resourceGroupName, serverName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param serverName The name of the server
+ * @return the next definition stage
+ */
+ WithCreate withExistingServer(String resourceGroupName, String serverName);
+ }
+
+ /**
+ * The stage of the privateendpointconnection definition allowing to specify PrivateEndpoint.
+ */
+ interface WithPrivateEndpoint {
+ /**
+ * Specifies privateEndpoint.
+ * @param privateEndpoint Private endpoint which the connection belongs to
+ * @return the next definition stage
+ */
+ WithCreate withPrivateEndpoint(PrivateEndpointProperty privateEndpoint);
+ }
+
+ /**
+ * The stage of the privateendpointconnection definition allowing to specify PrivateLinkServiceConnectionState.
+ */
+ interface WithPrivateLinkServiceConnectionState {
+ /**
+ * Specifies privateLinkServiceConnectionState.
+ * @param privateLinkServiceConnectionState Connection state of the private endpoint connection
+ * @return the next definition stage
+ */
+ WithCreate withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState {
+ }
+ }
+ /**
+ * The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState {
+ }
+
+ /**
+ * Grouping of PrivateEndpointConnection update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the privateendpointconnection update allowing to specify PrivateEndpoint.
+ */
+ interface WithPrivateEndpoint {
+ /**
+ * Specifies privateEndpoint.
+ * @param privateEndpoint Private endpoint which the connection belongs to
+ * @return the next update stage
+ */
+ Update withPrivateEndpoint(PrivateEndpointProperty privateEndpoint);
+ }
+
+ /**
+ * The stage of the privateendpointconnection update allowing to specify PrivateLinkServiceConnectionState.
+ */
+ interface WithPrivateLinkServiceConnectionState {
+ /**
+ * Specifies privateLinkServiceConnectionState.
+ * @param privateLinkServiceConnectionState Connection state of the private endpoint connection
+ * @return the next update stage
+ */
+ Update withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState);
+ }
+
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateEndpointConnections.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateEndpointConnections.java
new file mode 100644
index 0000000000000..b3c62e7b4b6a2
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateEndpointConnections.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.PrivateEndpointConnectionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PrivateEndpointConnections.
+ */
+public interface PrivateEndpointConnections extends SupportsCreating, HasInner {
+ /**
+ * Gets a private endpoint connection.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName The name of the private endpoint connection.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName);
+
+ /**
+ * Gets all private endpoint connections on a server.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByServerAsync(final String resourceGroupName, final String serverName);
+
+ /**
+ * Deletes a private endpoint connection with a given name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param privateEndpointConnectionName the String value
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String serverName, String privateEndpointConnectionName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateEndpointProperty.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateEndpointProperty.java
new file mode 100644
index 0000000000000..07284fd41b8c7
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateEndpointProperty.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The PrivateEndpointProperty model.
+ */
+public class PrivateEndpointProperty {
+ /**
+ * Resource id of the private endpoint.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /**
+ * Get resource id of the private endpoint.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set resource id of the private endpoint.
+ *
+ * @param id the id value to set
+ * @return the PrivateEndpointProperty object itself.
+ */
+ public PrivateEndpointProperty withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateLinkServiceConnectionStateProperty.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateLinkServiceConnectionStateProperty.java
new file mode 100644
index 0000000000000..73eee4cd10313
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/PrivateLinkServiceConnectionStateProperty.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The PrivateLinkServiceConnectionStateProperty model.
+ */
+public class PrivateLinkServiceConnectionStateProperty {
+ /**
+ * The private link service connection status.
+ */
+ @JsonProperty(value = "status", required = true)
+ private String status;
+
+ /**
+ * The private link service connection description.
+ */
+ @JsonProperty(value = "description", required = true)
+ private String description;
+
+ /**
+ * The actions required for private link service connection.
+ */
+ @JsonProperty(value = "actionsRequired", access = JsonProperty.Access.WRITE_ONLY)
+ private String actionsRequired;
+
+ /**
+ * Get the private link service connection status.
+ *
+ * @return the status value
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the private link service connection status.
+ *
+ * @param status the status value to set
+ * @return the PrivateLinkServiceConnectionStateProperty object itself.
+ */
+ public PrivateLinkServiceConnectionStateProperty withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the private link service connection description.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the private link service connection description.
+ *
+ * @param description the description value to set
+ * @return the PrivateLinkServiceConnectionStateProperty object itself.
+ */
+ public PrivateLinkServiceConnectionStateProperty withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the actions required for private link service connection.
+ *
+ * @return the actionsRequired value
+ */
+ public String actionsRequired() {
+ return this.actionsRequired;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/RecommendedSensitivityLabels.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/RecommendedSensitivityLabels.java
new file mode 100644
index 0000000000000..41215ae3945dd
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/RecommendedSensitivityLabels.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SensitivityLabelInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+
+/**
+ * Type representing RecommendedSensitivityLabels.
+ */
+public interface RecommendedSensitivityLabels extends HasInner, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the informationType value.
+ */
+ String informationType();
+
+ /**
+ * @return the informationTypeId value.
+ */
+ String informationTypeId();
+
+ /**
+ * @return the isDisabled value.
+ */
+ Boolean isDisabled();
+
+ /**
+ * @return the labelId value.
+ */
+ String labelId();
+
+ /**
+ * @return the labelName value.
+ */
+ String labelName();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the rank value.
+ */
+ SensitivityLabelRank rank();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ReplicaType.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ReplicaType.java
new file mode 100644
index 0000000000000..0d82dbd3a939c
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ReplicaType.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ReplicaType.
+ */
+public final class ReplicaType extends ExpandableStringEnum {
+ /** Static value Primary for ReplicaType. */
+ public static final ReplicaType PRIMARY = fromString("Primary");
+
+ /** Static value ReadableSecondary for ReplicaType. */
+ public static final ReplicaType READABLE_SECONDARY = fromString("ReadableSecondary");
+
+ /**
+ * Creates or finds a ReplicaType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ReplicaType
+ */
+ @JsonCreator
+ public static ReplicaType fromString(String name) {
+ return fromString(name, ReplicaType.class);
+ }
+
+ /**
+ * @return known ReplicaType values
+ */
+ public static Collection values() {
+ return values(ReplicaType.class);
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ResourceIdentity.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ResourceIdentity.java
new file mode 100644
index 0000000000000..4c202dd46162e
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ResourceIdentity.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import java.util.UUID;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Azure Active Directory identity configuration for a resource.
+ */
+public class ResourceIdentity {
+ /**
+ * The Azure Active Directory principal id.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID principalId;
+
+ /**
+ * The identity type. Set this to 'SystemAssigned' in order to
+ * automatically create and assign an Azure Active Directory principal for
+ * the resource. Possible values include: 'SystemAssigned'.
+ */
+ @JsonProperty(value = "type")
+ private IdentityType type;
+
+ /**
+ * The Azure Active Directory tenant id.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private UUID tenantId;
+
+ /**
+ * Get the Azure Active Directory principal id.
+ *
+ * @return the principalId value
+ */
+ public UUID principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned'.
+ *
+ * @return the type value
+ */
+ public IdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned'.
+ *
+ * @param type the type value to set
+ * @return the ResourceIdentity object itself.
+ */
+ public ResourceIdentity withType(IdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the Azure Active Directory tenant id.
+ *
+ * @return the tenantId value
+ */
+ public UUID tenantId() {
+ return this.tenantId;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SecurityAlertPolicyState.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SecurityAlertPolicyState.java
new file mode 100644
index 0000000000000..fa52e08846ba8
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SecurityAlertPolicyState.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for SecurityAlertPolicyState.
+ */
+public enum SecurityAlertPolicyState {
+ /** Enum value New. */
+ NEW("New"),
+
+ /** Enum value Enabled. */
+ ENABLED("Enabled"),
+
+ /** Enum value Disabled. */
+ DISABLED("Disabled");
+
+ /** The actual serialized value for a SecurityAlertPolicyState instance. */
+ private String value;
+
+ SecurityAlertPolicyState(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a SecurityAlertPolicyState instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed SecurityAlertPolicyState object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static SecurityAlertPolicyState fromString(String value) {
+ SecurityAlertPolicyState[] items = SecurityAlertPolicyState.values();
+ for (SecurityAlertPolicyState item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabelRank.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabelRank.java
new file mode 100644
index 0000000000000..78347eae376ff
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabelRank.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for SensitivityLabelRank.
+ */
+public enum SensitivityLabelRank {
+ /** Enum value None. */
+ NONE("None"),
+
+ /** Enum value Low. */
+ LOW("Low"),
+
+ /** Enum value Medium. */
+ MEDIUM("Medium"),
+
+ /** Enum value High. */
+ HIGH("High"),
+
+ /** Enum value Critical. */
+ CRITICAL("Critical");
+
+ /** The actual serialized value for a SensitivityLabelRank instance. */
+ private String value;
+
+ SensitivityLabelRank(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a SensitivityLabelRank instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed SensitivityLabelRank object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static SensitivityLabelRank fromString(String value) {
+ SensitivityLabelRank[] items = SensitivityLabelRank.values();
+ for (SensitivityLabelRank item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabelSource.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabelSource.java
new file mode 100644
index 0000000000000..301b2f6fa575d
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabelSource.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for SensitivityLabelSource.
+ */
+public enum SensitivityLabelSource {
+ /** Enum value current. */
+ CURRENT("current"),
+
+ /** Enum value recommended. */
+ RECOMMENDED("recommended");
+
+ /** The actual serialized value for a SensitivityLabelSource instance. */
+ private String value;
+
+ SensitivityLabelSource(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a SensitivityLabelSource instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed SensitivityLabelSource object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static SensitivityLabelSource fromString(String value) {
+ SensitivityLabelSource[] items = SensitivityLabelSource.values();
+ for (SensitivityLabelSource item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabels.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabels.java
new file mode 100644
index 0000000000000..a7ab9771a8a69
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabels.java
@@ -0,0 +1,242 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SensitivityLabelInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+
+/**
+ * Type representing SensitivityLabels.
+ */
+public interface SensitivityLabels extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the informationType value.
+ */
+ String informationType();
+
+ /**
+ * @return the informationTypeId value.
+ */
+ String informationTypeId();
+
+ /**
+ * @return the isDisabled value.
+ */
+ Boolean isDisabled();
+
+ /**
+ * @return the labelId value.
+ */
+ String labelId();
+
+ /**
+ * @return the labelName value.
+ */
+ String labelName();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the rank value.
+ */
+ SensitivityLabelRank rank();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the SensitivityLabels definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithColumn, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of SensitivityLabels definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a SensitivityLabels definition.
+ */
+ interface Blank extends WithColumn {
+ }
+
+ /**
+ * The stage of the sensitivitylabels definition allowing to specify Column.
+ */
+ interface WithColumn {
+ /**
+ * Specifies resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param managedInstanceName The name of the managed instance
+ * @param databaseName The name of the database
+ * @param schemaName The name of the schema
+ * @param tableName The name of the table
+ * @param columnName The name of the column
+ * @return the next definition stage
+ */
+ WithCreate withExistingColumn(String resourceGroupName, String managedInstanceName, String databaseName, String schemaName, String tableName, String columnName);
+ }
+
+ /**
+ * The stage of the sensitivitylabels definition allowing to specify InformationType.
+ */
+ interface WithInformationType {
+ /**
+ * Specifies informationType.
+ * @param informationType The information type
+ * @return the next definition stage
+ */
+ WithCreate withInformationType(String informationType);
+ }
+
+ /**
+ * The stage of the sensitivitylabels definition allowing to specify InformationTypeId.
+ */
+ interface WithInformationTypeId {
+ /**
+ * Specifies informationTypeId.
+ * @param informationTypeId The information type ID
+ * @return the next definition stage
+ */
+ WithCreate withInformationTypeId(String informationTypeId);
+ }
+
+ /**
+ * The stage of the sensitivitylabels definition allowing to specify LabelId.
+ */
+ interface WithLabelId {
+ /**
+ * Specifies labelId.
+ * @param labelId The label ID
+ * @return the next definition stage
+ */
+ WithCreate withLabelId(String labelId);
+ }
+
+ /**
+ * The stage of the sensitivitylabels definition allowing to specify LabelName.
+ */
+ interface WithLabelName {
+ /**
+ * Specifies labelName.
+ * @param labelName The label name
+ * @return the next definition stage
+ */
+ WithCreate withLabelName(String labelName);
+ }
+
+ /**
+ * The stage of the sensitivitylabels definition allowing to specify Rank.
+ */
+ interface WithRank {
+ /**
+ * Specifies rank.
+ * @param rank Possible values include: 'None', 'Low', 'Medium', 'High', 'Critical'
+ * @return the next definition stage
+ */
+ WithCreate withRank(SensitivityLabelRank rank);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithInformationType, DefinitionStages.WithInformationTypeId, DefinitionStages.WithLabelId, DefinitionStages.WithLabelName, DefinitionStages.WithRank {
+ }
+ }
+ /**
+ * The template for a SensitivityLabels update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithInformationType, UpdateStages.WithInformationTypeId, UpdateStages.WithLabelId, UpdateStages.WithLabelName, UpdateStages.WithRank {
+ }
+
+ /**
+ * Grouping of SensitivityLabels update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the sensitivitylabels update allowing to specify InformationType.
+ */
+ interface WithInformationType {
+ /**
+ * Specifies informationType.
+ * @param informationType The information type
+ * @return the next update stage
+ */
+ Update withInformationType(String informationType);
+ }
+
+ /**
+ * The stage of the sensitivitylabels update allowing to specify InformationTypeId.
+ */
+ interface WithInformationTypeId {
+ /**
+ * Specifies informationTypeId.
+ * @param informationTypeId The information type ID
+ * @return the next update stage
+ */
+ Update withInformationTypeId(String informationTypeId);
+ }
+
+ /**
+ * The stage of the sensitivitylabels update allowing to specify LabelId.
+ */
+ interface WithLabelId {
+ /**
+ * Specifies labelId.
+ * @param labelId The label ID
+ * @return the next update stage
+ */
+ Update withLabelId(String labelId);
+ }
+
+ /**
+ * The stage of the sensitivitylabels update allowing to specify LabelName.
+ */
+ interface WithLabelName {
+ /**
+ * Specifies labelName.
+ * @param labelName The label name
+ * @return the next update stage
+ */
+ Update withLabelName(String labelName);
+ }
+
+ /**
+ * The stage of the sensitivitylabels update allowing to specify Rank.
+ */
+ interface WithRank {
+ /**
+ * Specifies rank.
+ * @param rank Possible values include: 'None', 'Low', 'Medium', 'High', 'Critical'
+ * @return the next update stage
+ */
+ Update withRank(SensitivityLabelRank rank);
+ }
+
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ServerAzureADAdministrator.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ServerAzureADAdministrator.java
new file mode 100644
index 0000000000000..96bf778690dca
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ServerAzureADAdministrator.java
@@ -0,0 +1,169 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.ServerAzureADAdministratorInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+import java.util.UUID;
+
+/**
+ * Type representing ServerAzureADAdministrator.
+ */
+public interface ServerAzureADAdministrator extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the administratorType value.
+ */
+ String administratorType();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the login value.
+ */
+ String login();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the sid value.
+ */
+ UUID sid();
+
+ /**
+ * @return the tenantId value.
+ */
+ UUID tenantId();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the ServerAzureADAdministrator definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithServer, DefinitionStages.WithAdministratorType, DefinitionStages.WithLogin, DefinitionStages.WithSid, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of ServerAzureADAdministrator definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a ServerAzureADAdministrator definition.
+ */
+ interface Blank extends WithServer {
+ }
+
+ /**
+ * The stage of the serverazureadadministrator definition allowing to specify Server.
+ */
+ interface WithServer {
+ /**
+ * Specifies resourceGroupName, serverName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param serverName The name of the server
+ * @return the next definition stage
+ */
+ WithAdministratorType withExistingServer(String resourceGroupName, String serverName);
+ }
+
+ /**
+ * The stage of the serverazureadadministrator definition allowing to specify AdministratorType.
+ */
+ interface WithAdministratorType {
+ /**
+ * Specifies administratorType.
+ * @param administratorType Type of the sever administrator
+ * @return the next definition stage
+ */
+ WithLogin withAdministratorType(String administratorType);
+ }
+
+ /**
+ * The stage of the serverazureadadministrator definition allowing to specify Login.
+ */
+ interface WithLogin {
+ /**
+ * Specifies login.
+ * @param login Login name of the server administrator
+ * @return the next definition stage
+ */
+ WithSid withLogin(String login);
+ }
+
+ /**
+ * The stage of the serverazureadadministrator definition allowing to specify Sid.
+ */
+ interface WithSid {
+ /**
+ * Specifies sid.
+ * @param sid SID (object ID) of the server administrator
+ * @return the next definition stage
+ */
+ WithCreate withSid(UUID sid);
+ }
+
+ /**
+ * The stage of the serverazureadadministrator definition allowing to specify TenantId.
+ */
+ interface WithTenantId {
+ /**
+ * Specifies tenantId.
+ * @param tenantId Tenant ID of the administrator
+ * @return the next definition stage
+ */
+ WithCreate withTenantId(UUID tenantId);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithTenantId {
+ }
+ }
+ /**
+ * The template for a ServerAzureADAdministrator update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithTenantId {
+ }
+
+ /**
+ * Grouping of ServerAzureADAdministrator update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the serverazureadadministrator update allowing to specify TenantId.
+ */
+ interface WithTenantId {
+ /**
+ * Specifies tenantId.
+ * @param tenantId Tenant ID of the administrator
+ * @return the next update stage
+ */
+ Update withTenantId(UUID tenantId);
+ }
+
+ }
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ServerAzureADAdministrators.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ServerAzureADAdministrators.java
new file mode 100644
index 0000000000000..91b49528b80a9
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ServerAzureADAdministrators.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.ServerAzureADAdministrator;
+import rx.Completable;
+
+/**
+ * Type representing ServerAzureADAdministrators.
+ */
+public interface ServerAzureADAdministrators {
+ /**
+ * Begins definition for a new Administrator resource.
+ * @param name resource name.
+ * @return the first stage of the new Administrator definition.
+ */
+ ServerAzureADAdministrator.DefinitionStages.Blank defineAdministrator(String name);
+
+ /**
+ * Gets a server Administrator.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String serverName);
+
+ /**
+ * Gets a list of server Administrators.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByServerAsync(final String resourceGroupName, final String serverName);
+
+ /**
+ * Deletes an existing server Active Directory Administrator.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String serverName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ServerVulnerabilityAssessment.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ServerVulnerabilityAssessment.java
index 250075f1afd5a..a6fc12a888aa7 100644
--- a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ServerVulnerabilityAssessment.java
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ServerVulnerabilityAssessment.java
@@ -128,7 +128,7 @@ interface WithStorageAccountAccessKey {
interface WithStorageContainerSasKey {
/**
* Specifies storageContainerSasKey.
- * @param storageContainerSasKey A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required
+ * @param storageContainerSasKey A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required
* @return the next definition stage
*/
WithCreate withStorageContainerSasKey(String storageContainerSasKey);
@@ -182,7 +182,7 @@ interface WithStorageAccountAccessKey {
interface WithStorageContainerSasKey {
/**
* Specifies storageContainerSasKey.
- * @param storageContainerSasKey A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required
+ * @param storageContainerSasKey A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required
* @return the next update stage
*/
Update withStorageContainerSasKey(String storageContainerSasKey);
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Sku.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Sku.java
new file mode 100644
index 0000000000000..09967f6b70bea
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Sku.java
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * An ARM Resource SKU.
+ */
+public class Sku {
+ /**
+ * The name of the SKU, typically, a letter + Number code, e.g. P3.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * The tier or edition of the particular SKU, e.g. Basic, Premium.
+ */
+ @JsonProperty(value = "tier")
+ private String tier;
+
+ /**
+ * Size of the particular SKU.
+ */
+ @JsonProperty(value = "size")
+ private String size;
+
+ /**
+ * If the service has different generations of hardware, for the same SKU,
+ * then that can be captured here.
+ */
+ @JsonProperty(value = "family")
+ private String family;
+
+ /**
+ * Capacity of the particular SKU.
+ */
+ @JsonProperty(value = "capacity")
+ private Integer capacity;
+
+ /**
+ * Get the name of the SKU, typically, a letter + Number code, e.g. P3.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the SKU, typically, a letter + Number code, e.g. P3.
+ *
+ * @param name the name value to set
+ * @return the Sku object itself.
+ */
+ public Sku withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the tier or edition of the particular SKU, e.g. Basic, Premium.
+ *
+ * @return the tier value
+ */
+ public String tier() {
+ return this.tier;
+ }
+
+ /**
+ * Set the tier or edition of the particular SKU, e.g. Basic, Premium.
+ *
+ * @param tier the tier value to set
+ * @return the Sku object itself.
+ */
+ public Sku withTier(String tier) {
+ this.tier = tier;
+ return this;
+ }
+
+ /**
+ * Get size of the particular SKU.
+ *
+ * @return the size value
+ */
+ public String size() {
+ return this.size;
+ }
+
+ /**
+ * Set size of the particular SKU.
+ *
+ * @param size the size value to set
+ * @return the Sku object itself.
+ */
+ public Sku withSize(String size) {
+ this.size = size;
+ return this;
+ }
+
+ /**
+ * Get if the service has different generations of hardware, for the same SKU, then that can be captured here.
+ *
+ * @return the family value
+ */
+ public String family() {
+ return this.family;
+ }
+
+ /**
+ * Set if the service has different generations of hardware, for the same SKU, then that can be captured here.
+ *
+ * @param family the family value to set
+ * @return the Sku object itself.
+ */
+ public Sku withFamily(String family) {
+ this.family = family;
+ return this;
+ }
+
+ /**
+ * Get capacity of the particular SKU.
+ *
+ * @return the capacity value
+ */
+ public Integer capacity() {
+ return this.capacity;
+ }
+
+ /**
+ * Set capacity of the particular SKU.
+ *
+ * @param capacity the capacity value to set
+ * @return the Sku object itself.
+ */
+ public Sku withCapacity(Integer capacity) {
+ this.capacity = capacity;
+ return this;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/UpsertManagedServerOperationParameters.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/UpsertManagedServerOperationParameters.java
new file mode 100644
index 0000000000000..452ff4117735d
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/UpsertManagedServerOperationParameters.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The UpsertManagedServerOperationParameters model.
+ */
+public class UpsertManagedServerOperationParameters {
+ /**
+ * The family property.
+ */
+ @JsonProperty(value = "family")
+ private String family;
+
+ /**
+ * The tier property.
+ */
+ @JsonProperty(value = "tier")
+ private String tier;
+
+ /**
+ * The vCores property.
+ */
+ @JsonProperty(value = "vCores")
+ private Integer vCores;
+
+ /**
+ * The storageSizeInGB property.
+ */
+ @JsonProperty(value = "storageSizeInGB")
+ private Integer storageSizeInGB;
+
+ /**
+ * Get the family value.
+ *
+ * @return the family value
+ */
+ public String family() {
+ return this.family;
+ }
+
+ /**
+ * Set the family value.
+ *
+ * @param family the family value to set
+ * @return the UpsertManagedServerOperationParameters object itself.
+ */
+ public UpsertManagedServerOperationParameters withFamily(String family) {
+ this.family = family;
+ return this;
+ }
+
+ /**
+ * Get the tier value.
+ *
+ * @return the tier value
+ */
+ public String tier() {
+ return this.tier;
+ }
+
+ /**
+ * Set the tier value.
+ *
+ * @param tier the tier value to set
+ * @return the UpsertManagedServerOperationParameters object itself.
+ */
+ public UpsertManagedServerOperationParameters withTier(String tier) {
+ this.tier = tier;
+ return this;
+ }
+
+ /**
+ * Get the vCores value.
+ *
+ * @return the vCores value
+ */
+ public Integer vCores() {
+ return this.vCores;
+ }
+
+ /**
+ * Set the vCores value.
+ *
+ * @param vCores the vCores value to set
+ * @return the UpsertManagedServerOperationParameters object itself.
+ */
+ public UpsertManagedServerOperationParameters withVCores(Integer vCores) {
+ this.vCores = vCores;
+ return this;
+ }
+
+ /**
+ * Get the storageSizeInGB value.
+ *
+ * @return the storageSizeInGB value
+ */
+ public Integer storageSizeInGB() {
+ return this.storageSizeInGB;
+ }
+
+ /**
+ * Set the storageSizeInGB value.
+ *
+ * @param storageSizeInGB the storageSizeInGB value to set
+ * @return the UpsertManagedServerOperationParameters object itself.
+ */
+ public UpsertManagedServerOperationParameters withStorageSizeInGB(Integer storageSizeInGB) {
+ this.storageSizeInGB = storageSizeInGB;
+ return this;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/UpsertManagedServerOperationStep.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/UpsertManagedServerOperationStep.java
new file mode 100644
index 0000000000000..fdb943398e72c
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/UpsertManagedServerOperationStep.java
@@ -0,0 +1,96 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The UpsertManagedServerOperationStep model.
+ */
+public class UpsertManagedServerOperationStep {
+ /**
+ * The order property.
+ */
+ @JsonProperty(value = "order")
+ private Integer order;
+
+ /**
+ * The name property.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * Possible values include: 'NotStarted', 'InProgress', 'SlowedDown',
+ * 'Completed', 'Failed', 'Canceled'.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /**
+ * Get the order value.
+ *
+ * @return the order value
+ */
+ public Integer order() {
+ return this.order;
+ }
+
+ /**
+ * Set the order value.
+ *
+ * @param order the order value to set
+ * @return the UpsertManagedServerOperationStep object itself.
+ */
+ public UpsertManagedServerOperationStep withOrder(Integer order) {
+ this.order = order;
+ return this;
+ }
+
+ /**
+ * Get the name value.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name value.
+ *
+ * @param name the name value to set
+ * @return the UpsertManagedServerOperationStep object itself.
+ */
+ public UpsertManagedServerOperationStep withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get possible values include: 'NotStarted', 'InProgress', 'SlowedDown', 'Completed', 'Failed', 'Canceled'.
+ *
+ * @return the status value
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set possible values include: 'NotStarted', 'InProgress', 'SlowedDown', 'Completed', 'Failed', 'Canceled'.
+ *
+ * @param status the status value to set
+ * @return the UpsertManagedServerOperationStep object itself.
+ */
+ public UpsertManagedServerOperationStep withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Usage.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Usage.java
new file mode 100644
index 0000000000000..7516b2e6969de
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Usage.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.UsageInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.SqlManager;
+
+/**
+ * Type representing Usage.
+ */
+public interface Usage extends HasInner, HasManager {
+ /**
+ * @return the currentValue value.
+ */
+ Integer currentValue();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the limit value.
+ */
+ Integer limit();
+
+ /**
+ * @return the name value.
+ */
+ Name name();
+
+ /**
+ * @return the requestedLimit value.
+ */
+ Integer requestedLimit();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the unit value.
+ */
+ String unit();
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Usages.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Usages.java
new file mode 100644
index 0000000000000..151a067572bf0
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Usages.java
@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.implementation.UsagesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing Usages.
+ */
+public interface Usages extends HasInner {
+ /**
+ * Gets all instance pool usage metrics.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param instancePoolName The name of the instance pool to be retrieved.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByInstancePoolAsync(final String resourceGroupName, final String instancePoolName);
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/CurrentSensitivityLabelsImpl.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/CurrentSensitivityLabelsImpl.java
new file mode 100644
index 0000000000000..702368f4537cf
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/CurrentSensitivityLabelsImpl.java
@@ -0,0 +1,76 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview.implementation;
+
+import com.microsoft.azure.management.sql.v2018_06_01_preview.CurrentSensitivityLabels;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.SensitivityLabelRank;
+
+class CurrentSensitivityLabelsImpl extends WrapperImpl implements CurrentSensitivityLabels {
+ private final SqlManager manager;
+
+ CurrentSensitivityLabelsImpl(SensitivityLabelInner inner, SqlManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String informationType() {
+ return this.inner().informationType();
+ }
+
+ @Override
+ public String informationTypeId() {
+ return this.inner().informationTypeId();
+ }
+
+ @Override
+ public Boolean isDisabled() {
+ return this.inner().isDisabled();
+ }
+
+ @Override
+ public String labelId() {
+ return this.inner().labelId();
+ }
+
+ @Override
+ public String labelName() {
+ return this.inner().labelName();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public SensitivityLabelRank rank() {
+ return this.inner().rank();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesImpl.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesImpl.java
new file mode 100644
index 0000000000000..b37788b4b0bd9
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesImpl.java
@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ *
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.DatabaseSecurityAlertPolicies;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.DatabaseSecurityAlertPolicy;
+
+class DatabaseSecurityAlertPoliciesImpl extends WrapperImpl implements DatabaseSecurityAlertPolicies {
+ private final SqlManager manager;
+
+ DatabaseSecurityAlertPoliciesImpl(SqlManager manager) {
+ super(manager.inner().databaseSecurityAlertPolicies());
+ this.manager = manager;
+ }
+
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public DatabaseSecurityAlertPolicyImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private DatabaseSecurityAlertPolicyImpl wrapModel(DatabaseSecurityAlertPolicyInner inner) {
+ return new DatabaseSecurityAlertPolicyImpl(inner, manager());
+ }
+
+ private DatabaseSecurityAlertPolicyImpl wrapModel(String name) {
+ return new DatabaseSecurityAlertPolicyImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName) {
+ DatabaseSecurityAlertPoliciesInner client = this.inner();
+ return client.listByDatabaseAsync(resourceGroupName, serverName, databaseName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public DatabaseSecurityAlertPolicy call(DatabaseSecurityAlertPolicyInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String serverName, String databaseName) {
+ DatabaseSecurityAlertPoliciesInner client = this.inner();
+ return client.getAsync(resourceGroupName, serverName, databaseName)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(DatabaseSecurityAlertPolicyInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((DatabaseSecurityAlertPolicy)wrapModel(inner));
+ }
+ }
+ });
+ }
+
+}
diff --git a/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesInner.java b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesInner.java
new file mode 100644
index 0000000000000..e9345212db2fe
--- /dev/null
+++ b/sdk/sql/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesInner.java
@@ -0,0 +1,520 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.sql.v2018_06_01_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in DatabaseSecurityAlertPolicies.
+ */
+public class DatabaseSecurityAlertPoliciesInner {
+ /** The Retrofit service to perform REST calls. */
+ private DatabaseSecurityAlertPoliciesService service;
+ /** The service client containing this operation class. */
+ private SqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DatabaseSecurityAlertPoliciesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public DatabaseSecurityAlertPoliciesInner(Retrofit retrofit, SqlManagementClientImpl client) {
+ this.service = retrofit.create(DatabaseSecurityAlertPoliciesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for DatabaseSecurityAlertPolicies to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface DatabaseSecurityAlertPoliciesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2018_06_01_preview.DatabaseSecurityAlertPolicies get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("securityAlertPolicyName") String securityAlertPolicyName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2018_06_01_preview.DatabaseSecurityAlertPolicies createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("securityAlertPolicyName") String securityAlertPolicyName, @Path("subscriptionId") String subscriptionId, @Body DatabaseSecurityAlertPolicyInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2018_06_01_preview.DatabaseSecurityAlertPolicies listByDatabase" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies")
+ Observable> listByDatabase(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2018_06_01_preview.DatabaseSecurityAlertPolicies listByDatabaseNext" })
+ @GET
+ Observable> listByDatabaseNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Gets a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DatabaseSecurityAlertPolicyInner object if successful.
+ */
+ public DatabaseSecurityAlertPolicyInner get(String resourceGroupName, String serverName, String databaseName) {
+ return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String serverName, String databaseName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, serverName, databaseName), serviceCallback);
+ }
+
+ /**
+ * Gets a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DatabaseSecurityAlertPolicyInner object
+ */
+ public Observable getAsync(String resourceGroupName, String serverName, String databaseName) {
+ return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1, DatabaseSecurityAlertPolicyInner>() {
+ @Override
+ public DatabaseSecurityAlertPolicyInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DatabaseSecurityAlertPolicyInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String securityAlertPolicyName = "default";
+ return service.get(resourceGroupName, serverName, databaseName, securityAlertPolicyName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Creates or updates a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param parameters The database security alert policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DatabaseSecurityAlertPolicyInner object if successful.
+ */
+ public DatabaseSecurityAlertPolicyInner createOrUpdate(String resourceGroupName, String serverName, String databaseName, DatabaseSecurityAlertPolicyInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).toBlocking().single().body();
+ }
+
+ /**
+ * Creates or updates a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param parameters The database security alert policy.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseSecurityAlertPolicyInner parameters, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters), serviceCallback);
+ }
+
+ /**
+ * Creates or updates a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param parameters The database security alert policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DatabaseSecurityAlertPolicyInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String serverName, String databaseName, DatabaseSecurityAlertPolicyInner parameters) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1, DatabaseSecurityAlertPolicyInner>() {
+ @Override
+ public DatabaseSecurityAlertPolicyInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates or updates a database's security alert policy.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param parameters The database security alert policy.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DatabaseSecurityAlertPolicyInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, DatabaseSecurityAlertPolicyInner parameters) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (parameters == null) {
+ throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(parameters);
+ final String securityAlertPolicyName = "default";
+ return service.createOrUpdate(resourceGroupName, serverName, databaseName, securityAlertPolicyName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(201, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<DatabaseSecurityAlertPolicyInner> object if successful.
+ */
+ public PagedList listByDatabase(final String resourceGroupName, final String serverName, final String databaseName) {
+ ServiceResponse> response = listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DatabaseSecurityAlertPolicyInner> object
+ */
+ public Observable> listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName) {
+ return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param serverName The name of the server.
+ * @param databaseName The name of the database for which the security alert policy is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DatabaseSecurityAlertPolicyInner> object
+ */
+ public Observable>> listByDatabaseWithServiceResponseAsync(final String resourceGroupName, final String serverName, final String databaseName) {
+ return listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listByDatabaseNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ ServiceResponse> * @param serverName The name of the server.
+ ServiceResponse> * @param databaseName The name of the database for which the security alert policy is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<DatabaseSecurityAlertPolicyInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByDatabaseSinglePageAsync(final String resourceGroupName, final String serverName, final String databaseName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.listByDatabase(resourceGroupName, serverName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByDatabaseDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByDatabaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<DatabaseSecurityAlertPolicyInner> object if successful.
+ */
+ public PagedList listByDatabaseNext(final String nextPageLink) {
+ ServiceResponse> response = listByDatabaseNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listByDatabaseNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByDatabaseNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DatabaseSecurityAlertPolicyInner> object
+ */
+ public Observable> listByDatabaseNextAsync(final String nextPageLink) {
+ return listByDatabaseNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a list of database's security alert policies.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<DatabaseSecurityAlertPolicyInner> object
+ */
+ public Observable>> listByDatabaseNextWithServiceResponseAsync(final String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable