diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md
index 9fd8fce98c86..e10d5767433f 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2022-02-18)
+- Azure Resource Manager SqlVirtualMachine client library for Java. This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2020-12-18)
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md
index 817d99ae6f7a..5de0f82cc7c9 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md
@@ -2,7 +2,21 @@
Azure Resource Manager SqlVirtualMachine client library for Java.
-This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-2017-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-preview-2021-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
## Getting started
@@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK.
com.azure.resourcemanager
azure-resourcemanager-sqlvirtualmachine
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -60,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
@@ -75,6 +92,8 @@ For details on contributing to this repository, see the [contributing guide](htt
1. Create new Pull Request
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
new file mode 100644
index 000000000000..633760ff8f4e
--- /dev/null
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
@@ -0,0 +1,835 @@
+# Code snippets and samples
+
+
+## AvailabilityGroupListeners
+
+- [CreateOrUpdate](#availabilitygrouplisteners_createorupdate)
+- [Delete](#availabilitygrouplisteners_delete)
+- [Get](#availabilitygrouplisteners_get)
+- [ListByGroup](#availabilitygrouplisteners_listbygroup)
+
+## Operations
+
+- [List](#operations_list)
+
+## SqlVirtualMachineGroups
+
+- [CreateOrUpdate](#sqlvirtualmachinegroups_createorupdate)
+- [Delete](#sqlvirtualmachinegroups_delete)
+- [GetByResourceGroup](#sqlvirtualmachinegroups_getbyresourcegroup)
+- [List](#sqlvirtualmachinegroups_list)
+- [ListByResourceGroup](#sqlvirtualmachinegroups_listbyresourcegroup)
+- [Update](#sqlvirtualmachinegroups_update)
+
+## SqlVirtualMachines
+
+- [CreateOrUpdate](#sqlvirtualmachines_createorupdate)
+- [Delete](#sqlvirtualmachines_delete)
+- [GetByResourceGroup](#sqlvirtualmachines_getbyresourcegroup)
+- [List](#sqlvirtualmachines_list)
+- [ListByResourceGroup](#sqlvirtualmachines_listbyresourcegroup)
+- [ListBySqlVmGroup](#sqlvirtualmachines_listbysqlvmgroup)
+- [Redeploy](#sqlvirtualmachines_redeploy)
+- [StartAssessment](#sqlvirtualmachines_startassessment)
+- [Update](#sqlvirtualmachines_update)
+### AvailabilityGroupListeners_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
+import com.azure.resourcemanager.sqlvirtualmachine.models.PrivateIpAddress;
+import java.util.Arrays;
+
+/** Samples for AvailabilityGroupListeners CreateOrUpdate. */
+public final class AvailabilityGroupListenersCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateAvailabilityGroupListener.json
+ */
+ /**
+ * Sample code: Creates or updates an availability group listener.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void createsOrUpdatesAnAvailabilityGroupListener(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager
+ .availabilityGroupListeners()
+ .define("agl-test")
+ .withExistingSqlVirtualMachineGroup("testrg", "testvmgroup")
+ .withAvailabilityGroupName("ag-test")
+ .withLoadBalancerConfigurations(
+ Arrays
+ .asList(
+ new LoadBalancerConfiguration()
+ .withPrivateIpAddress(
+ new PrivateIpAddress()
+ .withIpAddress("10.1.0.112")
+ .withSubnetResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"))
+ .withLoadBalancerResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test")
+ .withProbePort(59983)
+ .withSqlVirtualMachineInstances(
+ Arrays
+ .asList(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2",
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3"))))
+ .withPort(1433)
+ .create();
+ }
+}
+```
+
+### AvailabilityGroupListeners_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AvailabilityGroupListeners Delete. */
+public final class AvailabilityGroupListenersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteAvailabilityGroupListener.json
+ */
+ /**
+ * Sample code: Deletes an availability group listener.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void deletesAnAvailabilityGroupListener(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.availabilityGroupListeners().delete("testrg", "testvmgroup", "agl-test", Context.NONE);
+ }
+}
+```
+
+### AvailabilityGroupListeners_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AvailabilityGroupListeners Get. */
+public final class AvailabilityGroupListenersGetSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetAvailabilityGroupListener.json
+ */
+ /**
+ * Sample code: Gets an availability group listener.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void getsAnAvailabilityGroupListener(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.availabilityGroupListeners().getWithResponse("testrg", "testvmgroup", "agl-test", null, Context.NONE);
+ }
+}
+```
+
+### AvailabilityGroupListeners_ListByGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AvailabilityGroupListeners ListByGroup. */
+public final class AvailabilityGroupListenersListByGroupSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByGroupAvailabilityGroupListener.json
+ */
+ /**
+ * Sample code: Lists all availability group listeners in a SQL virtual machine group.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void listsAllAvailabilityGroupListenersInASQLVirtualMachineGroup(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.availabilityGroupListeners().listByGroup("testrg", "testvmgroup", Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListOperation.json
+ */
+ /**
+ * Sample code: Lists all of the available SQL Virtual Machine Rest API operations.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void listsAllOfTheAvailableSQLVirtualMachineRestAPIOperations(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachineGroups_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmGroupImageSku;
+import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainProfile;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SqlVirtualMachineGroups CreateOrUpdate. */
+public final class SqlVirtualMachineGroupsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineGroup.json
+ */
+ /**
+ * Sample code: Creates or updates a SQL virtual machine group.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void createsOrUpdatesASQLVirtualMachineGroup(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager
+ .sqlVirtualMachineGroups()
+ .define("testvmgroup")
+ .withRegion("northeurope")
+ .withExistingResourceGroup("testrg")
+ .withTags(mapOf("mytag", "myval"))
+ .withSqlImageOffer("SQL2016-WS2016")
+ .withSqlImageSku(SqlVmGroupImageSku.ENTERPRISE)
+ .withWsfcDomainProfile(
+ new WsfcDomainProfile()
+ .withDomainFqdn("testdomain.com")
+ .withOuPath("OU=WSCluster,DC=testdomain,DC=com")
+ .withClusterBootstrapAccount("testrpadmin")
+ .withClusterOperatorAccount("testrp@testdomain.com")
+ .withSqlServiceAccount("sqlservice@testdomain.com")
+ .withStorageAccountUrl("https://storgact.blob.core.windows.net/")
+ .withStorageAccountPrimaryKey(""))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### SqlVirtualMachineGroups_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachineGroups Delete. */
+public final class SqlVirtualMachineGroupsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteSqlVirtualMachineGroup.json
+ */
+ /**
+ * Sample code: Deletes a SQL virtual machine group.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void deletesASQLVirtualMachineGroup(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachineGroups().delete("testrg", "testvmgroup", Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachineGroups_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachineGroups GetByResourceGroup. */
+public final class SqlVirtualMachineGroupsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetSqlVirtualMachineGroup.json
+ */
+ /**
+ * Sample code: Gets a SQL virtual machine group.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void getsASQLVirtualMachineGroup(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachineGroups().getByResourceGroupWithResponse("testrg", "testvmgroup", Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachineGroups_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachineGroups List. */
+public final class SqlVirtualMachineGroupsListSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListSubscriptionSqlVirtualMachineGroup.json
+ */
+ /**
+ * Sample code: Gets all SQL virtual machine groups in a subscription.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void getsAllSQLVirtualMachineGroupsInASubscription(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachineGroups().list(Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachineGroups_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachineGroups ListByResourceGroup. */
+public final class SqlVirtualMachineGroupsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByResourceGroupSqlVirtualMachineGroup.json
+ */
+ /**
+ * Sample code: Gets all SQL virtual machine groups in a resource group.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void getsAllSQLVirtualMachineGroupsInAResourceGroup(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachineGroups().listByResourceGroup("testrg", Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachineGroups_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineGroup;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SqlVirtualMachineGroups Update. */
+public final class SqlVirtualMachineGroupsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/UpdateSqlVirtualMachineGroup.json
+ */
+ /**
+ * Sample code: Updates a SQL virtual machine group tags.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void updatesASQLVirtualMachineGroupTags(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ SqlVirtualMachineGroup resource =
+ manager
+ .sqlVirtualMachineGroups()
+ .getByResourceGroupWithResponse("testrg", "testvmgroup", Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("mytag", "myval")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### SqlVirtualMachines_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.BackupScheduleType;
+import com.azure.resourcemanager.sqlvirtualmachine.models.ConnectivityType;
+import com.azure.resourcemanager.sqlvirtualmachine.models.DayOfWeek;
+import com.azure.resourcemanager.sqlvirtualmachine.models.DaysOfWeek;
+import com.azure.resourcemanager.sqlvirtualmachine.models.DiskConfigurationType;
+import com.azure.resourcemanager.sqlvirtualmachine.models.FullBackupFrequencyType;
+import com.azure.resourcemanager.sqlvirtualmachine.models.KeyVaultCredentialSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.Schedule;
+import com.azure.resourcemanager.sqlvirtualmachine.models.ServerConfigurationsManagementSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlConnectivityUpdateSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlImageSku;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlInstanceSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlManagementMode;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlServerLicenseType;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlStorageSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlStorageUpdateSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlTempDbSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlWorkloadType;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlWorkloadTypeUpdateSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.StorageConfigurationSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.StorageWorkloadType;
+import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainCredentials;
+import java.util.Arrays;
+
+/** Samples for SqlVirtualMachines CreateOrUpdate. */
+public final class SqlVirtualMachinesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json
+ */
+ /**
+ * Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or
+ * TempDB storage pool.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void
+ createsOrUpdatesASQLVirtualMachineForStorageConfigurationSettingsToEXTENDDataLogOrTempDBStoragePool(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager
+ .sqlVirtualMachines()
+ .define("testvm")
+ .withRegion("northeurope")
+ .withExistingResourceGroup("testrg")
+ .withVirtualMachineResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm")
+ .withStorageConfigurationSettings(
+ new StorageConfigurationSettings()
+ .withSqlDataSettings(new SqlStorageSettings().withLuns(Arrays.asList(2)))
+ .withDiskConfigurationType(DiskConfigurationType.EXTEND))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateVirtualMachineWithVMGroup.json
+ */
+ /**
+ * Sample code: Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void createsOrUpdatesASQLVirtualMachineAndJoinsItToASQLVirtualMachineGroup(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager
+ .sqlVirtualMachines()
+ .define("testvm")
+ .withRegion("northeurope")
+ .withExistingResourceGroup("testrg")
+ .withVirtualMachineResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2")
+ .withWsfcDomainCredentials(
+ new WsfcDomainCredentials()
+ .withClusterBootstrapAccountPassword("")
+ .withClusterOperatorAccountPassword("")
+ .withSqlServiceAccountPassword(""))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json
+ */
+ /**
+ * Sample code: Creates or updates a SQL virtual machine for Automated Back up Settings with Weekly and Days of the
+ * week to run the back up.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void
+ createsOrUpdatesASQLVirtualMachineForAutomatedBackUpSettingsWithWeeklyAndDaysOfTheWeekToRunTheBackUp(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager
+ .sqlVirtualMachines()
+ .define("testvm")
+ .withRegion("northeurope")
+ .withExistingResourceGroup("testrg")
+ .withVirtualMachineResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm")
+ .withSqlServerLicenseType(SqlServerLicenseType.PAYG)
+ .withSqlManagement(SqlManagementMode.FULL)
+ .withSqlImageSku(SqlImageSku.ENTERPRISE)
+ .withAutoPatchingSettings(
+ new AutoPatchingSettings()
+ .withEnable(true)
+ .withDayOfWeek(DayOfWeek.SUNDAY)
+ .withMaintenanceWindowStartingHour(2)
+ .withMaintenanceWindowDuration(60))
+ .withAutoBackupSettings(
+ new AutoBackupSettings()
+ .withEnable(true)
+ .withEnableEncryption(true)
+ .withRetentionPeriod(17)
+ .withStorageAccountUrl("https://teststorage.blob.core.windows.net/")
+ .withStorageContainerName("testcontainer")
+ .withStorageAccessKey("")
+ .withPassword("")
+ .withBackupSystemDbs(true)
+ .withBackupScheduleType(BackupScheduleType.MANUAL)
+ .withFullBackupFrequency(FullBackupFrequencyType.WEEKLY)
+ .withDaysOfWeek(Arrays.asList(DaysOfWeek.MONDAY, DaysOfWeek.FRIDAY))
+ .withFullBackupStartTime(6)
+ .withFullBackupWindowHours(11)
+ .withLogBackupFrequency(10))
+ .withKeyVaultCredentialSettings(new KeyVaultCredentialSettings().withEnable(false))
+ .withServerConfigurationsManagementSettings(
+ new ServerConfigurationsManagementSettings()
+ .withSqlConnectivityUpdateSettings(
+ new SqlConnectivityUpdateSettings()
+ .withConnectivityType(ConnectivityType.PRIVATE)
+ .withPort(1433)
+ .withSqlAuthUpdateUsername("sqllogin")
+ .withSqlAuthUpdatePassword(""))
+ .withSqlWorkloadTypeUpdateSettings(
+ new SqlWorkloadTypeUpdateSettings().withSqlWorkloadType(SqlWorkloadType.OLTP))
+ .withSqlStorageUpdateSettings(
+ new SqlStorageUpdateSettings()
+ .withDiskCount(1)
+ .withStartingDeviceId(2)
+ .withDiskConfigurationType(DiskConfigurationType.NEW))
+ .withAdditionalFeaturesServerConfigurations(
+ new AdditionalFeaturesServerConfigurations().withIsRServicesEnabled(false)))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json
+ */
+ /**
+ * Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and
+ * TempDB storage pool.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void
+ createsOrUpdatesASQLVirtualMachineForStorageConfigurationSettingsToNEWDataLogAndTempDBStoragePool(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager
+ .sqlVirtualMachines()
+ .define("testvm")
+ .withRegion("northeurope")
+ .withExistingResourceGroup("testrg")
+ .withVirtualMachineResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm")
+ .withStorageConfigurationSettings(
+ new StorageConfigurationSettings()
+ .withSqlDataSettings(
+ new SqlStorageSettings().withLuns(Arrays.asList(0)).withDefaultFilePath("F:\\folderpath\\"))
+ .withSqlLogSettings(
+ new SqlStorageSettings().withLuns(Arrays.asList(1)).withDefaultFilePath("G:\\folderpath\\"))
+ .withSqlTempDbSettings(
+ new SqlTempDbSettings()
+ .withDataFileSize(256)
+ .withDataGrowth(512)
+ .withLogFileSize(256)
+ .withLogGrowth(512)
+ .withDataFileCount(8)
+ .withDefaultFilePath("D:\\TEMP"))
+ .withSqlSystemDbOnDataDisk(true)
+ .withDiskConfigurationType(DiskConfigurationType.NEW)
+ .withStorageWorkloadType(StorageWorkloadType.OLTP))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineMAX.json
+ */
+ /**
+ * Sample code: Creates or updates a SQL virtual machine with max parameters.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void createsOrUpdatesASQLVirtualMachineWithMaxParameters(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager
+ .sqlVirtualMachines()
+ .define("testvm")
+ .withRegion("northeurope")
+ .withExistingResourceGroup("testrg")
+ .withVirtualMachineResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm")
+ .withSqlServerLicenseType(SqlServerLicenseType.PAYG)
+ .withSqlManagement(SqlManagementMode.FULL)
+ .withSqlImageSku(SqlImageSku.ENTERPRISE)
+ .withAutoPatchingSettings(
+ new AutoPatchingSettings()
+ .withEnable(true)
+ .withDayOfWeek(DayOfWeek.SUNDAY)
+ .withMaintenanceWindowStartingHour(2)
+ .withMaintenanceWindowDuration(60))
+ .withAutoBackupSettings(
+ new AutoBackupSettings()
+ .withEnable(true)
+ .withEnableEncryption(true)
+ .withRetentionPeriod(17)
+ .withStorageAccountUrl("https://teststorage.blob.core.windows.net/")
+ .withStorageContainerName("testcontainer")
+ .withStorageAccessKey("")
+ .withPassword("")
+ .withBackupSystemDbs(true)
+ .withBackupScheduleType(BackupScheduleType.MANUAL)
+ .withFullBackupFrequency(FullBackupFrequencyType.DAILY)
+ .withFullBackupStartTime(6)
+ .withFullBackupWindowHours(11)
+ .withLogBackupFrequency(10))
+ .withKeyVaultCredentialSettings(new KeyVaultCredentialSettings().withEnable(false))
+ .withServerConfigurationsManagementSettings(
+ new ServerConfigurationsManagementSettings()
+ .withSqlConnectivityUpdateSettings(
+ new SqlConnectivityUpdateSettings()
+ .withConnectivityType(ConnectivityType.PRIVATE)
+ .withPort(1433)
+ .withSqlAuthUpdateUsername("sqllogin")
+ .withSqlAuthUpdatePassword(""))
+ .withSqlWorkloadTypeUpdateSettings(
+ new SqlWorkloadTypeUpdateSettings().withSqlWorkloadType(SqlWorkloadType.OLTP))
+ .withSqlStorageUpdateSettings(
+ new SqlStorageUpdateSettings()
+ .withDiskCount(1)
+ .withStartingDeviceId(2)
+ .withDiskConfigurationType(DiskConfigurationType.NEW))
+ .withAdditionalFeaturesServerConfigurations(
+ new AdditionalFeaturesServerConfigurations().withIsRServicesEnabled(false))
+ .withSqlInstanceSettings(
+ new SqlInstanceSettings()
+ .withCollation("SQL_Latin1_General_CP1_CI_AS")
+ .withMaxDop(8)
+ .withIsOptimizeForAdHocWorkloadsEnabled(true)
+ .withMinServerMemoryMB(0)
+ .withMaxServerMemoryMB(128)))
+ .withAssessmentSettings(
+ new AssessmentSettings()
+ .withEnable(true)
+ .withRunImmediately(true)
+ .withSchedule(
+ new Schedule()
+ .withEnable(true)
+ .withWeeklyInterval(1)
+ .withDayOfWeek(DayOfWeek.SUNDAY)
+ .withStartTime("23:17")))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineMIN.json
+ */
+ /**
+ * Sample code: Creates or updates a SQL virtual machine with min parameters.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void createsOrUpdatesASQLVirtualMachineWithMinParameters(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager
+ .sqlVirtualMachines()
+ .define("testvm")
+ .withRegion("northeurope")
+ .withExistingResourceGroup("testrg")
+ .withVirtualMachineResourceId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm")
+ .create();
+ }
+}
+```
+
+### SqlVirtualMachines_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachines Delete. */
+public final class SqlVirtualMachinesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteSqlVirtualMachine.json
+ */
+ /**
+ * Sample code: Deletes a SQL virtual machine.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void deletesASQLVirtualMachine(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachines().delete("testrg", "testvm1", Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachines_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachines GetByResourceGroup. */
+public final class SqlVirtualMachinesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetSqlVirtualMachine.json
+ */
+ /**
+ * Sample code: Gets a SQL virtual machine.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void getsASQLVirtualMachine(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachines().getByResourceGroupWithResponse("testrg", "testvm", null, Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachines_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachines List. */
+public final class SqlVirtualMachinesListSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListSubscriptionSqlVirtualMachine.json
+ */
+ /**
+ * Sample code: Gets all SQL virtual machines in a subscription.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void getsAllSQLVirtualMachinesInASubscription(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachines().list(Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachines_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachines ListByResourceGroup. */
+public final class SqlVirtualMachinesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByResourceGroupSqlVirtualMachine.json
+ */
+ /**
+ * Sample code: Gets all SQL virtual machines in a resource group.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void getsAllSQLVirtualMachinesInAResourceGroup(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachines().listByResourceGroup("testrg", Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachines_ListBySqlVmGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachines ListBySqlVmGroup. */
+public final class SqlVirtualMachinesListBySqlVmGroupSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json
+ */
+ /**
+ * Sample code: Gets the list of sql virtual machines in a SQL virtual machine group.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void getsTheListOfSqlVirtualMachinesInASQLVirtualMachineGroup(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachines().listBySqlVmGroup("testrg", "testvm", Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachines_Redeploy
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachines Redeploy. */
+public final class SqlVirtualMachinesRedeploySamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/RedeploySqlVirtualMachine.json
+ */
+ /**
+ * Sample code: Uninstalls and reinstalls the SQL Iaas Extension.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void uninstallsAndReinstallsTheSQLIaasExtension(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachines().redeploy("testrg", "testvm", Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachines_StartAssessment
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SqlVirtualMachines StartAssessment. */
+public final class SqlVirtualMachinesStartAssessmentSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/StartAssessmentOnSqlVirtualMachine.json
+ */
+ /**
+ * Sample code: Starts Assessment on SQL virtual machine.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void startsAssessmentOnSQLVirtualMachine(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ manager.sqlVirtualMachines().startAssessment("testrg", "testvm", Context.NONE);
+ }
+}
+```
+
+### SqlVirtualMachines_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachine;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for SqlVirtualMachines Update. */
+public final class SqlVirtualMachinesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/UpdateSqlVirtualMachine.json
+ */
+ /**
+ * Sample code: Updates a SQL virtual machine tags.
+ *
+ * @param manager Entry point to SqlVirtualMachineManager.
+ */
+ public static void updatesASQLVirtualMachineTags(
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) {
+ SqlVirtualMachine resource =
+ manager
+ .sqlVirtualMachines()
+ .getByResourceGroupWithResponse("testrg", "testvm", null, Context.NONE)
+ .getValue();
+ resource.update().withTags(mapOf("mytag", "myval")).apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
index 19b7685eea2b..97ee55776da8 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
@@ -1,50 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-sqlvirtualmachine
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-sqlvirtualmachine
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for SqlVirtualMachine Management
- This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-2017-03-01-preview. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for SqlVirtualMachine Management
+ This package contains Microsoft Azure SDK for SqlVirtualMachine Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The SQL virtual machine management API provides a RESTful set of web APIs that interact with Azure Compute, Network & Storage services to manage your SQL Server virtual machine. The API enables users to create, delete and retrieve a SQL virtual machine, SQL virtual machine group or availability group listener. Package tag package-preview-2021-11.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core-management
- 1.5.2
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.25.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.2
+
+
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/SqlVirtualMachineManager.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/SqlVirtualMachineManager.java
index 1de090ec4187..2fa31b076122 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/SqlVirtualMachineManager.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/SqlVirtualMachineManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -35,6 +36,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/**
* Entry point to SqlVirtualMachineManager. The SQL virtual machine management API provides a RESTful set of web APIs
@@ -94,6 +96,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -133,6 +136,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -169,25 +183,53 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.sqlvirtualmachine")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
- policies
- .add(
- new UserAgentPolicy(
- null,
- "com.azure.resourcemanager.sqlvirtualmachine",
- "1.0.0-beta.1",
- Configuration.getGlobalConfiguration()));
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/AvailabilityGroupListenersClient.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/AvailabilityGroupListenersClient.java
index 9afbf3561495..cb42d8dd67e7 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/AvailabilityGroupListenersClient.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/AvailabilityGroupListenersClient.java
@@ -38,17 +38,19 @@ AvailabilityGroupListenerInner get(
* the Azure Resource Manager API or the portal.
* @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
* @param availabilityGroupListenerName Name of the availability group listener.
+ * @param expand The child resources to include in the response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an availability group listener.
+ * @return an availability group listener along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
String resourceGroupName,
String sqlVirtualMachineGroupName,
String availabilityGroupListenerName,
+ String expand,
Context context);
/**
@@ -62,9 +64,9 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL Server availability group listener.
+ * @return the {@link SyncPoller} for polling of a SQL Server availability group listener.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, AvailabilityGroupListenerInner> beginCreateOrUpdate(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -83,9 +85,9 @@ SyncPoller, AvailabilityGroupListener
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL Server availability group listener.
+ * @return the {@link SyncPoller} for polling of a SQL Server availability group listener.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, AvailabilityGroupListenerInner> beginCreateOrUpdate(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -145,9 +147,9 @@ AvailabilityGroupListenerInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName);
@@ -162,9 +164,9 @@ SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -213,7 +215,7 @@ void delete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of availability group listeners.
+ * @return a list of availability group listeners as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByGroup(
@@ -229,7 +231,7 @@ PagedIterable listByGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of availability group listeners.
+ * @return a list of availability group listeners as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByGroup(
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/OperationsClient.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/OperationsClient.java
index adaa4817e522..ad93d791b083 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/OperationsClient.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/OperationsClient.java
@@ -13,23 +13,23 @@
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public interface OperationsClient {
/**
- * Lists all of the available SQL Rest API operations.
+ * Lists all of the available SQL Virtual Machine Rest API operations.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list SQL operations.
+ * @return result of the request to list SQL operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
- * Lists all of the available SQL Rest API operations.
+ * Lists all of the available SQL Virtual Machine Rest API operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list SQL operations.
+ * @return result of the request to list SQL operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineGroupsClient.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineGroupsClient.java
index e34f1c45816a..6eabd134d166 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineGroupsClient.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachineGroupsClient.java
@@ -40,7 +40,7 @@ public interface SqlVirtualMachineGroupsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -56,9 +56,9 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlVirtualMachineGroupInner> beginCreateOrUpdate(
String resourceGroupName, String sqlVirtualMachineGroupName, SqlVirtualMachineGroupInner parameters);
@@ -73,9 +73,9 @@ SyncPoller, SqlVirtualMachineGroupInner>
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlVirtualMachineGroupInner> beginCreateOrUpdate(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -127,9 +127,9 @@ SqlVirtualMachineGroupInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineGroupName);
/**
@@ -142,9 +142,9 @@ SqlVirtualMachineGroupInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlVirtualMachineGroupName, Context context);
@@ -185,9 +185,9 @@ SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlVirtualMachineGroupInner> beginUpdate(
String resourceGroupName, String sqlVirtualMachineGroupName, SqlVirtualMachineGroupUpdate parameters);
@@ -202,9 +202,9 @@ SyncPoller, SqlVirtualMachineGroupInner>
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlVirtualMachineGroupInner> beginUpdate(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -255,7 +255,7 @@ SqlVirtualMachineGroupInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all SQL virtual machine groups in a resource group.
+ * @return all SQL virtual machine groups in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -269,7 +269,7 @@ SqlVirtualMachineGroupInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all SQL virtual machine groups in a resource group.
+ * @return all SQL virtual machine groups in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -279,7 +279,7 @@ SqlVirtualMachineGroupInner update(
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all SQL virtual machine groups in a subscription.
+ * @return all SQL virtual machine groups in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -291,7 +291,7 @@ SqlVirtualMachineGroupInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all SQL virtual machine groups in a subscription.
+ * @return all SQL virtual machine groups in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachinesClient.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachinesClient.java
index ef2d554ca5d2..4ebf4f68c6e2 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachinesClient.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/SqlVirtualMachinesClient.java
@@ -25,7 +25,8 @@ public interface SqlVirtualMachinesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of sql virtual machines in a SQL virtual machine group.
+ * @return the list of sql virtual machines in a SQL virtual machine group as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listBySqlVmGroup(String resourceGroupName, String sqlVirtualMachineGroupName);
@@ -40,7 +41,8 @@ public interface SqlVirtualMachinesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of sql virtual machines in a SQL virtual machine group.
+ * @return the list of sql virtual machines in a SQL virtual machine group as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listBySqlVmGroup(
@@ -51,7 +53,7 @@ PagedIterable listBySqlVmGroup(
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all SQL virtual machines in a subscription.
+ * @return all SQL virtual machines in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -63,11 +65,68 @@ PagedIterable listBySqlVmGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all SQL virtual machines in a subscription.
+ * @return all SQL virtual machines in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
+ /**
+ * Uninstalls and reinstalls the SQL Iaas Extension.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName);
+
+ /**
+ * Uninstalls and reinstalls the SQL Iaas Extension.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRedeploy(
+ String resourceGroupName, String sqlVirtualMachineName, Context context);
+
+ /**
+ * Uninstalls and reinstalls the SQL Iaas Extension.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void redeploy(String resourceGroupName, String sqlVirtualMachineName);
+
+ /**
+ * Uninstalls and reinstalls the SQL Iaas Extension.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context);
+
/**
* Gets a SQL virtual machine.
*
@@ -93,7 +152,7 @@ PagedIterable listBySqlVmGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine.
+ * @return a SQL virtual machine along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -109,9 +168,9 @@ Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters);
@@ -126,9 +185,9 @@ SyncPoller, SqlVirtualMachineInner> beginCrea
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context);
@@ -174,9 +233,9 @@ SqlVirtualMachineInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineName);
/**
@@ -189,9 +248,9 @@ SqlVirtualMachineInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlVirtualMachineName, Context context);
@@ -232,9 +291,9 @@ SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlVirtualMachineInner> beginUpdate(
String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters);
@@ -249,9 +308,9 @@ SyncPoller, SqlVirtualMachineInner> beginUpda
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, SqlVirtualMachineInner> beginUpdate(
String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context);
@@ -296,7 +355,7 @@ SqlVirtualMachineInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all SQL virtual machines in a resource group.
+ * @return all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -310,8 +369,65 @@ SqlVirtualMachineInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all SQL virtual machines in a resource group.
+ * @return all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Starts Assessment on SQL virtual machine.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStartAssessment(String resourceGroupName, String sqlVirtualMachineName);
+
+ /**
+ * Starts Assessment on SQL virtual machine.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStartAssessment(
+ String resourceGroupName, String sqlVirtualMachineName, Context context);
+
+ /**
+ * Starts Assessment on SQL virtual machine.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void startAssessment(String resourceGroupName, String sqlVirtualMachineName);
+
+ /**
+ * Starts Assessment on SQL virtual machine.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context);
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java
index 7238b97557ac..db15c49ec319 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java
@@ -5,49 +5,49 @@
package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** A SQL Server availability group listener. */
-@JsonFlatten
@Fluent
-public class AvailabilityGroupListenerInner extends ProxyResource {
+public final class AvailabilityGroupListenerInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenerInner.class);
/*
- * Provisioning state to track the async operation status.
+ * Resource properties.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private String provisioningState;
+ @JsonProperty(value = "properties")
+ private AvailabilityGroupListenerProperties innerProperties;
/*
- * Name of the availability group.
+ * Metadata pertaining to creation and last modification of the resource.
*/
- @JsonProperty(value = "properties.availabilityGroupName")
- private String availabilityGroupName;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
- /*
- * List of load balancer configurations for an availability group listener.
- */
- @JsonProperty(value = "properties.loadBalancerConfigurations")
- private List loadBalancerConfigurations;
-
- /*
- * Create a default availability group if it does not exist.
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.createDefaultAvailabilityGroupIfNotExist")
- private Boolean createDefaultAvailabilityGroupIfNotExist;
+ private AvailabilityGroupListenerProperties innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * Listener port.
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
*/
- @JsonProperty(value = "properties.port")
- private Integer port;
+ public SystemData systemData() {
+ return this.systemData;
+ }
/**
* Get the provisioningState property: Provisioning state to track the async operation status.
@@ -55,7 +55,7 @@ public class AvailabilityGroupListenerInner extends ProxyResource {
* @return the provisioningState value.
*/
public String provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -64,7 +64,7 @@ public String provisioningState() {
* @return the availabilityGroupName value.
*/
public String availabilityGroupName() {
- return this.availabilityGroupName;
+ return this.innerProperties() == null ? null : this.innerProperties().availabilityGroupName();
}
/**
@@ -74,7 +74,10 @@ public String availabilityGroupName() {
* @return the AvailabilityGroupListenerInner object itself.
*/
public AvailabilityGroupListenerInner withAvailabilityGroupName(String availabilityGroupName) {
- this.availabilityGroupName = availabilityGroupName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AvailabilityGroupListenerProperties();
+ }
+ this.innerProperties().withAvailabilityGroupName(availabilityGroupName);
return this;
}
@@ -85,7 +88,7 @@ public AvailabilityGroupListenerInner withAvailabilityGroupName(String availabil
* @return the loadBalancerConfigurations value.
*/
public List loadBalancerConfigurations() {
- return this.loadBalancerConfigurations;
+ return this.innerProperties() == null ? null : this.innerProperties().loadBalancerConfigurations();
}
/**
@@ -97,7 +100,10 @@ public List loadBalancerConfigurations() {
*/
public AvailabilityGroupListenerInner withLoadBalancerConfigurations(
List loadBalancerConfigurations) {
- this.loadBalancerConfigurations = loadBalancerConfigurations;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AvailabilityGroupListenerProperties();
+ }
+ this.innerProperties().withLoadBalancerConfigurations(loadBalancerConfigurations);
return this;
}
@@ -108,7 +114,9 @@ public AvailabilityGroupListenerInner withLoadBalancerConfigurations(
* @return the createDefaultAvailabilityGroupIfNotExist value.
*/
public Boolean createDefaultAvailabilityGroupIfNotExist() {
- return this.createDefaultAvailabilityGroupIfNotExist;
+ return this.innerProperties() == null
+ ? null
+ : this.innerProperties().createDefaultAvailabilityGroupIfNotExist();
}
/**
@@ -120,7 +128,10 @@ public Boolean createDefaultAvailabilityGroupIfNotExist() {
*/
public AvailabilityGroupListenerInner withCreateDefaultAvailabilityGroupIfNotExist(
Boolean createDefaultAvailabilityGroupIfNotExist) {
- this.createDefaultAvailabilityGroupIfNotExist = createDefaultAvailabilityGroupIfNotExist;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AvailabilityGroupListenerProperties();
+ }
+ this.innerProperties().withCreateDefaultAvailabilityGroupIfNotExist(createDefaultAvailabilityGroupIfNotExist);
return this;
}
@@ -130,7 +141,7 @@ public AvailabilityGroupListenerInner withCreateDefaultAvailabilityGroupIfNotExi
* @return the port value.
*/
public Integer port() {
- return this.port;
+ return this.innerProperties() == null ? null : this.innerProperties().port();
}
/**
@@ -140,7 +151,34 @@ public Integer port() {
* @return the AvailabilityGroupListenerInner object itself.
*/
public AvailabilityGroupListenerInner withPort(Integer port) {
- this.port = port;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AvailabilityGroupListenerProperties();
+ }
+ this.innerProperties().withPort(port);
+ return this;
+ }
+
+ /**
+ * Get the availabilityGroupConfiguration property: Availability Group configuration.
+ *
+ * @return the availabilityGroupConfiguration value.
+ */
+ public AgConfiguration availabilityGroupConfiguration() {
+ return this.innerProperties() == null ? null : this.innerProperties().availabilityGroupConfiguration();
+ }
+
+ /**
+ * Set the availabilityGroupConfiguration property: Availability Group configuration.
+ *
+ * @param availabilityGroupConfiguration the availabilityGroupConfiguration value to set.
+ * @return the AvailabilityGroupListenerInner object itself.
+ */
+ public AvailabilityGroupListenerInner withAvailabilityGroupConfiguration(
+ AgConfiguration availabilityGroupConfiguration) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new AvailabilityGroupListenerProperties();
+ }
+ this.innerProperties().withAvailabilityGroupConfiguration(availabilityGroupConfiguration);
return this;
}
@@ -150,8 +188,8 @@ public AvailabilityGroupListenerInner withPort(Integer port) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (loadBalancerConfigurations() != null) {
- loadBalancerConfigurations().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java
new file mode 100644
index 000000000000..ef8f4ad9abc6
--- /dev/null
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java
@@ -0,0 +1,185 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration;
+import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The properties of an availability group listener. */
+@Fluent
+public final class AvailabilityGroupListenerProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenerProperties.class);
+
+ /*
+ * Provisioning state to track the async operation status.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /*
+ * Name of the availability group.
+ */
+ @JsonProperty(value = "availabilityGroupName")
+ private String availabilityGroupName;
+
+ /*
+ * List of load balancer configurations for an availability group listener.
+ */
+ @JsonProperty(value = "loadBalancerConfigurations")
+ private List loadBalancerConfigurations;
+
+ /*
+ * Create a default availability group if it does not exist.
+ */
+ @JsonProperty(value = "createDefaultAvailabilityGroupIfNotExist")
+ private Boolean createDefaultAvailabilityGroupIfNotExist;
+
+ /*
+ * Listener port.
+ */
+ @JsonProperty(value = "port")
+ private Integer port;
+
+ /*
+ * Availability Group configuration.
+ */
+ @JsonProperty(value = "availabilityGroupConfiguration")
+ private AgConfiguration availabilityGroupConfiguration;
+
+ /**
+ * Get the provisioningState property: Provisioning state to track the async operation status.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the availabilityGroupName property: Name of the availability group.
+ *
+ * @return the availabilityGroupName value.
+ */
+ public String availabilityGroupName() {
+ return this.availabilityGroupName;
+ }
+
+ /**
+ * Set the availabilityGroupName property: Name of the availability group.
+ *
+ * @param availabilityGroupName the availabilityGroupName value to set.
+ * @return the AvailabilityGroupListenerProperties object itself.
+ */
+ public AvailabilityGroupListenerProperties withAvailabilityGroupName(String availabilityGroupName) {
+ this.availabilityGroupName = availabilityGroupName;
+ return this;
+ }
+
+ /**
+ * Get the loadBalancerConfigurations property: List of load balancer configurations for an availability group
+ * listener.
+ *
+ * @return the loadBalancerConfigurations value.
+ */
+ public List loadBalancerConfigurations() {
+ return this.loadBalancerConfigurations;
+ }
+
+ /**
+ * Set the loadBalancerConfigurations property: List of load balancer configurations for an availability group
+ * listener.
+ *
+ * @param loadBalancerConfigurations the loadBalancerConfigurations value to set.
+ * @return the AvailabilityGroupListenerProperties object itself.
+ */
+ public AvailabilityGroupListenerProperties withLoadBalancerConfigurations(
+ List loadBalancerConfigurations) {
+ this.loadBalancerConfigurations = loadBalancerConfigurations;
+ return this;
+ }
+
+ /**
+ * Get the createDefaultAvailabilityGroupIfNotExist property: Create a default availability group if it does not
+ * exist.
+ *
+ * @return the createDefaultAvailabilityGroupIfNotExist value.
+ */
+ public Boolean createDefaultAvailabilityGroupIfNotExist() {
+ return this.createDefaultAvailabilityGroupIfNotExist;
+ }
+
+ /**
+ * Set the createDefaultAvailabilityGroupIfNotExist property: Create a default availability group if it does not
+ * exist.
+ *
+ * @param createDefaultAvailabilityGroupIfNotExist the createDefaultAvailabilityGroupIfNotExist value to set.
+ * @return the AvailabilityGroupListenerProperties object itself.
+ */
+ public AvailabilityGroupListenerProperties withCreateDefaultAvailabilityGroupIfNotExist(
+ Boolean createDefaultAvailabilityGroupIfNotExist) {
+ this.createDefaultAvailabilityGroupIfNotExist = createDefaultAvailabilityGroupIfNotExist;
+ return this;
+ }
+
+ /**
+ * Get the port property: Listener port.
+ *
+ * @return the port value.
+ */
+ public Integer port() {
+ return this.port;
+ }
+
+ /**
+ * Set the port property: Listener port.
+ *
+ * @param port the port value to set.
+ * @return the AvailabilityGroupListenerProperties object itself.
+ */
+ public AvailabilityGroupListenerProperties withPort(Integer port) {
+ this.port = port;
+ return this;
+ }
+
+ /**
+ * Get the availabilityGroupConfiguration property: Availability Group configuration.
+ *
+ * @return the availabilityGroupConfiguration value.
+ */
+ public AgConfiguration availabilityGroupConfiguration() {
+ return this.availabilityGroupConfiguration;
+ }
+
+ /**
+ * Set the availabilityGroupConfiguration property: Availability Group configuration.
+ *
+ * @param availabilityGroupConfiguration the availabilityGroupConfiguration value to set.
+ * @return the AvailabilityGroupListenerProperties object itself.
+ */
+ public AvailabilityGroupListenerProperties withAvailabilityGroupConfiguration(
+ AgConfiguration availabilityGroupConfiguration) {
+ this.availabilityGroupConfiguration = availabilityGroupConfiguration;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (loadBalancerConfigurations() != null) {
+ loadBalancerConfigurations().forEach(e -> e.validate());
+ }
+ if (availabilityGroupConfiguration() != null) {
+ availabilityGroupConfiguration().validate();
+ }
+ }
+}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java
index cf222e4cbd3a..b7eb2ffbc9f5 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java
@@ -9,6 +9,7 @@
import com.azure.resourcemanager.sqlvirtualmachine.models.OperationDisplay;
import com.azure.resourcemanager.sqlvirtualmachine.models.OperationOrigin;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -40,6 +41,7 @@ public final class OperationInner {
* Additional descriptions for the operation.
*/
@JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map properties;
/**
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java
index ac6365e974c9..1cbca3acb829 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java
@@ -5,8 +5,8 @@
package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterManagerType;
@@ -18,53 +18,53 @@
import java.util.Map;
/** A SQL virtual machine group. */
-@JsonFlatten
@Fluent
-public class SqlVirtualMachineGroupInner extends Resource {
+public final class SqlVirtualMachineGroupInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupInner.class);
/*
- * Provisioning state to track the async operation status.
+ * Resource properties.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private String provisioningState;
+ @JsonProperty(value = "properties")
+ private SqlVirtualMachineGroupProperties innerProperties;
/*
- * SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
+ * Metadata pertaining to creation and last modification of the resource.
*/
- @JsonProperty(value = "properties.sqlImageOffer")
- private String sqlImageOffer;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
- /*
- * SQL image sku.
- */
- @JsonProperty(value = "properties.sqlImageSku")
- private SqlVmGroupImageSku sqlImageSku;
-
- /*
- * Scale type.
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.scaleType", access = JsonProperty.Access.WRITE_ONLY)
- private ScaleType scaleType;
+ private SqlVirtualMachineGroupProperties innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * Type of cluster manager: Windows Server Failover Cluster (WSFC), implied
- * by the scale type of the group and the OS type.
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
*/
- @JsonProperty(value = "properties.clusterManagerType", access = JsonProperty.Access.WRITE_ONLY)
- private ClusterManagerType clusterManagerType;
+ public SystemData systemData() {
+ return this.systemData;
+ }
- /*
- * Cluster type.
- */
- @JsonProperty(value = "properties.clusterConfiguration", access = JsonProperty.Access.WRITE_ONLY)
- private ClusterConfiguration clusterConfiguration;
+ /** {@inheritDoc} */
+ @Override
+ public SqlVirtualMachineGroupInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
- /*
- * Cluster Active Directory domain profile.
- */
- @JsonProperty(value = "properties.wsfcDomainProfile")
- private WsfcDomainProfile wsfcDomainProfile;
+ /** {@inheritDoc} */
+ @Override
+ public SqlVirtualMachineGroupInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
/**
* Get the provisioningState property: Provisioning state to track the async operation status.
@@ -72,7 +72,7 @@ public class SqlVirtualMachineGroupInner extends Resource {
* @return the provisioningState value.
*/
public String provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -81,7 +81,7 @@ public String provisioningState() {
* @return the sqlImageOffer value.
*/
public String sqlImageOffer() {
- return this.sqlImageOffer;
+ return this.innerProperties() == null ? null : this.innerProperties().sqlImageOffer();
}
/**
@@ -91,7 +91,10 @@ public String sqlImageOffer() {
* @return the SqlVirtualMachineGroupInner object itself.
*/
public SqlVirtualMachineGroupInner withSqlImageOffer(String sqlImageOffer) {
- this.sqlImageOffer = sqlImageOffer;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineGroupProperties();
+ }
+ this.innerProperties().withSqlImageOffer(sqlImageOffer);
return this;
}
@@ -101,7 +104,7 @@ public SqlVirtualMachineGroupInner withSqlImageOffer(String sqlImageOffer) {
* @return the sqlImageSku value.
*/
public SqlVmGroupImageSku sqlImageSku() {
- return this.sqlImageSku;
+ return this.innerProperties() == null ? null : this.innerProperties().sqlImageSku();
}
/**
@@ -111,7 +114,10 @@ public SqlVmGroupImageSku sqlImageSku() {
* @return the SqlVirtualMachineGroupInner object itself.
*/
public SqlVirtualMachineGroupInner withSqlImageSku(SqlVmGroupImageSku sqlImageSku) {
- this.sqlImageSku = sqlImageSku;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineGroupProperties();
+ }
+ this.innerProperties().withSqlImageSku(sqlImageSku);
return this;
}
@@ -121,7 +127,7 @@ public SqlVirtualMachineGroupInner withSqlImageSku(SqlVmGroupImageSku sqlImageSk
* @return the scaleType value.
*/
public ScaleType scaleType() {
- return this.scaleType;
+ return this.innerProperties() == null ? null : this.innerProperties().scaleType();
}
/**
@@ -131,7 +137,7 @@ public ScaleType scaleType() {
* @return the clusterManagerType value.
*/
public ClusterManagerType clusterManagerType() {
- return this.clusterManagerType;
+ return this.innerProperties() == null ? null : this.innerProperties().clusterManagerType();
}
/**
@@ -140,7 +146,7 @@ public ClusterManagerType clusterManagerType() {
* @return the clusterConfiguration value.
*/
public ClusterConfiguration clusterConfiguration() {
- return this.clusterConfiguration;
+ return this.innerProperties() == null ? null : this.innerProperties().clusterConfiguration();
}
/**
@@ -149,7 +155,7 @@ public ClusterConfiguration clusterConfiguration() {
* @return the wsfcDomainProfile value.
*/
public WsfcDomainProfile wsfcDomainProfile() {
- return this.wsfcDomainProfile;
+ return this.innerProperties() == null ? null : this.innerProperties().wsfcDomainProfile();
}
/**
@@ -159,21 +165,10 @@ public WsfcDomainProfile wsfcDomainProfile() {
* @return the SqlVirtualMachineGroupInner object itself.
*/
public SqlVirtualMachineGroupInner withWsfcDomainProfile(WsfcDomainProfile wsfcDomainProfile) {
- this.wsfcDomainProfile = wsfcDomainProfile;
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public SqlVirtualMachineGroupInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public SqlVirtualMachineGroupInner withTags(Map tags) {
- super.withTags(tags);
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineGroupProperties();
+ }
+ this.innerProperties().withWsfcDomainProfile(wsfcDomainProfile);
return this;
}
@@ -183,8 +178,8 @@ public SqlVirtualMachineGroupInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (wsfcDomainProfile() != null) {
- wsfcDomainProfile().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java
new file mode 100644
index 000000000000..3294061efdc2
--- /dev/null
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterConfiguration;
+import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterManagerType;
+import com.azure.resourcemanager.sqlvirtualmachine.models.ScaleType;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmGroupImageSku;
+import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainProfile;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The properties of a SQL virtual machine group. */
+@Fluent
+public final class SqlVirtualMachineGroupProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupProperties.class);
+
+ /*
+ * Provisioning state to track the async operation status.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /*
+ * SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
+ */
+ @JsonProperty(value = "sqlImageOffer")
+ private String sqlImageOffer;
+
+ /*
+ * SQL image sku.
+ */
+ @JsonProperty(value = "sqlImageSku")
+ private SqlVmGroupImageSku sqlImageSku;
+
+ /*
+ * Scale type.
+ */
+ @JsonProperty(value = "scaleType", access = JsonProperty.Access.WRITE_ONLY)
+ private ScaleType scaleType;
+
+ /*
+ * Type of cluster manager: Windows Server Failover Cluster (WSFC), implied
+ * by the scale type of the group and the OS type.
+ */
+ @JsonProperty(value = "clusterManagerType", access = JsonProperty.Access.WRITE_ONLY)
+ private ClusterManagerType clusterManagerType;
+
+ /*
+ * Cluster type.
+ */
+ @JsonProperty(value = "clusterConfiguration", access = JsonProperty.Access.WRITE_ONLY)
+ private ClusterConfiguration clusterConfiguration;
+
+ /*
+ * Cluster Active Directory domain profile.
+ */
+ @JsonProperty(value = "wsfcDomainProfile")
+ private WsfcDomainProfile wsfcDomainProfile;
+
+ /**
+ * Get the provisioningState property: Provisioning state to track the async operation status.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the sqlImageOffer property: SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
+ *
+ * @return the sqlImageOffer value.
+ */
+ public String sqlImageOffer() {
+ return this.sqlImageOffer;
+ }
+
+ /**
+ * Set the sqlImageOffer property: SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
+ *
+ * @param sqlImageOffer the sqlImageOffer value to set.
+ * @return the SqlVirtualMachineGroupProperties object itself.
+ */
+ public SqlVirtualMachineGroupProperties withSqlImageOffer(String sqlImageOffer) {
+ this.sqlImageOffer = sqlImageOffer;
+ return this;
+ }
+
+ /**
+ * Get the sqlImageSku property: SQL image sku.
+ *
+ * @return the sqlImageSku value.
+ */
+ public SqlVmGroupImageSku sqlImageSku() {
+ return this.sqlImageSku;
+ }
+
+ /**
+ * Set the sqlImageSku property: SQL image sku.
+ *
+ * @param sqlImageSku the sqlImageSku value to set.
+ * @return the SqlVirtualMachineGroupProperties object itself.
+ */
+ public SqlVirtualMachineGroupProperties withSqlImageSku(SqlVmGroupImageSku sqlImageSku) {
+ this.sqlImageSku = sqlImageSku;
+ return this;
+ }
+
+ /**
+ * Get the scaleType property: Scale type.
+ *
+ * @return the scaleType value.
+ */
+ public ScaleType scaleType() {
+ return this.scaleType;
+ }
+
+ /**
+ * Get the clusterManagerType property: Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by
+ * the scale type of the group and the OS type.
+ *
+ * @return the clusterManagerType value.
+ */
+ public ClusterManagerType clusterManagerType() {
+ return this.clusterManagerType;
+ }
+
+ /**
+ * Get the clusterConfiguration property: Cluster type.
+ *
+ * @return the clusterConfiguration value.
+ */
+ public ClusterConfiguration clusterConfiguration() {
+ return this.clusterConfiguration;
+ }
+
+ /**
+ * Get the wsfcDomainProfile property: Cluster Active Directory domain profile.
+ *
+ * @return the wsfcDomainProfile value.
+ */
+ public WsfcDomainProfile wsfcDomainProfile() {
+ return this.wsfcDomainProfile;
+ }
+
+ /**
+ * Set the wsfcDomainProfile property: Cluster Active Directory domain profile.
+ *
+ * @param wsfcDomainProfile the wsfcDomainProfile value to set.
+ * @return the SqlVirtualMachineGroupProperties object itself.
+ */
+ public SqlVirtualMachineGroupProperties withWsfcDomainProfile(WsfcDomainProfile wsfcDomainProfile) {
+ this.wsfcDomainProfile = wsfcDomainProfile;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (wsfcDomainProfile() != null) {
+ wsfcDomainProfile().validate();
+ }
+ }
+}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineInner.java
index b953cc9e4340..eac89001ab04 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineInner.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineInner.java
@@ -5,9 +5,10 @@
package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings;
import com.azure.resourcemanager.sqlvirtualmachine.models.KeyVaultCredentialSettings;
@@ -23,9 +24,8 @@
import java.util.Map;
/** A SQL virtual machine. */
-@JsonFlatten
@Fluent
-public class SqlVirtualMachineInner extends Resource {
+public final class SqlVirtualMachineInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineInner.class);
/*
@@ -35,86 +35,16 @@ public class SqlVirtualMachineInner extends Resource {
private ResourceIdentity identity;
/*
- * ARM Resource id of underlying virtual machine created from SQL
- * marketplace image.
- */
- @JsonProperty(value = "properties.virtualMachineResourceId")
- private String virtualMachineResourceId;
-
- /*
- * Provisioning state to track the async operation status.
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private String provisioningState;
-
- /*
- * SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.
- */
- @JsonProperty(value = "properties.sqlImageOffer")
- private String sqlImageOffer;
-
- /*
- * SQL Server license type.
- */
- @JsonProperty(value = "properties.sqlServerLicenseType")
- private SqlServerLicenseType sqlServerLicenseType;
-
- /*
- * SQL Server Management type.
- */
- @JsonProperty(value = "properties.sqlManagement")
- private SqlManagementMode sqlManagement;
-
- /*
- * SQL Server edition type.
- */
- @JsonProperty(value = "properties.sqlImageSku")
- private SqlImageSku sqlImageSku;
-
- /*
- * ARM resource id of the SQL virtual machine group this SQL virtual
- * machine is or will be part of.
- */
- @JsonProperty(value = "properties.sqlVirtualMachineGroupResourceId")
- private String sqlVirtualMachineGroupResourceId;
-
- /*
- * Domain credentials for setting up Windows Server Failover Cluster for
- * SQL availability group.
+ * Resource properties.
*/
- @JsonProperty(value = "properties.wsfcDomainCredentials")
- private WsfcDomainCredentials wsfcDomainCredentials;
+ @JsonProperty(value = "properties")
+ private SqlVirtualMachineProperties innerProperties;
/*
- * Auto patching settings for applying critical security updates to SQL
- * virtual machine.
+ * Metadata pertaining to creation and last modification of the resource.
*/
- @JsonProperty(value = "properties.autoPatchingSettings")
- private AutoPatchingSettings autoPatchingSettings;
-
- /*
- * Auto backup settings for SQL Server.
- */
- @JsonProperty(value = "properties.autoBackupSettings")
- private AutoBackupSettings autoBackupSettings;
-
- /*
- * Key vault credential settings.
- */
- @JsonProperty(value = "properties.keyVaultCredentialSettings")
- private KeyVaultCredentialSettings keyVaultCredentialSettings;
-
- /*
- * SQL Server configuration management settings.
- */
- @JsonProperty(value = "properties.serverConfigurationsManagementSettings")
- private ServerConfigurationsManagementSettings serverConfigurationsManagementSettings;
-
- /*
- * Storage Configuration Settings.
- */
- @JsonProperty(value = "properties.storageConfigurationSettings")
- private StorageConfigurationSettings storageConfigurationSettings;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/**
* Get the identity property: Azure Active Directory identity of the server.
@@ -136,6 +66,38 @@ public SqlVirtualMachineInner withIdentity(ResourceIdentity identity) {
return this;
}
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private SqlVirtualMachineProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SqlVirtualMachineInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public SqlVirtualMachineInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the virtualMachineResourceId property: ARM Resource id of underlying virtual machine created from SQL
* marketplace image.
@@ -143,7 +105,7 @@ public SqlVirtualMachineInner withIdentity(ResourceIdentity identity) {
* @return the virtualMachineResourceId value.
*/
public String virtualMachineResourceId() {
- return this.virtualMachineResourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().virtualMachineResourceId();
}
/**
@@ -154,7 +116,10 @@ public String virtualMachineResourceId() {
* @return the SqlVirtualMachineInner object itself.
*/
public SqlVirtualMachineInner withVirtualMachineResourceId(String virtualMachineResourceId) {
- this.virtualMachineResourceId = virtualMachineResourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withVirtualMachineResourceId(virtualMachineResourceId);
return this;
}
@@ -164,7 +129,7 @@ public SqlVirtualMachineInner withVirtualMachineResourceId(String virtualMachine
* @return the provisioningState value.
*/
public String provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -173,7 +138,7 @@ public String provisioningState() {
* @return the sqlImageOffer value.
*/
public String sqlImageOffer() {
- return this.sqlImageOffer;
+ return this.innerProperties() == null ? null : this.innerProperties().sqlImageOffer();
}
/**
@@ -183,7 +148,10 @@ public String sqlImageOffer() {
* @return the SqlVirtualMachineInner object itself.
*/
public SqlVirtualMachineInner withSqlImageOffer(String sqlImageOffer) {
- this.sqlImageOffer = sqlImageOffer;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withSqlImageOffer(sqlImageOffer);
return this;
}
@@ -193,7 +161,7 @@ public SqlVirtualMachineInner withSqlImageOffer(String sqlImageOffer) {
* @return the sqlServerLicenseType value.
*/
public SqlServerLicenseType sqlServerLicenseType() {
- return this.sqlServerLicenseType;
+ return this.innerProperties() == null ? null : this.innerProperties().sqlServerLicenseType();
}
/**
@@ -203,7 +171,10 @@ public SqlServerLicenseType sqlServerLicenseType() {
* @return the SqlVirtualMachineInner object itself.
*/
public SqlVirtualMachineInner withSqlServerLicenseType(SqlServerLicenseType sqlServerLicenseType) {
- this.sqlServerLicenseType = sqlServerLicenseType;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withSqlServerLicenseType(sqlServerLicenseType);
return this;
}
@@ -213,7 +184,7 @@ public SqlVirtualMachineInner withSqlServerLicenseType(SqlServerLicenseType sqlS
* @return the sqlManagement value.
*/
public SqlManagementMode sqlManagement() {
- return this.sqlManagement;
+ return this.innerProperties() == null ? null : this.innerProperties().sqlManagement();
}
/**
@@ -223,7 +194,10 @@ public SqlManagementMode sqlManagement() {
* @return the SqlVirtualMachineInner object itself.
*/
public SqlVirtualMachineInner withSqlManagement(SqlManagementMode sqlManagement) {
- this.sqlManagement = sqlManagement;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withSqlManagement(sqlManagement);
return this;
}
@@ -233,7 +207,7 @@ public SqlVirtualMachineInner withSqlManagement(SqlManagementMode sqlManagement)
* @return the sqlImageSku value.
*/
public SqlImageSku sqlImageSku() {
- return this.sqlImageSku;
+ return this.innerProperties() == null ? null : this.innerProperties().sqlImageSku();
}
/**
@@ -243,7 +217,10 @@ public SqlImageSku sqlImageSku() {
* @return the SqlVirtualMachineInner object itself.
*/
public SqlVirtualMachineInner withSqlImageSku(SqlImageSku sqlImageSku) {
- this.sqlImageSku = sqlImageSku;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withSqlImageSku(sqlImageSku);
return this;
}
@@ -254,7 +231,7 @@ public SqlVirtualMachineInner withSqlImageSku(SqlImageSku sqlImageSku) {
* @return the sqlVirtualMachineGroupResourceId value.
*/
public String sqlVirtualMachineGroupResourceId() {
- return this.sqlVirtualMachineGroupResourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().sqlVirtualMachineGroupResourceId();
}
/**
@@ -265,7 +242,10 @@ public String sqlVirtualMachineGroupResourceId() {
* @return the SqlVirtualMachineInner object itself.
*/
public SqlVirtualMachineInner withSqlVirtualMachineGroupResourceId(String sqlVirtualMachineGroupResourceId) {
- this.sqlVirtualMachineGroupResourceId = sqlVirtualMachineGroupResourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withSqlVirtualMachineGroupResourceId(sqlVirtualMachineGroupResourceId);
return this;
}
@@ -276,7 +256,7 @@ public SqlVirtualMachineInner withSqlVirtualMachineGroupResourceId(String sqlVir
* @return the wsfcDomainCredentials value.
*/
public WsfcDomainCredentials wsfcDomainCredentials() {
- return this.wsfcDomainCredentials;
+ return this.innerProperties() == null ? null : this.innerProperties().wsfcDomainCredentials();
}
/**
@@ -287,7 +267,10 @@ public WsfcDomainCredentials wsfcDomainCredentials() {
* @return the SqlVirtualMachineInner object itself.
*/
public SqlVirtualMachineInner withWsfcDomainCredentials(WsfcDomainCredentials wsfcDomainCredentials) {
- this.wsfcDomainCredentials = wsfcDomainCredentials;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withWsfcDomainCredentials(wsfcDomainCredentials);
return this;
}
@@ -298,7 +281,7 @@ public SqlVirtualMachineInner withWsfcDomainCredentials(WsfcDomainCredentials ws
* @return the autoPatchingSettings value.
*/
public AutoPatchingSettings autoPatchingSettings() {
- return this.autoPatchingSettings;
+ return this.innerProperties() == null ? null : this.innerProperties().autoPatchingSettings();
}
/**
@@ -309,7 +292,10 @@ public AutoPatchingSettings autoPatchingSettings() {
* @return the SqlVirtualMachineInner object itself.
*/
public SqlVirtualMachineInner withAutoPatchingSettings(AutoPatchingSettings autoPatchingSettings) {
- this.autoPatchingSettings = autoPatchingSettings;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withAutoPatchingSettings(autoPatchingSettings);
return this;
}
@@ -319,7 +305,7 @@ public SqlVirtualMachineInner withAutoPatchingSettings(AutoPatchingSettings auto
* @return the autoBackupSettings value.
*/
public AutoBackupSettings autoBackupSettings() {
- return this.autoBackupSettings;
+ return this.innerProperties() == null ? null : this.innerProperties().autoBackupSettings();
}
/**
@@ -329,7 +315,10 @@ public AutoBackupSettings autoBackupSettings() {
* @return the SqlVirtualMachineInner object itself.
*/
public SqlVirtualMachineInner withAutoBackupSettings(AutoBackupSettings autoBackupSettings) {
- this.autoBackupSettings = autoBackupSettings;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withAutoBackupSettings(autoBackupSettings);
return this;
}
@@ -339,7 +328,7 @@ public SqlVirtualMachineInner withAutoBackupSettings(AutoBackupSettings autoBack
* @return the keyVaultCredentialSettings value.
*/
public KeyVaultCredentialSettings keyVaultCredentialSettings() {
- return this.keyVaultCredentialSettings;
+ return this.innerProperties() == null ? null : this.innerProperties().keyVaultCredentialSettings();
}
/**
@@ -350,7 +339,10 @@ public KeyVaultCredentialSettings keyVaultCredentialSettings() {
*/
public SqlVirtualMachineInner withKeyVaultCredentialSettings(
KeyVaultCredentialSettings keyVaultCredentialSettings) {
- this.keyVaultCredentialSettings = keyVaultCredentialSettings;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withKeyVaultCredentialSettings(keyVaultCredentialSettings);
return this;
}
@@ -360,7 +352,7 @@ public SqlVirtualMachineInner withKeyVaultCredentialSettings(
* @return the serverConfigurationsManagementSettings value.
*/
public ServerConfigurationsManagementSettings serverConfigurationsManagementSettings() {
- return this.serverConfigurationsManagementSettings;
+ return this.innerProperties() == null ? null : this.innerProperties().serverConfigurationsManagementSettings();
}
/**
@@ -371,7 +363,10 @@ public ServerConfigurationsManagementSettings serverConfigurationsManagementSett
*/
public SqlVirtualMachineInner withServerConfigurationsManagementSettings(
ServerConfigurationsManagementSettings serverConfigurationsManagementSettings) {
- this.serverConfigurationsManagementSettings = serverConfigurationsManagementSettings;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withServerConfigurationsManagementSettings(serverConfigurationsManagementSettings);
return this;
}
@@ -381,7 +376,7 @@ public SqlVirtualMachineInner withServerConfigurationsManagementSettings(
* @return the storageConfigurationSettings value.
*/
public StorageConfigurationSettings storageConfigurationSettings() {
- return this.storageConfigurationSettings;
+ return this.innerProperties() == null ? null : this.innerProperties().storageConfigurationSettings();
}
/**
@@ -392,21 +387,33 @@ public StorageConfigurationSettings storageConfigurationSettings() {
*/
public SqlVirtualMachineInner withStorageConfigurationSettings(
StorageConfigurationSettings storageConfigurationSettings) {
- this.storageConfigurationSettings = storageConfigurationSettings;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withStorageConfigurationSettings(storageConfigurationSettings);
return this;
}
- /** {@inheritDoc} */
- @Override
- public SqlVirtualMachineInner withLocation(String location) {
- super.withLocation(location);
- return this;
+ /**
+ * Get the assessmentSettings property: Assessment Settings.
+ *
+ * @return the assessmentSettings value.
+ */
+ public AssessmentSettings assessmentSettings() {
+ return this.innerProperties() == null ? null : this.innerProperties().assessmentSettings();
}
- /** {@inheritDoc} */
- @Override
- public SqlVirtualMachineInner withTags(Map tags) {
- super.withTags(tags);
+ /**
+ * Set the assessmentSettings property: Assessment Settings.
+ *
+ * @param assessmentSettings the assessmentSettings value to set.
+ * @return the SqlVirtualMachineInner object itself.
+ */
+ public SqlVirtualMachineInner withAssessmentSettings(AssessmentSettings assessmentSettings) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SqlVirtualMachineProperties();
+ }
+ this.innerProperties().withAssessmentSettings(assessmentSettings);
return this;
}
@@ -419,23 +426,8 @@ public void validate() {
if (identity() != null) {
identity().validate();
}
- if (wsfcDomainCredentials() != null) {
- wsfcDomainCredentials().validate();
- }
- if (autoPatchingSettings() != null) {
- autoPatchingSettings().validate();
- }
- if (autoBackupSettings() != null) {
- autoBackupSettings().validate();
- }
- if (keyVaultCredentialSettings() != null) {
- keyVaultCredentialSettings().validate();
- }
- if (serverConfigurationsManagementSettings() != null) {
- serverConfigurationsManagementSettings().validate();
- }
- if (storageConfigurationSettings() != null) {
- storageConfigurationSettings().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineProperties.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineProperties.java
new file mode 100644
index 000000000000..070f5c530dcc
--- /dev/null
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineProperties.java
@@ -0,0 +1,423 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sqlvirtualmachine.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.KeyVaultCredentialSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.ServerConfigurationsManagementSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlImageSku;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlManagementMode;
+import com.azure.resourcemanager.sqlvirtualmachine.models.SqlServerLicenseType;
+import com.azure.resourcemanager.sqlvirtualmachine.models.StorageConfigurationSettings;
+import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainCredentials;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The SQL virtual machine properties. */
+@Fluent
+public final class SqlVirtualMachineProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineProperties.class);
+
+ /*
+ * ARM Resource id of underlying virtual machine created from SQL
+ * marketplace image.
+ */
+ @JsonProperty(value = "virtualMachineResourceId")
+ private String virtualMachineResourceId;
+
+ /*
+ * Provisioning state to track the async operation status.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private String provisioningState;
+
+ /*
+ * SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.
+ */
+ @JsonProperty(value = "sqlImageOffer")
+ private String sqlImageOffer;
+
+ /*
+ * SQL Server license type.
+ */
+ @JsonProperty(value = "sqlServerLicenseType")
+ private SqlServerLicenseType sqlServerLicenseType;
+
+ /*
+ * SQL Server Management type.
+ */
+ @JsonProperty(value = "sqlManagement")
+ private SqlManagementMode sqlManagement;
+
+ /*
+ * SQL Server edition type.
+ */
+ @JsonProperty(value = "sqlImageSku")
+ private SqlImageSku sqlImageSku;
+
+ /*
+ * ARM resource id of the SQL virtual machine group this SQL virtual
+ * machine is or will be part of.
+ */
+ @JsonProperty(value = "sqlVirtualMachineGroupResourceId")
+ private String sqlVirtualMachineGroupResourceId;
+
+ /*
+ * Domain credentials for setting up Windows Server Failover Cluster for
+ * SQL availability group.
+ */
+ @JsonProperty(value = "wsfcDomainCredentials")
+ private WsfcDomainCredentials wsfcDomainCredentials;
+
+ /*
+ * Auto patching settings for applying critical security updates to SQL
+ * virtual machine.
+ */
+ @JsonProperty(value = "autoPatchingSettings")
+ private AutoPatchingSettings autoPatchingSettings;
+
+ /*
+ * Auto backup settings for SQL Server.
+ */
+ @JsonProperty(value = "autoBackupSettings")
+ private AutoBackupSettings autoBackupSettings;
+
+ /*
+ * Key vault credential settings.
+ */
+ @JsonProperty(value = "keyVaultCredentialSettings")
+ private KeyVaultCredentialSettings keyVaultCredentialSettings;
+
+ /*
+ * SQL Server configuration management settings.
+ */
+ @JsonProperty(value = "serverConfigurationsManagementSettings")
+ private ServerConfigurationsManagementSettings serverConfigurationsManagementSettings;
+
+ /*
+ * Storage Configuration Settings.
+ */
+ @JsonProperty(value = "storageConfigurationSettings")
+ private StorageConfigurationSettings storageConfigurationSettings;
+
+ /*
+ * Assessment Settings.
+ */
+ @JsonProperty(value = "assessmentSettings")
+ private AssessmentSettings assessmentSettings;
+
+ /**
+ * Get the virtualMachineResourceId property: ARM Resource id of underlying virtual machine created from SQL
+ * marketplace image.
+ *
+ * @return the virtualMachineResourceId value.
+ */
+ public String virtualMachineResourceId() {
+ return this.virtualMachineResourceId;
+ }
+
+ /**
+ * Set the virtualMachineResourceId property: ARM Resource id of underlying virtual machine created from SQL
+ * marketplace image.
+ *
+ * @param virtualMachineResourceId the virtualMachineResourceId value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withVirtualMachineResourceId(String virtualMachineResourceId) {
+ this.virtualMachineResourceId = virtualMachineResourceId;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Provisioning state to track the async operation status.
+ *
+ * @return the provisioningState value.
+ */
+ public String provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the sqlImageOffer property: SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.
+ *
+ * @return the sqlImageOffer value.
+ */
+ public String sqlImageOffer() {
+ return this.sqlImageOffer;
+ }
+
+ /**
+ * Set the sqlImageOffer property: SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.
+ *
+ * @param sqlImageOffer the sqlImageOffer value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withSqlImageOffer(String sqlImageOffer) {
+ this.sqlImageOffer = sqlImageOffer;
+ return this;
+ }
+
+ /**
+ * Get the sqlServerLicenseType property: SQL Server license type.
+ *
+ * @return the sqlServerLicenseType value.
+ */
+ public SqlServerLicenseType sqlServerLicenseType() {
+ return this.sqlServerLicenseType;
+ }
+
+ /**
+ * Set the sqlServerLicenseType property: SQL Server license type.
+ *
+ * @param sqlServerLicenseType the sqlServerLicenseType value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withSqlServerLicenseType(SqlServerLicenseType sqlServerLicenseType) {
+ this.sqlServerLicenseType = sqlServerLicenseType;
+ return this;
+ }
+
+ /**
+ * Get the sqlManagement property: SQL Server Management type.
+ *
+ * @return the sqlManagement value.
+ */
+ public SqlManagementMode sqlManagement() {
+ return this.sqlManagement;
+ }
+
+ /**
+ * Set the sqlManagement property: SQL Server Management type.
+ *
+ * @param sqlManagement the sqlManagement value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withSqlManagement(SqlManagementMode sqlManagement) {
+ this.sqlManagement = sqlManagement;
+ return this;
+ }
+
+ /**
+ * Get the sqlImageSku property: SQL Server edition type.
+ *
+ * @return the sqlImageSku value.
+ */
+ public SqlImageSku sqlImageSku() {
+ return this.sqlImageSku;
+ }
+
+ /**
+ * Set the sqlImageSku property: SQL Server edition type.
+ *
+ * @param sqlImageSku the sqlImageSku value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withSqlImageSku(SqlImageSku sqlImageSku) {
+ this.sqlImageSku = sqlImageSku;
+ return this;
+ }
+
+ /**
+ * Get the sqlVirtualMachineGroupResourceId property: ARM resource id of the SQL virtual machine group this SQL
+ * virtual machine is or will be part of.
+ *
+ * @return the sqlVirtualMachineGroupResourceId value.
+ */
+ public String sqlVirtualMachineGroupResourceId() {
+ return this.sqlVirtualMachineGroupResourceId;
+ }
+
+ /**
+ * Set the sqlVirtualMachineGroupResourceId property: ARM resource id of the SQL virtual machine group this SQL
+ * virtual machine is or will be part of.
+ *
+ * @param sqlVirtualMachineGroupResourceId the sqlVirtualMachineGroupResourceId value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withSqlVirtualMachineGroupResourceId(String sqlVirtualMachineGroupResourceId) {
+ this.sqlVirtualMachineGroupResourceId = sqlVirtualMachineGroupResourceId;
+ return this;
+ }
+
+ /**
+ * Get the wsfcDomainCredentials property: Domain credentials for setting up Windows Server Failover Cluster for SQL
+ * availability group.
+ *
+ * @return the wsfcDomainCredentials value.
+ */
+ public WsfcDomainCredentials wsfcDomainCredentials() {
+ return this.wsfcDomainCredentials;
+ }
+
+ /**
+ * Set the wsfcDomainCredentials property: Domain credentials for setting up Windows Server Failover Cluster for SQL
+ * availability group.
+ *
+ * @param wsfcDomainCredentials the wsfcDomainCredentials value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withWsfcDomainCredentials(WsfcDomainCredentials wsfcDomainCredentials) {
+ this.wsfcDomainCredentials = wsfcDomainCredentials;
+ return this;
+ }
+
+ /**
+ * Get the autoPatchingSettings property: Auto patching settings for applying critical security updates to SQL
+ * virtual machine.
+ *
+ * @return the autoPatchingSettings value.
+ */
+ public AutoPatchingSettings autoPatchingSettings() {
+ return this.autoPatchingSettings;
+ }
+
+ /**
+ * Set the autoPatchingSettings property: Auto patching settings for applying critical security updates to SQL
+ * virtual machine.
+ *
+ * @param autoPatchingSettings the autoPatchingSettings value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withAutoPatchingSettings(AutoPatchingSettings autoPatchingSettings) {
+ this.autoPatchingSettings = autoPatchingSettings;
+ return this;
+ }
+
+ /**
+ * Get the autoBackupSettings property: Auto backup settings for SQL Server.
+ *
+ * @return the autoBackupSettings value.
+ */
+ public AutoBackupSettings autoBackupSettings() {
+ return this.autoBackupSettings;
+ }
+
+ /**
+ * Set the autoBackupSettings property: Auto backup settings for SQL Server.
+ *
+ * @param autoBackupSettings the autoBackupSettings value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withAutoBackupSettings(AutoBackupSettings autoBackupSettings) {
+ this.autoBackupSettings = autoBackupSettings;
+ return this;
+ }
+
+ /**
+ * Get the keyVaultCredentialSettings property: Key vault credential settings.
+ *
+ * @return the keyVaultCredentialSettings value.
+ */
+ public KeyVaultCredentialSettings keyVaultCredentialSettings() {
+ return this.keyVaultCredentialSettings;
+ }
+
+ /**
+ * Set the keyVaultCredentialSettings property: Key vault credential settings.
+ *
+ * @param keyVaultCredentialSettings the keyVaultCredentialSettings value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withKeyVaultCredentialSettings(
+ KeyVaultCredentialSettings keyVaultCredentialSettings) {
+ this.keyVaultCredentialSettings = keyVaultCredentialSettings;
+ return this;
+ }
+
+ /**
+ * Get the serverConfigurationsManagementSettings property: SQL Server configuration management settings.
+ *
+ * @return the serverConfigurationsManagementSettings value.
+ */
+ public ServerConfigurationsManagementSettings serverConfigurationsManagementSettings() {
+ return this.serverConfigurationsManagementSettings;
+ }
+
+ /**
+ * Set the serverConfigurationsManagementSettings property: SQL Server configuration management settings.
+ *
+ * @param serverConfigurationsManagementSettings the serverConfigurationsManagementSettings value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withServerConfigurationsManagementSettings(
+ ServerConfigurationsManagementSettings serverConfigurationsManagementSettings) {
+ this.serverConfigurationsManagementSettings = serverConfigurationsManagementSettings;
+ return this;
+ }
+
+ /**
+ * Get the storageConfigurationSettings property: Storage Configuration Settings.
+ *
+ * @return the storageConfigurationSettings value.
+ */
+ public StorageConfigurationSettings storageConfigurationSettings() {
+ return this.storageConfigurationSettings;
+ }
+
+ /**
+ * Set the storageConfigurationSettings property: Storage Configuration Settings.
+ *
+ * @param storageConfigurationSettings the storageConfigurationSettings value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withStorageConfigurationSettings(
+ StorageConfigurationSettings storageConfigurationSettings) {
+ this.storageConfigurationSettings = storageConfigurationSettings;
+ return this;
+ }
+
+ /**
+ * Get the assessmentSettings property: Assessment Settings.
+ *
+ * @return the assessmentSettings value.
+ */
+ public AssessmentSettings assessmentSettings() {
+ return this.assessmentSettings;
+ }
+
+ /**
+ * Set the assessmentSettings property: Assessment Settings.
+ *
+ * @param assessmentSettings the assessmentSettings value to set.
+ * @return the SqlVirtualMachineProperties object itself.
+ */
+ public SqlVirtualMachineProperties withAssessmentSettings(AssessmentSettings assessmentSettings) {
+ this.assessmentSettings = assessmentSettings;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (wsfcDomainCredentials() != null) {
+ wsfcDomainCredentials().validate();
+ }
+ if (autoPatchingSettings() != null) {
+ autoPatchingSettings().validate();
+ }
+ if (autoBackupSettings() != null) {
+ autoBackupSettings().validate();
+ }
+ if (keyVaultCredentialSettings() != null) {
+ keyVaultCredentialSettings().validate();
+ }
+ if (serverConfigurationsManagementSettings() != null) {
+ serverConfigurationsManagementSettings().validate();
+ }
+ if (storageConfigurationSettings() != null) {
+ storageConfigurationSettings().validate();
+ }
+ if (assessmentSettings() != null) {
+ assessmentSettings().validate();
+ }
+ }
+}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java
index 0ad6e07df792..d531bd7e371e 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java
@@ -4,9 +4,10 @@
package com.azure.resourcemanager.sqlvirtualmachine.implementation;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerInner;
+import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener;
import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
import java.util.Collections;
@@ -16,7 +17,7 @@ public final class AvailabilityGroupListenerImpl
implements AvailabilityGroupListener, AvailabilityGroupListener.Definition, AvailabilityGroupListener.Update {
private AvailabilityGroupListenerInner innerObject;
- private final SqlVirtualMachineManager serviceManager;
+ private final com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -30,6 +31,10 @@ public String type() {
return this.innerModel().type();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String provisioningState() {
return this.innerModel().provisioningState();
}
@@ -55,11 +60,15 @@ public Integer port() {
return this.innerModel().port();
}
+ public AgConfiguration availabilityGroupConfiguration() {
+ return this.innerModel().availabilityGroupConfiguration();
+ }
+
public AvailabilityGroupListenerInner innerModel() {
return this.innerObject;
}
- private SqlVirtualMachineManager manager() {
+ private com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager() {
return this.serviceManager;
}
@@ -104,7 +113,8 @@ public AvailabilityGroupListener create(Context context) {
return this;
}
- AvailabilityGroupListenerImpl(String name, SqlVirtualMachineManager serviceManager) {
+ AvailabilityGroupListenerImpl(
+ String name, com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerObject = new AvailabilityGroupListenerInner();
this.serviceManager = serviceManager;
this.availabilityGroupListenerName = name;
@@ -142,7 +152,9 @@ public AvailabilityGroupListener apply(Context context) {
return this;
}
- AvailabilityGroupListenerImpl(AvailabilityGroupListenerInner innerObject, SqlVirtualMachineManager serviceManager) {
+ AvailabilityGroupListenerImpl(
+ AvailabilityGroupListenerInner innerObject,
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
@@ -151,22 +163,29 @@ public AvailabilityGroupListener apply(Context context) {
}
public AvailabilityGroupListener refresh() {
+ String localExpand = null;
this.innerObject =
serviceManager
.serviceClient()
.getAvailabilityGroupListeners()
.getWithResponse(
- resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, Context.NONE)
+ resourceGroupName,
+ sqlVirtualMachineGroupName,
+ availabilityGroupListenerName,
+ localExpand,
+ Context.NONE)
.getValue();
return this;
}
public AvailabilityGroupListener refresh(Context context) {
+ String localExpand = null;
this.innerObject =
serviceManager
.serviceClient()
.getAvailabilityGroupListeners()
- .getWithResponse(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, context)
+ .getWithResponse(
+ resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, localExpand, context)
.getValue();
return this;
}
@@ -192,4 +211,10 @@ public AvailabilityGroupListenerImpl withPort(Integer port) {
this.innerModel().withPort(port);
return this;
}
+
+ public AvailabilityGroupListenerImpl withAvailabilityGroupConfiguration(
+ AgConfiguration availabilityGroupConfiguration) {
+ this.innerModel().withAvailabilityGroupConfiguration(availabilityGroupConfiguration);
+ return this;
+ }
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java
index 905d777e051d..e6e36ddc54f5 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java
@@ -81,6 +81,7 @@ Mono> get(
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("sqlVirtualMachineGroupName") String sqlVirtualMachineGroupName,
@PathParam("availabilityGroupListenerName") String availabilityGroupListenerName,
+ @QueryParam("$expand") String expand,
@PathParam("subscriptionId") String subscriptionId,
@QueryParam("api-version") String apiVersion,
@HeaderParam("Accept") String accept,
@@ -153,14 +154,18 @@ Mono> listByGroupNext(
* the Azure Resource Manager API or the portal.
* @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
* @param availabilityGroupListenerName Name of the availability group listener.
+ * @param expand The child resources to include in the response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an availability group listener.
+ * @return an availability group listener along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
+ String resourceGroupName,
+ String sqlVirtualMachineGroupName,
+ String availabilityGroupListenerName,
+ String expand) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -199,11 +204,12 @@ private Mono> getWithResponseAsync(
resourceGroupName,
sqlVirtualMachineGroupName,
availabilityGroupListenerName,
+ expand,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -213,17 +219,19 @@ private Mono> getWithResponseAsync(
* the Azure Resource Manager API or the portal.
* @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
* @param availabilityGroupListenerName Name of the availability group listener.
+ * @param expand The child resources to include in the response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an availability group listener.
+ * @return an availability group listener along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
String resourceGroupName,
String sqlVirtualMachineGroupName,
String availabilityGroupListenerName,
+ String expand,
Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -261,6 +269,7 @@ private Mono> getWithResponseAsync(
resourceGroupName,
sqlVirtualMachineGroupName,
availabilityGroupListenerName,
+ expand,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
@@ -274,15 +283,48 @@ private Mono> getWithResponseAsync(
* the Azure Resource Manager API or the portal.
* @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
* @param availabilityGroupListenerName Name of the availability group listener.
+ * @param expand The child resources to include in the response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an availability group listener.
+ * @return an availability group listener on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName,
+ String sqlVirtualMachineGroupName,
+ String availabilityGroupListenerName,
+ String expand) {
+ return getWithResponseAsync(
+ resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets an availability group listener.
+ *
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from
+ * the Azure Resource Manager API or the portal.
+ * @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
+ * @param availabilityGroupListenerName Name of the availability group listener.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an availability group listener on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(
String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
- return getWithResponseAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName)
+ final String expand = null;
+ return getWithResponseAsync(
+ resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand)
.flatMap(
(Response res) -> {
if (res.getValue() != null) {
@@ -308,7 +350,8 @@ private Mono getAsync(
@ServiceMethod(returns = ReturnType.SINGLE)
public AvailabilityGroupListenerInner get(
String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
- return getAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName).block();
+ final String expand = null;
+ return getAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand).block();
}
/**
@@ -318,20 +361,22 @@ public AvailabilityGroupListenerInner get(
* the Azure Resource Manager API or the portal.
* @param sqlVirtualMachineGroupName Name of the SQL virtual machine group.
* @param availabilityGroupListenerName Name of the availability group listener.
+ * @param expand The child resources to include in the response.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return an availability group listener.
+ * @return an availability group listener along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(
String resourceGroupName,
String sqlVirtualMachineGroupName,
String availabilityGroupListenerName,
+ String expand,
Context context) {
return getWithResponseAsync(
- resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, context)
+ resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand, context)
.block();
}
@@ -346,7 +391,8 @@ public Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL Server availability group listener.
+ * @return a SQL Server availability group listener along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -402,7 +448,7 @@ private Mono>> createOrUpdateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -417,7 +463,8 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL Server availability group listener.
+ * @return a SQL Server availability group listener along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -485,9 +532,9 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL Server availability group listener.
+ * @return the {@link PollerFlux} for polling of a SQL Server availability group listener.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, AvailabilityGroupListenerInner>
beginCreateOrUpdateAsync(
String resourceGroupName,
@@ -504,7 +551,7 @@ private Mono>> createOrUpdateWithResponseAsync(
this.client.getHttpPipeline(),
AvailabilityGroupListenerInner.class,
AvailabilityGroupListenerInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -519,9 +566,9 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL Server availability group listener.
+ * @return the {@link PollerFlux} for polling of a SQL Server availability group listener.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, AvailabilityGroupListenerInner>
beginCreateOrUpdateAsync(
String resourceGroupName,
@@ -554,9 +601,9 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL Server availability group listener.
+ * @return the {@link SyncPoller} for polling of a SQL Server availability group listener.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, AvailabilityGroupListenerInner> beginCreateOrUpdate(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -579,9 +626,9 @@ public SyncPoller, AvailabilityGroupL
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL Server availability group listener.
+ * @return the {@link SyncPoller} for polling of a SQL Server availability group listener.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, AvailabilityGroupListenerInner> beginCreateOrUpdate(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -604,7 +651,7 @@ public SyncPoller, AvailabilityGroupL
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL Server availability group listener.
+ * @return a SQL Server availability group listener on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -630,7 +677,7 @@ private Mono createOrUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL Server availability group listener.
+ * @return a SQL Server availability group listener on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -705,7 +752,7 @@ public AvailabilityGroupListenerInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -750,7 +797,7 @@ private Mono>> deleteWithResponseAsync(
this.client.getSubscriptionId(),
this.client.getApiVersion(),
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -764,7 +811,7 @@ private Mono>> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -822,16 +869,17 @@ private Mono>> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
Mono>> mono =
deleteWithResponseAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -845,9 +893,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -872,9 +920,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlVirtualMachineGroupName, String availabilityGroupListenerName) {
return beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName)
@@ -892,9 +940,9 @@ public SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -914,7 +962,7 @@ public SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(
@@ -935,7 +983,7 @@ private Mono deleteAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(
@@ -995,7 +1043,8 @@ public void delete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of availability group listeners.
+ * @return a list of availability group listeners along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByGroupSinglePageAsync(
@@ -1044,7 +1093,7 @@ private Mono> listByGroupSinglePag
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1057,7 +1106,8 @@ private Mono> listByGroupSinglePag
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of availability group listeners.
+ * @return a list of availability group listeners along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByGroupSinglePageAsync(
@@ -1115,7 +1165,7 @@ private Mono> listByGroupSinglePag
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of availability group listeners.
+ * @return a list of availability group listeners as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByGroupAsync(
@@ -1135,7 +1185,7 @@ private PagedFlux listByGroupAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of availability group listeners.
+ * @return a list of availability group listeners as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByGroupAsync(
@@ -1154,7 +1204,7 @@ private PagedFlux listByGroupAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of availability group listeners.
+ * @return a list of availability group listeners as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByGroup(
@@ -1172,7 +1222,7 @@ public PagedIterable listByGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of availability group listeners.
+ * @return a list of availability group listeners as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByGroup(
@@ -1187,7 +1237,8 @@ public PagedIterable listByGroup(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of availability group listeners.
+ * @return a list of availability group listeners along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByGroupNextSinglePageAsync(String nextLink) {
@@ -1212,7 +1263,7 @@ private Mono> listByGroupNextSingl
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1223,7 +1274,8 @@ private Mono> listByGroupNextSingl
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of availability group listeners.
+ * @return a list of availability group listeners along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByGroupNextSinglePageAsync(
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java
index a048f12a5d90..e5e356e32b5b 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java
@@ -9,7 +9,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.AvailabilityGroupListenersClient;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener;
@@ -21,10 +20,11 @@ public final class AvailabilityGroupListenersImpl implements AvailabilityGroupLi
private final AvailabilityGroupListenersClient innerClient;
- private final SqlVirtualMachineManager serviceManager;
+ private final com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager;
public AvailabilityGroupListenersImpl(
- AvailabilityGroupListenersClient innerClient, SqlVirtualMachineManager serviceManager) {
+ AvailabilityGroupListenersClient innerClient,
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -44,11 +44,13 @@ public Response getWithResponse(
String resourceGroupName,
String sqlVirtualMachineGroupName,
String availabilityGroupListenerName,
+ String expand,
Context context) {
Response inner =
this
.serviceClient()
- .getWithResponse(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, context);
+ .getWithResponse(
+ resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand, context);
if (inner != null) {
return new SimpleResponse<>(
inner.getRequest(),
@@ -79,14 +81,14 @@ public PagedIterable listByGroup(
String resourceGroupName, String sqlVirtualMachineGroupName) {
PagedIterable inner =
this.serviceClient().listByGroup(resourceGroupName, sqlVirtualMachineGroupName);
- return inner.mapPage(inner1 -> new AvailabilityGroupListenerImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new AvailabilityGroupListenerImpl(inner1, this.manager()));
}
public PagedIterable listByGroup(
String resourceGroupName, String sqlVirtualMachineGroupName, Context context) {
PagedIterable inner =
this.serviceClient().listByGroup(resourceGroupName, sqlVirtualMachineGroupName, context);
- return inner.mapPage(inner1 -> new AvailabilityGroupListenerImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new AvailabilityGroupListenerImpl(inner1, this.manager()));
}
public AvailabilityGroupListener getById(String id) {
@@ -118,12 +120,14 @@ public AvailabilityGroupListener getById(String id) {
"The resource ID '%s' is not valid. Missing path segment 'availabilityGroupListeners'.",
id)));
}
+ String localExpand = null;
return this
- .getWithResponse(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, Context.NONE)
+ .getWithResponse(
+ resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, localExpand, Context.NONE)
.getValue();
}
- public Response getByIdWithResponse(String id, Context context) {
+ public Response getByIdWithResponse(String id, String expand, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw logger
@@ -153,7 +157,8 @@ public Response getByIdWithResponse(String id, Contex
id)));
}
return this
- .getWithResponse(resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, context);
+ .getWithResponse(
+ resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand, context);
}
public void deleteById(String id) {
@@ -224,7 +229,7 @@ private AvailabilityGroupListenersClient serviceClient() {
return this.innerClient;
}
- private SqlVirtualMachineManager manager() {
+ private com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager() {
return this.serviceManager;
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationImpl.java
index b07b432f02d0..76e21d080079 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.sqlvirtualmachine.implementation;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.OperationInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.Operation;
import com.azure.resourcemanager.sqlvirtualmachine.models.OperationDisplay;
@@ -15,9 +14,11 @@
public final class OperationImpl implements Operation {
private OperationInner innerObject;
- private final SqlVirtualMachineManager serviceManager;
+ private final com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager;
- OperationImpl(OperationInner innerObject, SqlVirtualMachineManager serviceManager) {
+ OperationImpl(
+ OperationInner innerObject,
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -47,7 +48,7 @@ public OperationInner innerModel() {
return this.innerObject;
}
- private SqlVirtualMachineManager manager() {
+ private com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java
index 654073a4c460..c1ca667f2fab 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java
@@ -81,11 +81,12 @@ Mono> listNext(
}
/**
- * Lists all of the available SQL Rest API operations.
+ * Lists all of the available SQL Virtual Machine Rest API operations.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list SQL operations.
+ * @return result of the request to list SQL operations along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -108,17 +109,18 @@ private Mono> listSinglePageAsync() {
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Lists all of the available SQL Rest API operations.
+ * Lists all of the available SQL Virtual Machine Rest API operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list SQL operations.
+ * @return result of the request to list SQL operations along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -144,11 +146,11 @@ private Mono> listSinglePageAsync(Context context)
}
/**
- * Lists all of the available SQL Rest API operations.
+ * Lists all of the available SQL Virtual Machine Rest API operations.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list SQL operations.
+ * @return result of the request to list SQL operations as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -156,13 +158,13 @@ private PagedFlux listAsync() {
}
/**
- * Lists all of the available SQL Rest API operations.
+ * Lists all of the available SQL Virtual Machine Rest API operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list SQL operations.
+ * @return result of the request to list SQL operations as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -171,11 +173,11 @@ private PagedFlux listAsync(Context context) {
}
/**
- * Lists all of the available SQL Rest API operations.
+ * Lists all of the available SQL Virtual Machine Rest API operations.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list SQL operations.
+ * @return result of the request to list SQL operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -183,13 +185,13 @@ public PagedIterable list() {
}
/**
- * Lists all of the available SQL Rest API operations.
+ * Lists all of the available SQL Virtual Machine Rest API operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list SQL operations.
+ * @return result of the request to list SQL operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -203,7 +205,8 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list SQL operations.
+ * @return result of the request to list SQL operations along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -228,7 +231,7 @@ private Mono> listNextSinglePageAsync(String nextL
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -239,7 +242,8 @@ private Mono> listNextSinglePageAsync(String nextL
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return result of the request to list SQL operations.
+ * @return result of the request to list SQL operations along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java
index 47d07859be46..ced421e7130e 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java
@@ -7,7 +7,6 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.OperationsClient;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.OperationInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.Operation;
@@ -19,28 +18,30 @@ public final class OperationsImpl implements Operations {
private final OperationsClient innerClient;
- private final SqlVirtualMachineManager serviceManager;
+ private final com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager;
- public OperationsImpl(OperationsClient innerClient, SqlVirtualMachineManager serviceManager) {
+ public OperationsImpl(
+ OperationsClient innerClient,
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return inner.mapPage(inner1 -> new OperationImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return inner.mapPage(inner1 -> new OperationImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
private OperationsClient serviceClient() {
return this.innerClient;
}
- private SqlVirtualMachineManager manager() {
+ private com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java
index bd8fddd82db4..3ac75bfb76ea 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java
@@ -5,8 +5,8 @@
package com.azure.resourcemanager.sqlvirtualmachine.implementation;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVirtualMachineGroupInner;
import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterConfiguration;
import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterManagerType;
@@ -22,7 +22,7 @@ public final class SqlVirtualMachineGroupImpl
implements SqlVirtualMachineGroup, SqlVirtualMachineGroup.Definition, SqlVirtualMachineGroup.Update {
private SqlVirtualMachineGroupInner innerObject;
- private final SqlVirtualMachineManager serviceManager;
+ private final com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -49,6 +49,10 @@ public Map tags() {
}
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public String provisioningState() {
return this.innerModel().provisioningState();
}
@@ -89,7 +93,7 @@ public SqlVirtualMachineGroupInner innerModel() {
return this.innerObject;
}
- private SqlVirtualMachineManager manager() {
+ private com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager() {
return this.serviceManager;
}
@@ -122,7 +126,8 @@ public SqlVirtualMachineGroup create(Context context) {
return this;
}
- SqlVirtualMachineGroupImpl(String name, SqlVirtualMachineManager serviceManager) {
+ SqlVirtualMachineGroupImpl(
+ String name, com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerObject = new SqlVirtualMachineGroupInner();
this.serviceManager = serviceManager;
this.sqlVirtualMachineGroupName = name;
@@ -151,7 +156,9 @@ public SqlVirtualMachineGroup apply(Context context) {
return this;
}
- SqlVirtualMachineGroupImpl(SqlVirtualMachineGroupInner innerObject, SqlVirtualMachineManager serviceManager) {
+ SqlVirtualMachineGroupImpl(
+ SqlVirtualMachineGroupInner innerObject,
+ com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java
index 59c50f5b5b9a..cee813883adc 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java
@@ -186,7 +186,7 @@ Mono> listNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -226,7 +226,7 @@ private Mono> getByResourceGroupWithRespon
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -239,7 +239,7 @@ private Mono> getByResourceGroupWithRespon
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -288,7 +288,7 @@ private Mono> getByResourceGroupWithRespon
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getByResourceGroupAsync(
@@ -330,7 +330,7 @@ public SqlVirtualMachineGroupInner getByResourceGroup(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getByResourceGroupWithResponse(
@@ -348,7 +348,7 @@ public Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -394,7 +394,7 @@ private Mono>> createOrUpdateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -408,7 +408,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -467,9 +467,9 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link PollerFlux} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, SqlVirtualMachineGroupInner> beginCreateOrUpdateAsync(
String resourceGroupName, String sqlVirtualMachineGroupName, SqlVirtualMachineGroupInner parameters) {
Mono>> mono =
@@ -481,7 +481,7 @@ private PollerFlux, SqlVirtualMachineGro
this.client.getHttpPipeline(),
SqlVirtualMachineGroupInner.class,
SqlVirtualMachineGroupInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -495,9 +495,9 @@ private PollerFlux, SqlVirtualMachineGro
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link PollerFlux} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, SqlVirtualMachineGroupInner> beginCreateOrUpdateAsync(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -526,9 +526,9 @@ private PollerFlux, SqlVirtualMachineGro
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, SqlVirtualMachineGroupInner> beginCreateOrUpdate(
String resourceGroupName, String sqlVirtualMachineGroupName, SqlVirtualMachineGroupInner parameters) {
return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineGroupName, parameters).getSyncPoller();
@@ -545,9 +545,9 @@ public SyncPoller, SqlVirtualMachineGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, SqlVirtualMachineGroupInner> beginCreateOrUpdate(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -567,7 +567,7 @@ public SyncPoller, SqlVirtualMachineGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -588,7 +588,7 @@ private Mono createOrUpdateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrUpdateAsync(
@@ -650,7 +650,7 @@ public SqlVirtualMachineGroupInner createOrUpdate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -688,7 +688,7 @@ private Mono>> deleteWithResponseAsync(
this.client.getSubscriptionId(),
this.client.getApiVersion(),
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -701,7 +701,7 @@ private Mono>> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -748,15 +748,16 @@ private Mono>> deleteWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String sqlVirtualMachineGroupName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, sqlVirtualMachineGroupName);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -769,9 +770,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String sqlVirtualMachineGroupName, Context context) {
context = this.client.mergeContext(context);
@@ -791,9 +792,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineGroupName) {
return beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName).getSyncPoller();
}
@@ -808,9 +809,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String sqlVirtualMachineGroupName, Context context) {
return beginDeleteAsync(resourceGroupName, sqlVirtualMachineGroupName, context).getSyncPoller();
@@ -825,7 +826,7 @@ public SyncPoller, Void> beginDelete(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachineGroupName) {
@@ -844,7 +845,7 @@ private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachineGroupName, Context context) {
@@ -894,7 +895,7 @@ public void delete(String resourceGroupName, String sqlVirtualMachineGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -940,7 +941,7 @@ private Mono>> updateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -954,7 +955,7 @@ private Mono>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -1013,9 +1014,9 @@ private Mono>> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link PollerFlux} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, SqlVirtualMachineGroupInner> beginUpdateAsync(
String resourceGroupName, String sqlVirtualMachineGroupName, SqlVirtualMachineGroupUpdate parameters) {
Mono>> mono =
@@ -1027,7 +1028,7 @@ private PollerFlux, SqlVirtualMachineGro
this.client.getHttpPipeline(),
SqlVirtualMachineGroupInner.class,
SqlVirtualMachineGroupInner.class,
- Context.NONE);
+ this.client.getContext());
}
/**
@@ -1041,9 +1042,9 @@ private PollerFlux, SqlVirtualMachineGro
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link PollerFlux} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, SqlVirtualMachineGroupInner> beginUpdateAsync(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -1072,9 +1073,9 @@ private PollerFlux, SqlVirtualMachineGro
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, SqlVirtualMachineGroupInner> beginUpdate(
String resourceGroupName, String sqlVirtualMachineGroupName, SqlVirtualMachineGroupUpdate parameters) {
return beginUpdateAsync(resourceGroupName, sqlVirtualMachineGroupName, parameters).getSyncPoller();
@@ -1091,9 +1092,9 @@ public SyncPoller, SqlVirtualMachineGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine group.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, SqlVirtualMachineGroupInner> beginUpdate(
String resourceGroupName,
String sqlVirtualMachineGroupName,
@@ -1112,7 +1113,7 @@ public SyncPoller, SqlVirtualMachineGrou
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -1133,7 +1134,7 @@ private Mono updateAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a SQL virtual machine group.
+ * @return a SQL virtual machine group on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -1194,7 +1195,8 @@ public SqlVirtualMachineGroupInner update(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all SQL virtual machine groups in a resource group.
+ * @return all SQL virtual machine groups in a resource group along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -1236,7 +1238,7 @@ private Mono> listByResourceGroupSing
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1248,7 +1250,8 @@ private Mono> listByResourceGroupSing
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return all SQL virtual machine groups in a resource group.
+ * @return all SQL virtual machine groups in a resource group along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -1298,7 +1301,7 @@ private Mono