diff --git a/sql/resource-manager/v2018_06_01_preview/pom.xml b/sql/resource-manager/v2018_06_01_preview/pom.xml
index c6cb47e89202..42904affc555 100644
--- a/sql/resource-manager/v2018_06_01_preview/pom.xml
+++ b/sql/resource-manager/v2018_06_01_preview/pom.xml
@@ -11,8 +11,8 @@
com.microsoft.azure
azure-arm-parent
- 1.1.0
- ../../../pom.management.xml
+ 0.0.3-beta
+ ../../../pom.xml
azure-mgmt-sql
1.0.0-beta
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CurrentSensitivityLabels.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CurrentSensitivityLabels.java
new file mode 100644
index 000000000000..af197559e726
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/CurrentSensitivityLabels.java
@@ -0,0 +1,60 @@
+/**
+ * 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 type value.
+ */
+ String type();
+
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseSecurityAlertPolicies.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseSecurityAlertPolicies.java
new file mode 100644
index 000000000000..2a9d17222745
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseSecurityAlertPolicy.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/DatabaseSecurityAlertPolicy.java
new file mode 100644
index 000000000000..a9b72df9026e
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Databases.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Databases.java
new file mode 100644
index 000000000000..87bb5cd32216
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ElasticPools.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ElasticPools.java
new file mode 100644
index 000000000000..8558918dba84
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/IdentityType.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/IdentityType.java
new file mode 100644
index 000000000000..3f3e8108ef51
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePool.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePool.java
new file mode 100644
index 000000000000..745b2bb78cd6
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePoolLicenseType.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePoolLicenseType.java
new file mode 100644
index 000000000000..e60936bc2c52
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePoolUpdate.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePoolUpdate.java
new file mode 100644
index 000000000000..6b5ca0c0f12d
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePools.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/InstancePools.java
new file mode 100644
index 000000000000..1b5d82f79ac1
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseSensitivityLabels.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedDatabaseSensitivityLabels.java
new file mode 100644
index 000000000000..939f23a3d5e9
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstance.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstance.java
new file mode 100644
index 000000000000..8dddbd5682ce
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstance.java
@@ -0,0 +1,644 @@
+/**
+ * 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 managedInstanceCreateMode value.
+ */
+ ManagedServerCreateMode managedInstanceCreateMode();
+
+ /**
+ * @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 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 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.WithManagedInstanceCreateMode, 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.WithManagedInstanceCreateMode, 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 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 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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLicenseType.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceLicenseType.java
new file mode 100644
index 000000000000..15add2f1065d
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceProxyOverride.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceProxyOverride.java
new file mode 100644
index 000000000000..58fa06c5df64
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceUpdate.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceUpdate.java
new file mode 100644
index 000000000000..0c20255f357d
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstanceUpdate.java
@@ -0,0 +1,549 @@
+/**
+ * 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;
+
+ /**
+ * 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 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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstances.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedInstances.java
new file mode 100644
index 000000000000..13c10cae8766
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedServerCreateMode.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ManagedServerCreateMode.java
new file mode 100644
index 000000000000..dbf9d8062961
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Name.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Name.java
new file mode 100644
index 000000000000..84e216d07f39
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/RecommendedSensitivityLabels.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/RecommendedSensitivityLabels.java
new file mode 100644
index 000000000000..70d88ff60026
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/RecommendedSensitivityLabels.java
@@ -0,0 +1,60 @@
+/**
+ * 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 type value.
+ */
+ String type();
+
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ResourceIdentity.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/ResourceIdentity.java
new file mode 100644
index 000000000000..4c202dd46162
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SecurityAlertPolicyState.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SecurityAlertPolicyState.java
new file mode 100644
index 000000000000..fa52e08846ba
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabelSource.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabelSource.java
new file mode 100644
index 000000000000..301b2f6fa575
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabels.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabels.java
new file mode 100644
index 000000000000..878024e8edaf
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/SensitivityLabels.java
@@ -0,0 +1,213 @@
+/**
+ * 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 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 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 {
+ }
+ }
+ /**
+ * 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 {
+ }
+
+ /**
+ * 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);
+ }
+
+ }
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Sku.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Sku.java
new file mode 100644
index 000000000000..8513753cb5cd
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Sku.java
@@ -0,0 +1,152 @@
+/**
+ * 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 resource model definition representing SKU.
+ */
+public class Sku {
+ /**
+ * The name of the SKU. Ex - P3. It is typically a letter+number code.
+ */
+ @JsonProperty(value = "name", required = true)
+ private String name;
+
+ /**
+ * This field is required to be implemented by the Resource Provider if the
+ * service has more than one tier, but is not required on a PUT.
+ */
+ @JsonProperty(value = "tier")
+ private String tier;
+
+ /**
+ * The SKU size. When the name field is the combination of tier and some
+ * other value, this would be the standalone code.
+ */
+ @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;
+
+ /**
+ * If the SKU supports scale out/in then the capacity integer should be
+ * included. If scale out/in is not possible for the resource this may be
+ * omitted.
+ */
+ @JsonProperty(value = "capacity")
+ private Integer capacity;
+
+ /**
+ * Get the name of the SKU. Ex - P3. It is typically a letter+number code.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the SKU. Ex - P3. It is typically a letter+number code.
+ *
+ * @param name the name value to set
+ * @return the Sku object itself.
+ */
+ public Sku withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get this field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.
+ *
+ * @return the tier value
+ */
+ public String tier() {
+ return this.tier;
+ }
+
+ /**
+ * Set this field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.
+ *
+ * @param tier the tier value to set
+ * @return the Sku object itself.
+ */
+ public Sku withTier(String tier) {
+ this.tier = tier;
+ return this;
+ }
+
+ /**
+ * Get the SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
+ *
+ * @return the size value
+ */
+ public String size() {
+ return this.size;
+ }
+
+ /**
+ * Set the SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.
+ *
+ * @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 if the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.
+ *
+ * @return the capacity value
+ */
+ public Integer capacity() {
+ return this.capacity;
+ }
+
+ /**
+ * Set if the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.
+ *
+ * @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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Usage.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Usage.java
new file mode 100644
index 000000000000..7516b2e6969d
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Usages.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/Usages.java
new file mode 100644
index 000000000000..151a067572bf
--- /dev/null
+++ b/sql/resource-manager/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/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/CurrentSensitivityLabelsImpl.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/CurrentSensitivityLabelsImpl.java
new file mode 100644
index 000000000000..92662821c011
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/CurrentSensitivityLabelsImpl.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.implementation;
+
+import com.microsoft.azure.management.sql.v2018_06_01_preview.CurrentSensitivityLabels;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import rx.Observable;
+
+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 String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesImpl.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesImpl.java
new file mode 100644
index 000000000000..6c9bae58711b
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesImpl.java
@@ -0,0 +1,74 @@
+/**
+ * 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)
+ .map(new Func1() {
+ @Override
+ public DatabaseSecurityAlertPolicy call(DatabaseSecurityAlertPolicyInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesInner.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPoliciesInner.java
new file mode 100644
index 000000000000..e9345212db2f
--- /dev/null
+++ b/sql/resource-manager/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>> 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 nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<DatabaseSecurityAlertPolicyInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByDatabaseNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listByDatabaseNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByDatabaseNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByDatabaseNextDelegate(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);
+ }
+
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPolicyImpl.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPolicyImpl.java
new file mode 100644
index 000000000000..4220fd931d06
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPolicyImpl.java
@@ -0,0 +1,180 @@
+/**
+ * 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.DatabaseSecurityAlertPolicy;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2018_06_01_preview.SecurityAlertPolicyState;
+import java.util.List;
+import org.joda.time.DateTime;
+
+class DatabaseSecurityAlertPolicyImpl extends CreatableUpdatableImpl implements DatabaseSecurityAlertPolicy, DatabaseSecurityAlertPolicy.Definition, DatabaseSecurityAlertPolicy.Update {
+ private final SqlManager manager;
+ private String resourceGroupName;
+ private String serverName;
+ private String databaseName;
+
+ DatabaseSecurityAlertPolicyImpl(String name, SqlManager manager) {
+ super(name, new DatabaseSecurityAlertPolicyInner());
+ this.manager = manager;
+ // Set resource name
+ this.databaseName = name;
+ //
+ }
+
+ DatabaseSecurityAlertPolicyImpl(DatabaseSecurityAlertPolicyInner inner, SqlManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.databaseName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.serverName = IdParsingUtils.getValueFromIdByName(inner.id(), "servers");
+ this.databaseName = IdParsingUtils.getValueFromIdByName(inner.id(), "databases");
+ //
+ }
+
+ @Override
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ DatabaseSecurityAlertPoliciesInner client = this.manager().inner().databaseSecurityAlertPolicies();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.serverName, this.databaseName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ DatabaseSecurityAlertPoliciesInner client = this.manager().inner().databaseSecurityAlertPolicies();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.serverName, this.databaseName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ DatabaseSecurityAlertPoliciesInner client = this.manager().inner().databaseSecurityAlertPolicies();
+ return client.getAsync(this.resourceGroupName, this.serverName, this.databaseName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public DateTime creationTime() {
+ return this.inner().creationTime();
+ }
+
+ @Override
+ public List disabledAlerts() {
+ return this.inner().disabledAlerts();
+ }
+
+ @Override
+ public Boolean emailAccountAdmins() {
+ return this.inner().emailAccountAdmins();
+ }
+
+ @Override
+ public List emailAddresses() {
+ return this.inner().emailAddresses();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public Integer retentionDays() {
+ return this.inner().retentionDays();
+ }
+
+ @Override
+ public SecurityAlertPolicyState state() {
+ return this.inner().state();
+ }
+
+ @Override
+ public String storageAccountAccessKey() {
+ return this.inner().storageAccountAccessKey();
+ }
+
+ @Override
+ public String storageEndpoint() {
+ return this.inner().storageEndpoint();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public DatabaseSecurityAlertPolicyImpl withExistingDatabasis(String resourceGroupName, String serverName, String databaseName) {
+ this.resourceGroupName = resourceGroupName;
+ this.serverName = serverName;
+ this.databaseName = databaseName;
+ return this;
+ }
+
+ @Override
+ public DatabaseSecurityAlertPolicyImpl withState(SecurityAlertPolicyState state) {
+ this.inner().withState(state);
+ return this;
+ }
+
+ @Override
+ public DatabaseSecurityAlertPolicyImpl withDisabledAlerts(List disabledAlerts) {
+ this.inner().withDisabledAlerts(disabledAlerts);
+ return this;
+ }
+
+ @Override
+ public DatabaseSecurityAlertPolicyImpl withEmailAccountAdmins(Boolean emailAccountAdmins) {
+ this.inner().withEmailAccountAdmins(emailAccountAdmins);
+ return this;
+ }
+
+ @Override
+ public DatabaseSecurityAlertPolicyImpl withEmailAddresses(List emailAddresses) {
+ this.inner().withEmailAddresses(emailAddresses);
+ return this;
+ }
+
+ @Override
+ public DatabaseSecurityAlertPolicyImpl withRetentionDays(Integer retentionDays) {
+ this.inner().withRetentionDays(retentionDays);
+ return this;
+ }
+
+ @Override
+ public DatabaseSecurityAlertPolicyImpl withStorageAccountAccessKey(String storageAccountAccessKey) {
+ this.inner().withStorageAccountAccessKey(storageAccountAccessKey);
+ return this;
+ }
+
+ @Override
+ public DatabaseSecurityAlertPolicyImpl withStorageEndpoint(String storageEndpoint) {
+ this.inner().withStorageEndpoint(storageEndpoint);
+ return this;
+ }
+
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPolicyInner.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPolicyInner.java
new file mode 100644
index 000000000000..7522756e66f0
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabaseSecurityAlertPolicyInner.java
@@ -0,0 +1,227 @@
+/**
+ * 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.SecurityAlertPolicyState;
+import java.util.List;
+import org.joda.time.DateTime;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * A database security alert policy.
+ */
+@JsonFlatten
+public class DatabaseSecurityAlertPolicyInner extends ProxyResource {
+ /**
+ * 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'.
+ */
+ @JsonProperty(value = "properties.state", required = true)
+ private SecurityAlertPolicyState state;
+
+ /**
+ * Specifies an array of alerts that are disabled. Allowed values are:
+ * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly,
+ * Data_Exfiltration, Unsafe_Action.
+ */
+ @JsonProperty(value = "properties.disabledAlerts")
+ private List disabledAlerts;
+
+ /**
+ * Specifies an array of e-mail addresses to which the alert is sent.
+ */
+ @JsonProperty(value = "properties.emailAddresses")
+ private List emailAddresses;
+
+ /**
+ * Specifies that the alert is sent to the account administrators.
+ */
+ @JsonProperty(value = "properties.emailAccountAdmins")
+ private Boolean emailAccountAdmins;
+
+ /**
+ * Specifies the blob storage endpoint (e.g.
+ * https://MyAccount.blob.core.windows.net). This blob storage will hold
+ * all Threat Detection audit logs.
+ */
+ @JsonProperty(value = "properties.storageEndpoint")
+ private String storageEndpoint;
+
+ /**
+ * Specifies the identifier key of the Threat Detection audit storage
+ * account.
+ */
+ @JsonProperty(value = "properties.storageAccountAccessKey")
+ private String storageAccountAccessKey;
+
+ /**
+ * Specifies the number of days to keep in the Threat Detection audit logs.
+ */
+ @JsonProperty(value = "properties.retentionDays")
+ private Integer retentionDays;
+
+ /**
+ * Specifies the UTC creation time of the policy.
+ */
+ @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY)
+ private DateTime creationTime;
+
+ /**
+ * Get 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 state value
+ */
+ public SecurityAlertPolicyState state() {
+ return this.state;
+ }
+
+ /**
+ * Set 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'.
+ *
+ * @param state the state value to set
+ * @return the DatabaseSecurityAlertPolicyInner object itself.
+ */
+ public DatabaseSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * Get specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action.
+ *
+ * @return the disabledAlerts value
+ */
+ public List disabledAlerts() {
+ return this.disabledAlerts;
+ }
+
+ /**
+ * Set specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action.
+ *
+ * @param disabledAlerts the disabledAlerts value to set
+ * @return the DatabaseSecurityAlertPolicyInner object itself.
+ */
+ public DatabaseSecurityAlertPolicyInner withDisabledAlerts(List disabledAlerts) {
+ this.disabledAlerts = disabledAlerts;
+ return this;
+ }
+
+ /**
+ * Get specifies an array of e-mail addresses to which the alert is sent.
+ *
+ * @return the emailAddresses value
+ */
+ public List emailAddresses() {
+ return this.emailAddresses;
+ }
+
+ /**
+ * Set specifies an array of e-mail addresses to which the alert is sent.
+ *
+ * @param emailAddresses the emailAddresses value to set
+ * @return the DatabaseSecurityAlertPolicyInner object itself.
+ */
+ public DatabaseSecurityAlertPolicyInner withEmailAddresses(List emailAddresses) {
+ this.emailAddresses = emailAddresses;
+ return this;
+ }
+
+ /**
+ * Get specifies that the alert is sent to the account administrators.
+ *
+ * @return the emailAccountAdmins value
+ */
+ public Boolean emailAccountAdmins() {
+ return this.emailAccountAdmins;
+ }
+
+ /**
+ * Set specifies that the alert is sent to the account administrators.
+ *
+ * @param emailAccountAdmins the emailAccountAdmins value to set
+ * @return the DatabaseSecurityAlertPolicyInner object itself.
+ */
+ public DatabaseSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins) {
+ this.emailAccountAdmins = emailAccountAdmins;
+ return this;
+ }
+
+ /**
+ * Get 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 storageEndpoint value
+ */
+ public String storageEndpoint() {
+ return this.storageEndpoint;
+ }
+
+ /**
+ * Set specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
+ *
+ * @param storageEndpoint the storageEndpoint value to set
+ * @return the DatabaseSecurityAlertPolicyInner object itself.
+ */
+ public DatabaseSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint) {
+ this.storageEndpoint = storageEndpoint;
+ return this;
+ }
+
+ /**
+ * Get specifies the identifier key of the Threat Detection audit storage account.
+ *
+ * @return the storageAccountAccessKey value
+ */
+ public String storageAccountAccessKey() {
+ return this.storageAccountAccessKey;
+ }
+
+ /**
+ * Set specifies the identifier key of the Threat Detection audit storage account.
+ *
+ * @param storageAccountAccessKey the storageAccountAccessKey value to set
+ * @return the DatabaseSecurityAlertPolicyInner object itself.
+ */
+ public DatabaseSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) {
+ this.storageAccountAccessKey = storageAccountAccessKey;
+ return this;
+ }
+
+ /**
+ * Get specifies the number of days to keep in the Threat Detection audit logs.
+ *
+ * @return the retentionDays value
+ */
+ public Integer retentionDays() {
+ return this.retentionDays;
+ }
+
+ /**
+ * Set specifies the number of days to keep in the Threat Detection audit logs.
+ *
+ * @param retentionDays the retentionDays value to set
+ * @return the DatabaseSecurityAlertPolicyInner object itself.
+ */
+ public DatabaseSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) {
+ this.retentionDays = retentionDays;
+ return this;
+ }
+
+ /**
+ * Get specifies the UTC creation time of the policy.
+ *
+ * @return the creationTime value
+ */
+ public DateTime creationTime() {
+ return this.creationTime;
+ }
+
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabasesImpl.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabasesImpl.java
new file mode 100644
index 000000000000..7ece6f3b0668
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabasesImpl.java
@@ -0,0 +1,34 @@
+/**
+ * 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.
+ * abc
+ */
+
+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.Databases;
+import rx.Completable;
+
+class DatabasesImpl extends WrapperImpl implements Databases {
+ private final SqlManager manager;
+
+ DatabasesImpl(SqlManager manager) {
+ super(manager.inner().databases());
+ this.manager = manager;
+ }
+
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Completable failoverAsync(String resourceGroupName, String serverName, String databaseName) {
+ DatabasesInner client = this.inner();
+ return client.failoverAsync(resourceGroupName, serverName, databaseName).toCompletable();
+ }
+
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabasesInner.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabasesInner.java
new file mode 100644
index 000000000000..46b3c4cd66db
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/DatabasesInner.java
@@ -0,0 +1,232 @@
+/**
+ * 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.CloudException;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import okhttp3.ResponseBody;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in Databases.
+ */
+public class DatabasesInner {
+ /** The Retrofit service to perform REST calls. */
+ private DatabasesService service;
+ /** The service client containing this operation class. */
+ private SqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DatabasesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public DatabasesInner(Retrofit retrofit, SqlManagementClientImpl client) {
+ this.service = retrofit.create(DatabasesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for Databases to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface DatabasesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2018_06_01_preview.Databases failover" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover")
+ Observable> failover(@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.Databases beginFailover" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover")
+ Observable> beginFailover(@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);
+
+ }
+
+ /**
+ * 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
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void failover(String resourceGroupName, String serverName, String databaseName) {
+ failoverWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().last().body();
+ }
+
+ /**
+ * 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.
+ * @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 failoverAsync(String resourceGroupName, String serverName, String databaseName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(failoverWithServiceResponseAsync(resourceGroupName, serverName, databaseName), serviceCallback);
+ }
+
+ /**
+ * 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
+ */
+ public Observable failoverAsync(String resourceGroupName, String serverName, String databaseName) {
+ return failoverWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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
+ */
+ public Observable> failoverWithServiceResponseAsync(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.");
+ }
+ Observable> observable = service.failover(resourceGroupName, serverName, databaseName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * 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
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void beginFailover(String resourceGroupName, String serverName, String databaseName) {
+ beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body();
+ }
+
+ /**
+ * 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.
+ * @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 beginFailoverAsync(String resourceGroupName, String serverName, String databaseName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, databaseName), serviceCallback);
+ }
+
+ /**
+ * 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 {@link ServiceResponse} object if successful.
+ */
+ public Observable beginFailoverAsync(String resourceGroupName, String serverName, String databaseName) {
+ return beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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 {@link ServiceResponse} object if successful.
+ */
+ public Observable> beginFailoverWithServiceResponseAsync(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.");
+ }
+ return service.beginFailover(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 clientResponse = beginFailoverDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginFailoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ElasticPoolsImpl.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ElasticPoolsImpl.java
new file mode 100644
index 000000000000..509bae958021
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ElasticPoolsImpl.java
@@ -0,0 +1,34 @@
+/**
+ * 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.
+ * abc
+ */
+
+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.ElasticPools;
+import rx.Completable;
+
+class ElasticPoolsImpl extends WrapperImpl implements ElasticPools {
+ private final SqlManager manager;
+
+ ElasticPoolsImpl(SqlManager manager) {
+ super(manager.inner().elasticPools());
+ this.manager = manager;
+ }
+
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Completable failoverAsync(String resourceGroupName, String serverName, String elasticPoolName) {
+ ElasticPoolsInner client = this.inner();
+ return client.failoverAsync(resourceGroupName, serverName, elasticPoolName).toCompletable();
+ }
+
+}
diff --git a/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ElasticPoolsInner.java b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ElasticPoolsInner.java
new file mode 100644
index 000000000000..f8e07f0f2447
--- /dev/null
+++ b/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ElasticPoolsInner.java
@@ -0,0 +1,232 @@
+/**
+ * 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.CloudException;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import okhttp3.ResponseBody;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in ElasticPools.
+ */
+public class ElasticPoolsInner {
+ /** The Retrofit service to perform REST calls. */
+ private ElasticPoolsService service;
+ /** The service client containing this operation class. */
+ private SqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ElasticPoolsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ElasticPoolsInner(Retrofit retrofit, SqlManagementClientImpl client) {
+ this.service = retrofit.create(ElasticPoolsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ElasticPools to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ElasticPoolsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2018_06_01_preview.ElasticPools failover" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover")
+ Observable> failover(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("elasticPoolName") String elasticPoolName, @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.ElasticPools beginFailover" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover")
+ Observable> beginFailover(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("elasticPoolName") String elasticPoolName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * 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
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void failover(String resourceGroupName, String serverName, String elasticPoolName) {
+ failoverWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName).toBlocking().last().body();
+ }
+
+ /**
+ * 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.
+ * @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 failoverAsync(String resourceGroupName, String serverName, String elasticPoolName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(failoverWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName), serviceCallback);
+ }
+
+ /**
+ * 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
+ */
+ public Observable failoverAsync(String resourceGroupName, String serverName, String elasticPoolName) {
+ return failoverWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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
+ */
+ public Observable> failoverWithServiceResponseAsync(String resourceGroupName, String serverName, String elasticPoolName) {
+ 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 (elasticPoolName == null) {
+ throw new IllegalArgumentException("Parameter elasticPoolName 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.");
+ }
+ Observable> observable = service.failover(resourceGroupName, serverName, elasticPoolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * 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
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void beginFailover(String resourceGroupName, String serverName, String elasticPoolName) {
+ beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName).toBlocking().single().body();
+ }
+
+ /**
+ * 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.
+ * @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 beginFailoverAsync(String resourceGroupName, String serverName, String elasticPoolName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName), serviceCallback);
+ }
+
+ /**
+ * 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 {@link ServiceResponse} object if successful.
+ */
+ public Observable beginFailoverAsync(String resourceGroupName, String serverName, String elasticPoolName) {
+ return beginFailoverWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * 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 {@link ServiceResponse} object if successful.
+ */
+ public Observable> beginFailoverWithServiceResponseAsync(String resourceGroupName, String serverName, String elasticPoolName) {
+ 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 (elasticPoolName == null) {
+ throw new IllegalArgumentException("Parameter elasticPoolName 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.beginFailover(resourceGroupName, serverName, elasticPoolName, 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 = beginFailoverDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginFailoverDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken