diff --git a/sdk/sql/mgmt-v2014_04_01/pom.xml b/sdk/sql/mgmt-v2014_04_01/pom.xml index eb596184574ea..1a34f1e618ba3 100644 --- a/sdk/sql/mgmt-v2014_04_01/pom.xml +++ b/sdk/sql/mgmt-v2014_04_01/pom.xml @@ -11,8 +11,8 @@ com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml azure-mgmt-sql 1.0.0-beta @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Database.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Database.java index 0794fd1d73b9b..5c766a3fe6ef1 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Database.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Database.java @@ -267,7 +267,15 @@ interface WithCreateMode { interface WithEdition { /** * Specifies edition. - * @param edition The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions -l westus --query [].name`. Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2' + * @param edition The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' * @return the next definition stage */ WithCreate withEdition(DatabaseEdition edition); @@ -327,7 +335,8 @@ interface WithRecoveryServicesRecoveryPointResourceId { interface WithRequestedServiceObjectiveId { /** * Specifies requestedServiceObjectiveId. - * @param requestedServiceObjectiveId The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name` + * @param requestedServiceObjectiveId The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. + The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API * @return the next definition stage */ WithCreate withRequestedServiceObjectiveId(UUID requestedServiceObjectiveId); @@ -339,7 +348,15 @@ interface WithRequestedServiceObjectiveId { interface WithRequestedServiceObjectiveName { /** * Specifies requestedServiceObjectiveName. - * @param requestedServiceObjectiveName The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name`. Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + * @param requestedServiceObjectiveName The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' * @return the next definition stage */ WithCreate withRequestedServiceObjectiveName(ServiceObjectiveName requestedServiceObjectiveName); @@ -473,7 +490,15 @@ interface WithCreateMode { interface WithEdition { /** * Specifies edition. - * @param edition The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions -l westus --query [].name`. Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2' + * @param edition The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale' * @return the next update stage */ Update withEdition(DatabaseEdition edition); @@ -533,7 +558,8 @@ interface WithRecoveryServicesRecoveryPointResourceId { interface WithRequestedServiceObjectiveId { /** * Specifies requestedServiceObjectiveId. - * @param requestedServiceObjectiveId The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name` + * @param requestedServiceObjectiveId The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. + The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API * @return the next update stage */ Update withRequestedServiceObjectiveId(UUID requestedServiceObjectiveId); @@ -545,7 +571,15 @@ interface WithRequestedServiceObjectiveId { interface WithRequestedServiceObjectiveName { /** * Specifies requestedServiceObjectiveName. - * @param requestedServiceObjectiveName The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name`. Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + * @param requestedServiceObjectiveName The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' * @return the next update stage */ Update withRequestedServiceObjectiveName(ServiceObjectiveName requestedServiceObjectiveName); diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseEdition.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseEdition.java index 63a8ddfef7e6c..79973ae0116bf 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseEdition.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseEdition.java @@ -49,6 +49,15 @@ public final class DatabaseEdition extends ExpandableStringEnum /** Static value System2 for DatabaseEdition. */ public static final DatabaseEdition SYSTEM2 = fromString("System2"); + /** Static value GeneralPurpose for DatabaseEdition. */ + public static final DatabaseEdition GENERAL_PURPOSE = fromString("GeneralPurpose"); + + /** Static value BusinessCritical for DatabaseEdition. */ + public static final DatabaseEdition BUSINESS_CRITICAL = fromString("BusinessCritical"); + + /** Static value Hyperscale for DatabaseEdition. */ + public static final DatabaseEdition HYPERSCALE = fromString("Hyperscale"); + /** * Creates or finds a DatabaseEdition from its string representation. * @param name a name to look for diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseUpdate.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseUpdate.java index 2600459243381..c1fb545cd92e9 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseUpdate.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseUpdate.java @@ -152,14 +152,23 @@ public class DatabaseUpdate extends ProxyResource { /** * The edition of the database. The DatabaseEditions enumeration contains * all the valid editions. If createMode is NonReadableSecondary or - * OnlineSecondary, this value is ignored. To see possible values, query - * the capabilities API - * (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - * referred to by operationId: "Capabilities_ListByLocation." or use the - * Azure CLI command `az sql db list-editions -l westus --query [].name`. - * Possible values include: 'Web', 'Business', 'Basic', 'Standard', + * OnlineSecondary, this value is ignored. + * + * The list of SKUs may vary by region and support offer. To determine the + * SKUs (including the SKU name, tier/edition, family, and capacity) that + * are available to your subscription in an Azure region, use the + * `Capabilities_ListByLocation` REST API or one of the following commands: + * + * ```azurecli + * az sql db list-editions -l <location> -o table + * ```` + * + * ```powershell + * Get-AzSqlServerServiceObjective -Location <location> + * ```` + * . Possible values include: 'Web', 'Business', 'Basic', 'Standard', * 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - * 'System2'. + * 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'. */ @JsonProperty(value = "properties.edition") private DatabaseEdition edition; @@ -181,12 +190,11 @@ public class DatabaseUpdate extends ProxyResource { * currentServiceObjectiveId property. If requestedServiceObjectiveId and * requestedServiceObjectiveName are both updated, the value of * requestedServiceObjectiveId overrides the value of - * requestedServiceObjectiveName. To see possible values, query the - * capabilities API - * (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - * referred to by operationId: "Capabilities_ListByLocation." or use the - * Azure CLI command `az sql db list-editions --location <location> - * --query [].supportedServiceLevelObjectives[].name` . + * requestedServiceObjectiveName. + * + * The list of SKUs may vary by region and support offer. To determine the + * service objective ids that are available to your subscription in an + * Azure region, use the `Capabilities_ListByLocation` REST API. */ @JsonProperty(value = "properties.requestedServiceObjectiveId") private UUID requestedServiceObjectiveId; @@ -195,21 +203,29 @@ public class DatabaseUpdate extends ProxyResource { * The name of the configured service level objective of the database. This * is the service level objective that is in the process of being applied * to the database. Once successfully updated, it will match the value of - * serviceLevelObjective property. To see possible values, query the - * capabilities API - * (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - * referred to by operationId: "Capabilities_ListByLocation." or use the - * Azure CLI command `az sql db list-editions --location <location> - * --query [].supportedServiceLevelObjectives[].name`. Possible values - * include: 'System', 'System0', 'System1', 'System2', 'System3', - * 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', - * 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', - * 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', - * 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', - * 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', - * 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', - * 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', - * 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. + * serviceLevelObjective property. + * + * The list of SKUs may vary by region and support offer. To determine the + * SKUs (including the SKU name, tier/edition, family, and capacity) that + * are available to your subscription in an Azure region, use the + * `Capabilities_ListByLocation` REST API or one of the following commands: + * + * ```azurecli + * az sql db list-editions -l <location> -o table + * ```` + * + * ```powershell + * Get-AzSqlServerServiceObjective -Location <location> + * ```` + * . Possible values include: 'System', 'System0', 'System1', 'System2', + * 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', + * 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', + * 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', + * 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + * 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + * 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + * 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + * 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. */ @JsonProperty(value = "properties.requestedServiceObjectiveName") private ServiceObjectiveName requestedServiceObjectiveName; @@ -501,7 +517,15 @@ public DatabaseUpdate withRecoveryServicesRecoveryPointResourceId(String recover } /** - * Get the edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions -l westus --query [].name`. Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2'. + * Get the edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'. * * @return the edition value */ @@ -510,7 +534,15 @@ public DatabaseEdition edition() { } /** - * Set the edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions -l westus --query [].name`. Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2'. + * Set the edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'. * * @param edition the edition value to set * @return the DatabaseUpdate object itself. @@ -541,7 +573,8 @@ public DatabaseUpdate withMaxSizeBytes(String maxSizeBytes) { } /** - * Get the configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name` . + * Get the configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. + The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API. * * @return the requestedServiceObjectiveId value */ @@ -550,7 +583,8 @@ public UUID requestedServiceObjectiveId() { } /** - * Set the configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name` . + * Set the configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. + The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API. * * @param requestedServiceObjectiveId the requestedServiceObjectiveId value to set * @return the DatabaseUpdate object itself. @@ -561,7 +595,15 @@ public DatabaseUpdate withRequestedServiceObjectiveId(UUID requestedServiceObjec } /** - * Get the name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name`. Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. + * Get the name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. * * @return the requestedServiceObjectiveName value */ @@ -570,7 +612,15 @@ public ServiceObjectiveName requestedServiceObjectiveName() { } /** - * Set the name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name`. Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. + * Set the name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. * * @param requestedServiceObjectiveName the requestedServiceObjectiveName value to set * @return the DatabaseUpdate object itself. diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Databases.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Databases.java index 49215e0a17a2d..525e6ed65571e 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Databases.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Databases.java @@ -73,7 +73,7 @@ public interface Databases extends SupportsCreating listByElasticPoolAsync(String resourceGroupName, String serverName, String elasticPoolName); /** - * Gets a database inside of a recommented elastic pool. + * Gets a database inside of a recommended 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. @@ -85,7 +85,7 @@ public interface Databases extends SupportsCreating getByRecommendedElasticPoolAsync(String resourceGroupName, String serverName, String recommendedElasticPoolName, String databaseName); /** - * Returns a list of databases inside a recommented elastic pool. + * Returns a list of databases inside a recommended 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. diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPool.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPool.java index 22c4dd39ec5dc..af9e900898d22 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPool.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPool.java @@ -177,7 +177,7 @@ interface WithDtu { interface WithEdition { /** * Specifies edition. - * @param edition The edition of the elastic pool. Possible values include: 'Basic', 'Standard', 'Premium' + * @param edition The edition of the elastic pool. Possible values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', 'BusinessCritical' * @return the next definition stage */ WithCreate withEdition(ElasticPoolEdition edition); @@ -279,7 +279,7 @@ interface WithDtu { interface WithEdition { /** * Specifies edition. - * @param edition The edition of the elastic pool. Possible values include: 'Basic', 'Standard', 'Premium' + * @param edition The edition of the elastic pool. Possible values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', 'BusinessCritical' * @return the next update stage */ Update withEdition(ElasticPoolEdition edition); diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPoolEdition.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPoolEdition.java index 842f33fc97867..f5d47601dfbe4 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPoolEdition.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPoolEdition.java @@ -25,6 +25,12 @@ public final class ElasticPoolEdition extends ExpandableStringEnum { /** - * Gets database extensions. + * Gets a database extension. This API is deprecated and should not be used. + * + * @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 import into + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable getAsync(String resourceGroupName, String serverName, String databaseName); + + /** + * Gets database extensions. This API is deprecated and should not be used. * * @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. diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ImportRequest.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ImportRequest.java index f947a3473e506..c7955209ff71e 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ImportRequest.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ImportRequest.java @@ -21,9 +21,23 @@ public class ImportRequest extends ExportRequest { private String databaseName; /** - * The edition for the database being created. Possible values include: - * 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', - * 'Stretch', 'DataWarehouse', 'System', 'System2'. + * The edition for the database being created. + * + * The list of SKUs may vary by region and support offer. To determine the + * SKUs (including the SKU name, tier/edition, family, and capacity) that + * are available to your subscription in an Azure region, use the + * `Capabilities_ListByLocation` REST API or one of the following commands: + * + * ```azurecli + * az sql db list-editions -l <location> -o table + * ```` + * + * ```powershell + * Get-AzSqlServerServiceObjective -Location <location> + * ```` + * . Possible values include: 'Web', 'Business', 'Basic', 'Standard', + * 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + * 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'. */ @JsonProperty(value = "edition", required = true) private DatabaseEdition edition; @@ -70,7 +84,15 @@ public ImportRequest withDatabaseName(String databaseName) { } /** - * Get the edition for the database being created. Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2'. + * Get the edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'. * * @return the edition value */ @@ -79,7 +101,15 @@ public DatabaseEdition edition() { } /** - * Set the edition for the database being created. Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2'. + * Set the edition for the database being created. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'. * * @param edition the edition value to set * @return the ImportRequest object itself. diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/RecommendedElasticPools.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/RecommendedElasticPools.java index cc8cc11b6c8c2..261e853a53b73 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/RecommendedElasticPools.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/RecommendedElasticPools.java @@ -18,7 +18,7 @@ */ public interface RecommendedElasticPools extends HasInner { /** - * Gets a recommented elastic pool. + * Gets a recommended 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. @@ -39,7 +39,7 @@ public interface RecommendedElasticPools extends HasInner listByServerAsync(String resourceGroupName, String serverName); /** - * Returns recommented elastic pool metrics. + * Returns recommended elastic pool 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 serverName The name of the server. diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ReplicationLinks.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ReplicationLinks.java index 2e025e123a389..a95f83d57c157 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ReplicationLinks.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ReplicationLinks.java @@ -41,6 +41,18 @@ public interface ReplicationLinks extends HasInner { */ Completable failoverAllowDataLossAsync(String resourceGroupName, String serverName, String databaseName, String linkId); + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable unlinkAsync(String resourceGroupName, String serverName, String databaseName, String linkId); + /** * Gets a database replication link. * diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ServerTableAuditingPolicies.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ServerTableAuditingPolicies.java index 9570848fe18cf..b2277c59ac26a 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ServerTableAuditingPolicies.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ServerTableAuditingPolicies.java @@ -18,7 +18,7 @@ */ public interface ServerTableAuditingPolicies extends SupportsCreating, HasInner { /** - * Lists a servers's table auditing policies. Table auditing is deprecated, use blob auditing instead. + * Lists a server's table auditing policies. Table auditing is deprecated, use blob auditing instead. * * @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. diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/UnlinkParameters.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/UnlinkParameters.java new file mode 100644 index 0000000000000..c2fa2313d0059 --- /dev/null +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/UnlinkParameters.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.v2014_04_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Represents the parameters for Unlink Replication Link request. + */ +public class UnlinkParameters { + /** + * Determines whether link will be terminated in a forced or a friendly + * way. + */ + @JsonProperty(value = "forcedTermination") + private Boolean forcedTermination; + + /** + * Get determines whether link will be terminated in a forced or a friendly way. + * + * @return the forcedTermination value + */ + public Boolean forcedTermination() { + return this.forcedTermination; + } + + /** + * Set determines whether link will be terminated in a forced or a friendly way. + * + * @param forcedTermination the forcedTermination value to set + * @return the UnlinkParameters object itself. + */ + public UnlinkParameters withForcedTermination(Boolean forcedTermination) { + this.forcedTermination = forcedTermination; + return this; + } + +} diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DataMaskingPoliciesImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DataMaskingPoliciesImpl.java index cd16119815631..9de11f937119e 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DataMaskingPoliciesImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DataMaskingPoliciesImpl.java @@ -44,10 +44,14 @@ private DataMaskingPolicyImpl wrapModel(String name) { public Observable getAsync(String resourceGroupName, String serverName, String databaseName) { DataMaskingPoliciesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, databaseName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public DataMaskingPolicy call(DataMaskingPolicyInner inner) { - return wrapModel(inner); + public Observable call(DataMaskingPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DataMaskingPolicy)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseAdvisorsImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseAdvisorsImpl.java index 7069647c399ca..2bba4d657dd4c 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseAdvisorsImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseAdvisorsImpl.java @@ -57,10 +57,14 @@ public AdvisorListResult call(AdvisorListResultInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String databaseName, String advisorName) { DatabaseAdvisorsInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, databaseName, advisorName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public DatabasisServerAdvisor call(AdvisorInner inner) { - return wrapModel(inner); + public Observable call(AdvisorInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DatabasisServerAdvisor)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseConnectionPoliciesImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseConnectionPoliciesImpl.java index e01be37ebdc3f..e4dbecf1c0578 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseConnectionPoliciesImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseConnectionPoliciesImpl.java @@ -44,10 +44,14 @@ private DatabaseConnectionPolicyImpl wrapModel(String name) { public Observable getAsync(String resourceGroupName, String serverName, String databaseName) { DatabaseConnectionPoliciesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, databaseName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public DatabaseConnectionPolicy call(DatabaseConnectionPolicyInner inner) { - return wrapModel(inner); + public Observable call(DatabaseConnectionPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DatabaseConnectionPolicy)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseInner.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseInner.java index 5cc5b1b54d285..ad94561971b7b 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseInner.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseInner.java @@ -156,14 +156,23 @@ public class DatabaseInner extends Resource { /** * The edition of the database. The DatabaseEditions enumeration contains * all the valid editions. If createMode is NonReadableSecondary or - * OnlineSecondary, this value is ignored. To see possible values, query - * the capabilities API - * (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - * referred to by operationId: "Capabilities_ListByLocation." or use the - * Azure CLI command `az sql db list-editions -l westus --query [].name`. - * Possible values include: 'Web', 'Business', 'Basic', 'Standard', + * OnlineSecondary, this value is ignored. + * + * The list of SKUs may vary by region and support offer. To determine the + * SKUs (including the SKU name, tier/edition, family, and capacity) that + * are available to your subscription in an Azure region, use the + * `Capabilities_ListByLocation` REST API or one of the following commands: + * + * ```azurecli + * az sql db list-editions -l <location> -o table + * ```` + * + * ```powershell + * Get-AzSqlServerServiceObjective -Location <location> + * ```` + * . Possible values include: 'Web', 'Business', 'Basic', 'Standard', * 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', - * 'System2'. + * 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'. */ @JsonProperty(value = "properties.edition") private DatabaseEdition edition; @@ -185,12 +194,11 @@ public class DatabaseInner extends Resource { * currentServiceObjectiveId property. If requestedServiceObjectiveId and * requestedServiceObjectiveName are both updated, the value of * requestedServiceObjectiveId overrides the value of - * requestedServiceObjectiveName. To see possible values, query the - * capabilities API - * (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - * referred to by operationId: "Capabilities_ListByLocation." or use the - * Azure CLI command `az sql db list-editions --location <location> - * --query [].supportedServiceLevelObjectives[].name` . + * requestedServiceObjectiveName. + * + * The list of SKUs may vary by region and support offer. To determine the + * service objective ids that are available to your subscription in an + * Azure region, use the `Capabilities_ListByLocation` REST API. */ @JsonProperty(value = "properties.requestedServiceObjectiveId") private UUID requestedServiceObjectiveId; @@ -199,21 +207,29 @@ public class DatabaseInner extends Resource { * The name of the configured service level objective of the database. This * is the service level objective that is in the process of being applied * to the database. Once successfully updated, it will match the value of - * serviceLevelObjective property. To see possible values, query the - * capabilities API - * (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) - * referred to by operationId: "Capabilities_ListByLocation." or use the - * Azure CLI command `az sql db list-editions --location <location> - * --query [].supportedServiceLevelObjectives[].name`. Possible values - * include: 'System', 'System0', 'System1', 'System2', 'System3', - * 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', - * 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', - * 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', - * 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', - * 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', - * 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', - * 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', - * 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. + * serviceLevelObjective property. + * + * The list of SKUs may vary by region and support offer. To determine the + * SKUs (including the SKU name, tier/edition, family, and capacity) that + * are available to your subscription in an Azure region, use the + * `Capabilities_ListByLocation` REST API or one of the following commands: + * + * ```azurecli + * az sql db list-editions -l <location> -o table + * ```` + * + * ```powershell + * Get-AzSqlServerServiceObjective -Location <location> + * ```` + * . Possible values include: 'System', 'System0', 'System1', 'System2', + * 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', + * 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', + * 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', + * 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', + * 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + * 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', + * 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', + * 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. */ @JsonProperty(value = "properties.requestedServiceObjectiveName") private ServiceObjectiveName requestedServiceObjectiveName; @@ -494,7 +510,15 @@ public DatabaseInner withRecoveryServicesRecoveryPointResourceId(String recovery } /** - * Get the edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions -l westus --query [].name`. Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2'. + * Get the edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'. * * @return the edition value */ @@ -503,7 +527,15 @@ public DatabaseEdition edition() { } /** - * Set the edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions -l westus --query [].name`. Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2'. + * Set the edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2', 'GeneralPurpose', 'BusinessCritical', 'Hyperscale'. * * @param edition the edition value to set * @return the DatabaseInner object itself. @@ -534,7 +566,8 @@ public DatabaseInner withMaxSizeBytes(String maxSizeBytes) { } /** - * Get the configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name` . + * Get the configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. + The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API. * * @return the requestedServiceObjectiveId value */ @@ -543,7 +576,8 @@ public UUID requestedServiceObjectiveId() { } /** - * Set the configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name` . + * Set the configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. + The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API. * * @param requestedServiceObjectiveId the requestedServiceObjectiveId value to set * @return the DatabaseInner object itself. @@ -554,7 +588,15 @@ public DatabaseInner withRequestedServiceObjectiveId(UUID requestedServiceObject } /** - * Get the name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name`. Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. + * Get the name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. * * @return the requestedServiceObjectiveName value */ @@ -563,7 +605,15 @@ public ServiceObjectiveName requestedServiceObjectiveName() { } /** - * Set the name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name`. Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. + * Set the name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. + The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + ```azurecli + az sql db list-editions -l <location> -o table + ```` + ```powershell + Get-AzSqlServerServiceObjective -Location <location> + ```` + . Possible values include: 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool'. * * @param requestedServiceObjectiveName the requestedServiceObjectiveName value to set * @return the DatabaseInner object itself. diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseTableAuditingPoliciesImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseTableAuditingPoliciesImpl.java index 64d3c75676d1e..4803bba3bbed0 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseTableAuditingPoliciesImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseTableAuditingPoliciesImpl.java @@ -57,10 +57,14 @@ public DatabaseTableAuditingPolicyListResult call(DatabaseTableAuditingPolicyLis public Observable getAsync(String resourceGroupName, String serverName, String databaseName) { DatabaseTableAuditingPoliciesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, databaseName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public DatabaseTableAuditingPolicy call(DatabaseTableAuditingPolicyInner inner) { - return wrapModel(inner); + public Observable call(DatabaseTableAuditingPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DatabaseTableAuditingPolicy)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseThreatDetectionPoliciesImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseThreatDetectionPoliciesImpl.java index 0fcf96b45a379..2a3c94b5882ff 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseThreatDetectionPoliciesImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseThreatDetectionPoliciesImpl.java @@ -44,10 +44,14 @@ private DatabaseSecurityAlertPolicyImpl wrapModel(String name) { public Observable getAsync(String resourceGroupName, String serverName, String databaseName) { DatabaseThreatDetectionPoliciesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, databaseName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public DatabaseSecurityAlertPolicy call(DatabaseSecurityAlertPolicyInner inner) { - return wrapModel(inner); + public Observable call(DatabaseSecurityAlertPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DatabaseSecurityAlertPolicy)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesImpl.java index db2277bd52fca..b09b3c57da046 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesImpl.java @@ -153,10 +153,14 @@ public Database call(DatabaseInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String databaseName) { DatabasesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, databaseName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Database call(DatabaseInner inner) { - return wrapModel(inner); + public Observable call(DatabaseInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Database)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java index c19c32fdf93c1..745e26fcb77b0 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java @@ -122,14 +122,6 @@ interface DatabasesService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases") Observable> listByRecommendedElasticPool(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("recommendedElasticPoolName") String recommendedElasticPoolName, @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.v2014_04_01.Databases importMethod" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import") - Observable> importMethod(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Body ImportRequest parameters, @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.v2014_04_01.Databases beginImportMethod" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import") - Observable> beginImportMethod(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Body ImportRequest parameters, @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.v2014_04_01.Databases createImportOperation" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}") Observable> createImportOperation(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("extensionName") String extensionName, @Query("api-version") String apiVersion, @Body ImportExtensionRequest parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -138,6 +130,14 @@ interface DatabasesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}") Observable> beginCreateImportOperation(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("extensionName") String extensionName, @Query("api-version") String apiVersion, @Body ImportExtensionRequest parameters, @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.v2014_04_01.Databases importMethod" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import") + Observable> importMethod(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Body ImportRequest parameters, @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.v2014_04_01.Databases beginImportMethod" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import") + Observable> beginImportMethod(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Query("api-version") String apiVersion, @Body ImportRequest parameters, @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.v2014_04_01.Databases export" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export") Observable> export(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Body ExportRequest parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1526,7 +1526,7 @@ private ServiceResponse> listByElasticPoolDelegate(Respo } /** - * Gets a database inside of a recommented elastic pool. + * Gets a database inside of a recommended 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. @@ -1542,7 +1542,7 @@ public DatabaseInner getByRecommendedElasticPool(String resourceGroupName, Strin } /** - * Gets a database inside of a recommented elastic pool. + * Gets a database inside of a recommended 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. @@ -1557,7 +1557,7 @@ public ServiceFuture getByRecommendedElasticPoolAsync(String reso } /** - * Gets a database inside of a recommented elastic pool. + * Gets a database inside of a recommended 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. @@ -1576,7 +1576,7 @@ public DatabaseInner call(ServiceResponse response) { } /** - * Gets a database inside of a recommented elastic pool. + * Gets a database inside of a recommended 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. @@ -1626,7 +1626,7 @@ private ServiceResponse getByRecommendedElasticPoolDelegate(Respo } /** - * Returns a list of databases inside a recommented elastic pool. + * Returns a list of databases inside a recommended 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. @@ -1641,7 +1641,7 @@ public List listByRecommendedElasticPool(String resourceGroupName } /** - * Returns a list of databases inside a recommented elastic pool. + * Returns a list of databases inside a recommended 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. @@ -1655,7 +1655,7 @@ public ServiceFuture> listByRecommendedElasticPoolAsync(Stri } /** - * Returns a list of databases inside a recommented elastic pool. + * Returns a list of databases inside a recommended 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. @@ -1673,7 +1673,7 @@ public List call(ServiceResponse> response) { } /** - * Returns a list of databases inside a recommented elastic pool. + * Returns a list of databases inside a recommended 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. @@ -1724,45 +1724,48 @@ private ServiceResponse> listByRecommendedElasticPoolDel } /** - * Imports a bacpac into a new database. + * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. * * @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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @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 ImportExportResponseInner object if successful. */ - public ImportExportResponseInner importMethod(String resourceGroupName, String serverName, ImportRequest parameters) { - return importMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters).toBlocking().last().body(); + public ImportExportResponseInner createImportOperation(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { + return createImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).toBlocking().last().body(); } /** - * Imports a bacpac into a new database. + * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. * * @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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @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 importMethodAsync(String resourceGroupName, String serverName, ImportRequest parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(importMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters), serviceCallback); + public ServiceFuture createImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters), serviceCallback); } /** - * Imports a bacpac into a new database. + * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. * * @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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable importMethodAsync(String resourceGroupName, String serverName, ImportRequest parameters) { - return importMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1, ImportExportResponseInner>() { + public Observable createImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { + return createImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1, ImportExportResponseInner>() { @Override public ImportExportResponseInner call(ServiceResponse response) { return response.body(); @@ -1771,15 +1774,16 @@ public ImportExportResponseInner call(ServiceResponse } /** - * Imports a bacpac into a new database. + * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. * * @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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> importMethodWithServiceResponseAsync(String resourceGroupName, String serverName, ImportRequest parameters) { + public Observable> createImportOperationWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1789,6 +1793,9 @@ public Observable> importMethodWithSe 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.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } @@ -1796,50 +1803,54 @@ public Observable> importMethodWithSe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - Observable> observable = service.importMethod(this.client.subscriptionId(), resourceGroupName, serverName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String extensionName = "import"; + Observable> observable = service.createImportOperation(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, extensionName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Imports a bacpac into a new database. + * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. * * @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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @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 ImportExportResponseInner object if successful. */ - public ImportExportResponseInner beginImportMethod(String resourceGroupName, String serverName, ImportRequest parameters) { - return beginImportMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters).toBlocking().single().body(); + public ImportExportResponseInner beginCreateImportOperation(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { + return beginCreateImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).toBlocking().single().body(); } /** - * Imports a bacpac into a new database. + * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. * * @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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @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 beginImportMethodAsync(String resourceGroupName, String serverName, ImportRequest parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginImportMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters), serviceCallback); + public ServiceFuture beginCreateImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters), serviceCallback); } /** - * Imports a bacpac into a new database. + * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. * * @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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ImportExportResponseInner object */ - public Observable beginImportMethodAsync(String resourceGroupName, String serverName, ImportRequest parameters) { - return beginImportMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1, ImportExportResponseInner>() { + public Observable beginCreateImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { + return beginCreateImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1, ImportExportResponseInner>() { @Override public ImportExportResponseInner call(ServiceResponse response) { return response.body(); @@ -1848,15 +1859,16 @@ public ImportExportResponseInner call(ServiceResponse } /** - * Imports a bacpac into a new database. + * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. * * @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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ImportExportResponseInner object */ - public Observable> beginImportMethodWithServiceResponseAsync(String resourceGroupName, String serverName, ImportRequest parameters) { + public Observable> beginCreateImportOperationWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1866,6 +1878,9 @@ public Observable> beginImportMethodW 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.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } @@ -1873,12 +1888,13 @@ public Observable> beginImportMethodW throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - return service.beginImportMethod(this.client.subscriptionId(), resourceGroupName, serverName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + final String extensionName = "import"; + return service.beginCreateImportOperation(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, extensionName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginImportMethodDelegate(response); + ServiceResponse clientResponse = beginCreateImportOperationDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1887,57 +1903,54 @@ public Observable> call(Response beginImportMethodDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginCreateImportOperationDelegate(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()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. + * Imports a bacpac into a new 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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @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 ImportExportResponseInner object if successful. */ - public ImportExportResponseInner createImportOperation(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { - return createImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).toBlocking().last().body(); + public ImportExportResponseInner importMethod(String resourceGroupName, String serverName, ImportRequest parameters) { + return importMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters).toBlocking().last().body(); } /** - * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. + * Imports a bacpac into a new 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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @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 createImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters), serviceCallback); + public ServiceFuture importMethodAsync(String resourceGroupName, String serverName, ImportRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(importMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters), serviceCallback); } /** - * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. + * Imports a bacpac into a new 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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable createImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { - return createImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1, ImportExportResponseInner>() { + public Observable importMethodAsync(String resourceGroupName, String serverName, ImportRequest parameters) { + return importMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1, ImportExportResponseInner>() { @Override public ImportExportResponseInner call(ServiceResponse response) { return response.body(); @@ -1946,16 +1959,15 @@ public ImportExportResponseInner call(ServiceResponse } /** - * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. + * Imports a bacpac into a new 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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> createImportOperationWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { + public Observable> importMethodWithServiceResponseAsync(String resourceGroupName, String serverName, ImportRequest parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -1965,9 +1977,6 @@ public Observable> createImportOperat 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.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } @@ -1975,54 +1984,50 @@ public Observable> createImportOperat throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String extensionName = "import"; - Observable> observable = service.createImportOperation(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, extensionName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + Observable> observable = service.importMethod(this.client.subscriptionId(), resourceGroupName, serverName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. + * Imports a bacpac into a new 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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @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 ImportExportResponseInner object if successful. */ - public ImportExportResponseInner beginCreateImportOperation(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { - return beginCreateImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).toBlocking().single().body(); + public ImportExportResponseInner beginImportMethod(String resourceGroupName, String serverName, ImportRequest parameters) { + return beginImportMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters).toBlocking().single().body(); } /** - * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. + * Imports a bacpac into a new 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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @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 beginCreateImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters), serviceCallback); + public ServiceFuture beginImportMethodAsync(String resourceGroupName, String serverName, ImportRequest parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginImportMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters), serviceCallback); } /** - * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. + * Imports a bacpac into a new 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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ImportExportResponseInner object */ - public Observable beginCreateImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { - return beginCreateImportOperationWithServiceResponseAsync(resourceGroupName, serverName, databaseName, parameters).map(new Func1, ImportExportResponseInner>() { + public Observable beginImportMethodAsync(String resourceGroupName, String serverName, ImportRequest parameters) { + return beginImportMethodWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1, ImportExportResponseInner>() { @Override public ImportExportResponseInner call(ServiceResponse response) { return response.body(); @@ -2031,16 +2036,15 @@ public ImportExportResponseInner call(ServiceResponse } /** - * Creates an import operation that imports a bacpac into an existing database. The existing database must be empty. + * Imports a bacpac into a new 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 import into * @param parameters The required parameters for importing a Bacpac into a database. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ImportExportResponseInner object */ - public Observable> beginCreateImportOperationWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters) { + public Observable> beginImportMethodWithServiceResponseAsync(String resourceGroupName, String serverName, ImportRequest parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -2050,9 +2054,6 @@ public Observable> beginCreateImportO 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.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } @@ -2060,13 +2061,12 @@ public Observable> beginCreateImportO throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String extensionName = "import"; - return service.beginCreateImportOperation(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, extensionName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginImportMethod(this.client.subscriptionId(), resourceGroupName, serverName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginCreateImportOperationDelegate(response); + ServiceResponse clientResponse = beginImportMethodDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2075,9 +2075,9 @@ public Observable> call(Response beginCreateImportOperationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginImportMethodDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolInner.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolInner.java index a07689e4ff810..3d4dcdabb77ed 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolInner.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolInner.java @@ -35,7 +35,7 @@ public class ElasticPoolInner extends Resource { /** * The edition of the elastic pool. Possible values include: 'Basic', - * 'Standard', 'Premium'. + * 'Standard', 'Premium', 'GeneralPurpose', 'BusinessCritical'. */ @JsonProperty(value = "properties.edition") private ElasticPoolEdition edition; @@ -98,7 +98,7 @@ public ElasticPoolState state() { } /** - * Get the edition of the elastic pool. Possible values include: 'Basic', 'Standard', 'Premium'. + * Get the edition of the elastic pool. Possible values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', 'BusinessCritical'. * * @return the edition value */ @@ -107,7 +107,7 @@ public ElasticPoolEdition edition() { } /** - * Set the edition of the elastic pool. Possible values include: 'Basic', 'Standard', 'Premium'. + * Set the edition of the elastic pool. Possible values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', 'BusinessCritical'. * * @param edition the edition value to set * @return the ElasticPoolInner object itself. diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolsImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolsImpl.java index ed7df4953b726..24db818c2291d 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolsImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolsImpl.java @@ -66,10 +66,14 @@ public ElasticPool call(ElasticPoolInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String elasticPoolName) { ElasticPoolsInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, elasticPoolName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ElasticPool call(ElasticPoolInner inner) { - return wrapModel(inner); + public Observable call(ElasticPoolInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ElasticPool)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ExtensionsImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ExtensionsImpl.java index 40bd61698e6ac..0b2250abbb75d 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ExtensionsImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ExtensionsImpl.java @@ -11,6 +11,7 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.sql.v2014_04_01.Extensions; +import rx.Completable; import rx.functions.Func1; import rx.Observable; import java.util.List; @@ -27,6 +28,12 @@ public SqlManager manager() { return this.manager; } + @Override + public Completable getAsync(String resourceGroupName, String serverName, String databaseName) { + ExtensionsInner client = this.inner(); + return client.getAsync(resourceGroupName, serverName, databaseName).toCompletable(); + } + @Override public Observable listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName) { ExtensionsInner client = this.inner(); diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ExtensionsInner.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ExtensionsInner.java index e392579420825..2a0008e903bf6 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ExtensionsInner.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ExtensionsInner.java @@ -52,6 +52,10 @@ public ExtensionsInner(Retrofit retrofit, SqlManagementClientImpl client) { * used by Retrofit to perform actually REST calls. */ interface ExtensionsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2014_04_01.Extensions get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("extensionName") String extensionName, @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.v2014_04_01.Extensions listByDatabase" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions") Observable> listByDatabase(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -59,7 +63,100 @@ interface ExtensionsService { } /** - * Gets database extensions. + * Gets a database extension. This API is deprecated and should not be used. + * + * @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 import into + * @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 get(String resourceGroupName, String serverName, String databaseName) { + getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).toBlocking().single().body(); + } + + /** + * Gets a database extension. This API is deprecated and should not be used. + * + * @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 import into + * @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 extension. This API is deprecated and should not be used. + * + * @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 import into + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable getAsync(String resourceGroupName, String serverName, String databaseName) { + return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a database extension. This API is deprecated and should not be used. + * + * @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 import into + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + 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.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String extensionName = "import"; + return service.get(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, extensionName, 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); + } + + /** + * Gets database extensions. This API is deprecated and should not be used. * * @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. @@ -74,7 +171,7 @@ public List listByDatabase(String resourceGroupName, String serverName, } /** - * Gets database extensions. + * Gets database extensions. This API is deprecated and should not be used. * * @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. @@ -88,7 +185,7 @@ public ServiceFuture> listByDatabaseAsync(String resourceGroupName, } /** - * Gets database extensions. + * Gets database extensions. This API is deprecated and should not be used. * * @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. @@ -106,7 +203,7 @@ public List call(ServiceResponse> response) { } /** - * Gets database extensions. + * Gets database extensions. This API is deprecated and should not be used. * * @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. diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/FirewallRulesImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/FirewallRulesImpl.java index 0ab505ff34941..e02193f6fa546 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/FirewallRulesImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/FirewallRulesImpl.java @@ -64,10 +64,14 @@ public FirewallRule call(FirewallRuleInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String firewallRuleName) { FirewallRulesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, firewallRuleName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public FirewallRule call(FirewallRuleInner inner) { - return wrapModel(inner); + public Observable call(FirewallRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((FirewallRule)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/GeoBackupPoliciesImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/GeoBackupPoliciesImpl.java index 0d2db402bdfc8..cd47388ae5f18 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/GeoBackupPoliciesImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/GeoBackupPoliciesImpl.java @@ -63,10 +63,14 @@ public GeoBackupPolicy call(GeoBackupPolicyInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String databaseName) { GeoBackupPoliciesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, databaseName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public GeoBackupPolicy call(GeoBackupPolicyInner inner) { - return wrapModel(inner); + public Observable call(GeoBackupPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((GeoBackupPolicy)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/MetricDefinitionInner.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/MetricDefinitionInner.java index 4a10b9bde796d..dd7e636fc1aea 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/MetricDefinitionInner.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/MetricDefinitionInner.java @@ -47,7 +47,7 @@ public class MetricDefinitionInner { private UnitDefinitionType unit; /** - * The list of database metric availabities for the metric. + * The list of database metric availabilities for the metric. */ @JsonProperty(value = "metricAvailabilities", access = JsonProperty.Access.WRITE_ONLY) private List metricAvailabilities; @@ -89,7 +89,7 @@ public UnitDefinitionType unit() { } /** - * Get the list of database metric availabities for the metric. + * Get the list of database metric availabilities for the metric. * * @return the metricAvailabilities value */ diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolInner.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolInner.java index 4f9e68cc60c45..7340928fb1b5d 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolInner.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolInner.java @@ -16,14 +16,14 @@ import com.microsoft.azure.ProxyResource; /** - * Represents a recommented elastic pool. + * Represents a recommended elastic pool. */ @JsonFlatten public class RecommendedElasticPoolInner extends ProxyResource { /** * The edition of the recommended elastic pool. The ElasticPoolEdition * enumeration contains all the valid editions. Possible values include: - * 'Basic', 'Standard', 'Premium'. + * 'Basic', 'Standard', 'Premium', 'GeneralPurpose', 'BusinessCritical'. */ @JsonProperty(value = "properties.databaseEdition", access = JsonProperty.Access.WRITE_ONLY) private ElasticPoolEdition databaseEdition; @@ -89,7 +89,7 @@ public class RecommendedElasticPoolInner extends ProxyResource { private List metrics; /** - * Get the edition of the recommended elastic pool. The ElasticPoolEdition enumeration contains all the valid editions. Possible values include: 'Basic', 'Standard', 'Premium'. + * Get the edition of the recommended elastic pool. The ElasticPoolEdition enumeration contains all the valid editions. Possible values include: 'Basic', 'Standard', 'Premium', 'GeneralPurpose', 'BusinessCritical'. * * @return the databaseEdition value */ diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolsImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolsImpl.java index 6140596fbe34d..292ad371dbc30 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolsImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolsImpl.java @@ -55,10 +55,14 @@ public RecommendedElasticPool call(RecommendedElasticPoolInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String recommendedElasticPoolName) { RecommendedElasticPoolsInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, recommendedElasticPoolName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public RecommendedElasticPool call(RecommendedElasticPoolInner inner) { - return wrapModel(inner); + public Observable call(RecommendedElasticPoolInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((RecommendedElasticPool)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolsInner.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolsInner.java index e5c6cca5a3293..1f044b5cdaa21 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolsInner.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RecommendedElasticPoolsInner.java @@ -67,7 +67,7 @@ interface RecommendedElasticPoolsService { } /** - * Gets a recommented elastic pool. + * Gets a recommended 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. @@ -82,7 +82,7 @@ public RecommendedElasticPoolInner get(String resourceGroupName, String serverNa } /** - * Gets a recommented elastic pool. + * Gets a recommended 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. @@ -96,7 +96,7 @@ public ServiceFuture getAsync(String resourceGroupN } /** - * Gets a recommented elastic pool. + * Gets a recommended 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. @@ -114,7 +114,7 @@ public RecommendedElasticPoolInner call(ServiceResponse> listByServerDeleg } /** - * Returns recommented elastic pool metrics. + * Returns recommended elastic pool 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 serverName The name of the server. @@ -266,7 +266,7 @@ public List listMetrics(String resourceGroupN } /** - * Returns recommented elastic pool metrics. + * Returns recommended elastic pool 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 serverName The name of the server. @@ -280,7 +280,7 @@ public ServiceFuture> listMetricsAsync(S } /** - * Returns recommented elastic pool metrics. + * Returns recommended elastic pool 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 serverName The name of the server. @@ -298,7 +298,7 @@ public List call(ServiceResponse getAsync(String resourceGroupName, String serverName, String databaseName) { RecoverableDatabasesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, databaseName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public RecoverableDatabase call(RecoverableDatabaseInner inner) { - return wrapModel(inner); + public Observable call(RecoverableDatabaseInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((RecoverableDatabase)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksImpl.java index 094b92744f79d..9e14c883321eb 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksImpl.java @@ -45,6 +45,12 @@ public Completable failoverAllowDataLossAsync(String resourceGroupName, String s return client.failoverAllowDataLossAsync(resourceGroupName, serverName, databaseName, linkId).toCompletable(); } + @Override + public Completable unlinkAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { + ReplicationLinksInner client = this.inner(); + return client.unlinkAsync(resourceGroupName, serverName, databaseName, linkId).toCompletable(); + } + @Override public Observable listByDatabaseAsync(String resourceGroupName, String serverName, String databaseName) { ReplicationLinksInner client = this.inner(); @@ -67,10 +73,14 @@ public ReplicationLink call(ReplicationLinkInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { ReplicationLinksInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, databaseName, linkId) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ReplicationLink call(ReplicationLinkInner inner) { - return wrapModel(inner); + public Observable call(ReplicationLinkInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ReplicationLink)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksInner.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksInner.java index a4cb1d8c51849..c49e8a79a46cb 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksInner.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksInner.java @@ -11,12 +11,14 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.sql.v2014_04_01.UnlinkParameters; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; 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; @@ -78,6 +80,14 @@ interface ReplicationLinksService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss") Observable> beginFailoverAllowDataLoss(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("linkId") String linkId, @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.v2014_04_01.ReplicationLinks unlink" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/unlink") + Observable> unlink(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("linkId") String linkId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UnlinkParameters parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2014_04_01.ReplicationLinks beginUnlink" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/unlink") + Observable> beginUnlink(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("linkId") String linkId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body UnlinkParameters parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2014_04_01.ReplicationLinks listByDatabase" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks") Observable> listByDatabase(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -648,6 +658,379 @@ private ServiceResponse beginFailoverAllowDataLossDelegate(Response unlinkAsync(String resourceGroupName, String serverName, String databaseName, String linkId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(unlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId), serviceCallback); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable unlinkAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { + return unlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> unlinkWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + 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 (linkId == null) { + throw new IllegalArgumentException("Parameter linkId 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 Boolean forcedTermination = null; + UnlinkParameters parameters = new UnlinkParameters(); + parameters.withForcedTermination(null); + Observable> observable = service.unlink(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, linkId, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param forcedTermination Determines whether link will be terminated in a forced or a friendly way. + * @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 unlink(String resourceGroupName, String serverName, String databaseName, String linkId, Boolean forcedTermination) { + unlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId, forcedTermination).toBlocking().last().body(); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param forcedTermination Determines whether link will be terminated in a forced or a friendly way. + * @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 unlinkAsync(String resourceGroupName, String serverName, String databaseName, String linkId, Boolean forcedTermination, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(unlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId, forcedTermination), serviceCallback); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param forcedTermination Determines whether link will be terminated in a forced or a friendly way. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable unlinkAsync(String resourceGroupName, String serverName, String databaseName, String linkId, Boolean forcedTermination) { + return unlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId, forcedTermination).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param forcedTermination Determines whether link will be terminated in a forced or a friendly way. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> unlinkWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, String linkId, Boolean forcedTermination) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + 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 (linkId == null) { + throw new IllegalArgumentException("Parameter linkId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + UnlinkParameters parameters = new UnlinkParameters(); + parameters.withForcedTermination(forcedTermination); + Observable> observable = service.unlink(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, linkId, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @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 beginUnlink(String resourceGroupName, String serverName, String databaseName, String linkId) { + beginUnlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId).toBlocking().single().body(); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @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 beginUnlinkAsync(String resourceGroupName, String serverName, String databaseName, String linkId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUnlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId), serviceCallback); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginUnlinkAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { + return beginUnlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginUnlinkWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + 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 (linkId == null) { + throw new IllegalArgumentException("Parameter linkId 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 Boolean forcedTermination = null; + UnlinkParameters parameters = new UnlinkParameters(); + parameters.withForcedTermination(null); + return service.beginUnlink(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, linkId, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUnlinkDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param forcedTermination Determines whether link will be terminated in a forced or a friendly way. + * @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 beginUnlink(String resourceGroupName, String serverName, String databaseName, String linkId, Boolean forcedTermination) { + beginUnlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId, forcedTermination).toBlocking().single().body(); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param forcedTermination Determines whether link will be terminated in a forced or a friendly way. + * @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 beginUnlinkAsync(String resourceGroupName, String serverName, String databaseName, String linkId, Boolean forcedTermination, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUnlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId, forcedTermination), serviceCallback); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param forcedTermination Determines whether link will be terminated in a forced or a friendly way. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginUnlinkAsync(String resourceGroupName, String serverName, String databaseName, String linkId, Boolean forcedTermination) { + return beginUnlinkWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId, forcedTermination).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes a database replication link in forced or friendly way. + * + * @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 that has the replication link to be failed over. + * @param linkId The ID of the replication link to be failed over. + * @param forcedTermination Determines whether link will be terminated in a forced or a friendly way. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginUnlinkWithServiceResponseAsync(String resourceGroupName, String serverName, String databaseName, String linkId, Boolean forcedTermination) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + 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 (linkId == null) { + throw new IllegalArgumentException("Parameter linkId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + UnlinkParameters parameters = new UnlinkParameters(); + parameters.withForcedTermination(forcedTermination); + return service.beginUnlink(this.client.subscriptionId(), resourceGroupName, serverName, databaseName, linkId, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginUnlinkDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginUnlinkDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Lists a database's replication links. * diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RestorableDroppedDatabasesImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RestorableDroppedDatabasesImpl.java index 28b558da080d2..824286330178e 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RestorableDroppedDatabasesImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/RestorableDroppedDatabasesImpl.java @@ -54,10 +54,14 @@ public RestorableDroppedDatabase call(RestorableDroppedDatabaseInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String restorableDroppededDatabaseId) { RestorableDroppedDatabasesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, restorableDroppededDatabaseId) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public RestorableDroppedDatabase call(RestorableDroppedDatabaseInner inner) { - return wrapModel(inner); + public Observable call(RestorableDroppedDatabaseInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((RestorableDroppedDatabase)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerAdvisorsImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerAdvisorsImpl.java index 67cb2c2f9ae76..b66cdf394b49f 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerAdvisorsImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerAdvisorsImpl.java @@ -57,10 +57,14 @@ public AdvisorListResult call(AdvisorListResultInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String advisorName) { ServerAdvisorsInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, advisorName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ServerAdvisor call(AdvisorInner inner) { - return wrapModel(inner); + public Observable call(AdvisorInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServerAdvisor)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerAzureADAdministratorsImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerAzureADAdministratorsImpl.java index 4637cfe828d1e..f7d1f1cb492d2 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerAzureADAdministratorsImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerAzureADAdministratorsImpl.java @@ -64,10 +64,14 @@ public ServerAzureADAdministrator call(ServerAzureADAdministratorInner inner) { public Observable getAsync(String resourceGroupName, String serverName) { ServerAzureADAdministratorsInner client = this.inner(); return client.getAsync(resourceGroupName, serverName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ServerAzureADAdministrator call(ServerAzureADAdministratorInner inner) { - return wrapModel(inner); + public Observable call(ServerAzureADAdministratorInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServerAzureADAdministrator)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerCommunicationLinksImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerCommunicationLinksImpl.java index 89157bcd67b33..9dead05817041 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerCommunicationLinksImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerCommunicationLinksImpl.java @@ -64,10 +64,14 @@ public ServerCommunicationLink call(ServerCommunicationLinkInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String communicationLinkName) { ServerCommunicationLinksInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, communicationLinkName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ServerCommunicationLink call(ServerCommunicationLinkInner inner) { - return wrapModel(inner); + public Observable call(ServerCommunicationLinkInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServerCommunicationLink)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerConnectionPoliciesImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerConnectionPoliciesImpl.java index b6f5ec57cb4f6..713a9ed66be77 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerConnectionPoliciesImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerConnectionPoliciesImpl.java @@ -44,10 +44,14 @@ private ServerConnectionPolicyImpl wrapModel(String name) { public Observable getAsync(String resourceGroupName, String serverName) { ServerConnectionPoliciesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ServerConnectionPolicy call(ServerConnectionPolicyInner inner) { - return wrapModel(inner); + public Observable call(ServerConnectionPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServerConnectionPolicy)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesImpl.java index 7c0ab0e1cfd2a..2e327f0d4e933 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesImpl.java @@ -57,10 +57,14 @@ public ServerTableAuditingPolicyListResult call(ServerTableAuditingPolicyListRes public Observable getAsync(String resourceGroupName, String serverName) { ServerTableAuditingPoliciesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ServerTableAuditingPolicy call(ServerTableAuditingPolicyInner inner) { - return wrapModel(inner); + public Observable call(ServerTableAuditingPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServerTableAuditingPolicy)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesInner.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesInner.java index 6d1337ed14e05..857b4e11600f0 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesInner.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesInner.java @@ -156,7 +156,7 @@ private ServiceResponse getDelegate(Response createOrUpdateAsync(String } /** - * Creates or updates a servers's table auditing policy. Table auditing is deprecated, use blob auditing instead. + * Creates or updates a server's table auditing policy. Table auditing is deprecated, use blob auditing instead. * * @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. @@ -203,7 +203,7 @@ public ServerTableAuditingPolicyInner call(ServiceResponse createOrUpdateDelegate(R } /** - * Lists a servers's table auditing policies. Table auditing is deprecated, use blob auditing instead. + * Lists a server's table auditing policies. Table auditing is deprecated, use blob auditing instead. * * @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. @@ -266,7 +266,7 @@ public ServerTableAuditingPolicyListResultInner listByServer(String resourceGrou } /** - * Lists a servers's table auditing policies. Table auditing is deprecated, use blob auditing instead. + * Lists a server's table auditing policies. Table auditing is deprecated, use blob auditing instead. * * @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. @@ -279,7 +279,7 @@ public ServiceFuture listByServerAsync } /** - * Lists a servers's table auditing policies. Table auditing is deprecated, use blob auditing instead. + * Lists a server's table auditing policies. Table auditing is deprecated, use blob auditing instead. * * @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. @@ -296,7 +296,7 @@ public ServerTableAuditingPolicyListResultInner call(ServiceResponse getAsync(String resourceGroupName, String serverName, String serviceObjectiveName) { ServiceObjectivesInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, serviceObjectiveName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ServiceObjective call(ServiceObjectiveInner inner) { - return wrapModel(inner); + public Observable call(ServiceObjectiveInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServiceObjective)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServiceTierAdvisorsImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServiceTierAdvisorsImpl.java index 18d3f380e3259..d488a1ff56ad1 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServiceTierAdvisorsImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServiceTierAdvisorsImpl.java @@ -54,10 +54,14 @@ public ServiceTierAdvisor call(ServiceTierAdvisorInner inner) { public Observable getAsync(String resourceGroupName, String serverName, String databaseName, String serviceTierAdvisorName) { ServiceTierAdvisorsInner client = this.inner(); return client.getAsync(resourceGroupName, serverName, databaseName, serviceTierAdvisorName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ServiceTierAdvisor call(ServiceTierAdvisorInner inner) { - return wrapModel(inner); + public Observable call(ServiceTierAdvisorInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServiceTierAdvisor)wrapModel(inner)); + } } }); } diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/SqlManagementClientImpl.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/SqlManagementClientImpl.java index 5af41f5955e6b..de4c74963b4f1 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/SqlManagementClientImpl.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/SqlManagementClientImpl.java @@ -158,32 +158,6 @@ public DatabaseAdvisorsInner databaseAdvisors() { return this.databaseAdvisors; } - /** - * The BackupLongTermRetentionPoliciesInner object to access its operations. - */ - private BackupLongTermRetentionPoliciesInner backupLongTermRetentionPolicies; - - /** - * Gets the BackupLongTermRetentionPoliciesInner object to access its operations. - * @return the BackupLongTermRetentionPoliciesInner object. - */ - public BackupLongTermRetentionPoliciesInner backupLongTermRetentionPolicies() { - return this.backupLongTermRetentionPolicies; - } - - /** - * The BackupLongTermRetentionVaultsInner object to access its operations. - */ - private BackupLongTermRetentionVaultsInner backupLongTermRetentionVaults; - - /** - * Gets the BackupLongTermRetentionVaultsInner object to access its operations. - * @return the BackupLongTermRetentionVaultsInner object. - */ - public BackupLongTermRetentionVaultsInner backupLongTermRetentionVaults() { - return this.backupLongTermRetentionVaults; - } - /** * The RecoverableDatabasesInner object to access its operations. */ @@ -676,8 +650,6 @@ protected void initialize() { this.generateClientRequestId = true; this.serverAdvisors = new ServerAdvisorsInner(restClient().retrofit(), this); this.databaseAdvisors = new DatabaseAdvisorsInner(restClient().retrofit(), this); - this.backupLongTermRetentionPolicies = new BackupLongTermRetentionPoliciesInner(restClient().retrofit(), this); - this.backupLongTermRetentionVaults = new BackupLongTermRetentionVaultsInner(restClient().retrofit(), this); this.recoverableDatabases = new RecoverableDatabasesInner(restClient().retrofit(), this); this.restorableDroppedDatabases = new RestorableDroppedDatabasesInner(restClient().retrofit(), this); this.capabilities = new CapabilitiesInner(restClient().retrofit(), this); diff --git a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/SqlManager.java b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/SqlManager.java index 61b8cfd94e451..f13e1569c52ab 100644 --- a/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/SqlManager.java +++ b/sdk/sql/mgmt-v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/SqlManager.java @@ -18,8 +18,6 @@ import com.microsoft.rest.RestClient; import com.microsoft.azure.management.sql.v2014_04_01.ServerAdvisors; import com.microsoft.azure.management.sql.v2014_04_01.DatabaseAdvisors; -import com.microsoft.azure.management.sql.v2014_04_01.BackupLongTermRetentionPolicies; -import com.microsoft.azure.management.sql.v2014_04_01.BackupLongTermRetentionVaults; import com.microsoft.azure.management.sql.v2014_04_01.RecoverableDatabases; import com.microsoft.azure.management.sql.v2014_04_01.RestorableDroppedDatabases; import com.microsoft.azure.management.sql.v2014_04_01.Capabilities; @@ -64,8 +62,6 @@ public final class SqlManager extends ManagerCore { private ServerAdvisors serverAdvisors; private DatabaseAdvisors databaseAdvisors; - private BackupLongTermRetentionPolicies backupLongTermRetentionPolicies; - private BackupLongTermRetentionVaults backupLongTermRetentionVaults; private RecoverableDatabases recoverableDatabases; private RestorableDroppedDatabases restorableDroppedDatabases; private Capabilities capabilities; @@ -168,26 +164,6 @@ public DatabaseAdvisors databaseAdvisors() { return this.databaseAdvisors; } - /** - * @return Entry point to manage BackupLongTermRetentionPolicies. - */ - public BackupLongTermRetentionPolicies backupLongTermRetentionPolicies() { - if (this.backupLongTermRetentionPolicies == null) { - this.backupLongTermRetentionPolicies = new BackupLongTermRetentionPoliciesImpl(this); - } - return this.backupLongTermRetentionPolicies; - } - - /** - * @return Entry point to manage BackupLongTermRetentionVaults. - */ - public BackupLongTermRetentionVaults backupLongTermRetentionVaults() { - if (this.backupLongTermRetentionVaults == null) { - this.backupLongTermRetentionVaults = new BackupLongTermRetentionVaultsImpl(this); - } - return this.backupLongTermRetentionVaults; - } - /** * @return Entry point to manage RecoverableDatabases. */