diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md
index 3ef5ee9b8f16..78ebef53c2a5 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.5 (Unreleased)
+## 1.0.0-beta.1 (2023-07-25)
+
+- 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-2023-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md
index 539895933bd4..207e154a87b6 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/README.md
@@ -2,7 +2,7 @@
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-2022-08. 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-2023-01. 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
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-sqlvirtualmachine
- 1.0.0-beta.4
+ 1.0.0-beta.5
```
[//]: # ({x-version-update-end})
@@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
+
+
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
index 6f710c51e77d..714a657b42fe 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md
@@ -47,7 +47,7 @@ import java.util.Arrays;
/** Samples for AvailabilityGroupListeners CreateOrUpdate. */
public final class AvailabilityGroupListenersCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateAvailabilityGroupListener.json
*/
/**
* Sample code: Creates or updates an availability group listener using load balancer. This is used for VMs present
@@ -85,7 +85,7 @@ public final class AvailabilityGroupListenersCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json
*/
/**
* Sample code: Creates or updates an availability group listener. This is used for VMs present in multi subnet.
@@ -130,7 +130,7 @@ public final class AvailabilityGroupListenersCreateOrUpdateSamples {
/** Samples for AvailabilityGroupListeners Delete. */
public final class AvailabilityGroupListenersDeleteSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/DeleteAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/DeleteAvailabilityGroupListener.json
*/
/**
* Sample code: Deletes an availability group listener.
@@ -152,7 +152,7 @@ public final class AvailabilityGroupListenersDeleteSamples {
/** Samples for AvailabilityGroupListeners Get. */
public final class AvailabilityGroupListenersGetSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/GetAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/GetAvailabilityGroupListener.json
*/
/**
* Sample code: Gets an availability group listener.
@@ -174,7 +174,7 @@ public final class AvailabilityGroupListenersGetSamples {
/** Samples for AvailabilityGroupListeners ListByGroup. */
public final class AvailabilityGroupListenersListByGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListByGroupAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListByGroupAvailabilityGroupListener.json
*/
/**
* Sample code: Lists all availability group listeners in a SQL virtual machine group.
@@ -194,7 +194,7 @@ public final class AvailabilityGroupListenersListByGroupSamples {
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListOperation.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListOperation.json
*/
/**
* Sample code: Lists all of the available SQL Virtual Machine Rest API operations.
@@ -220,7 +220,7 @@ import java.util.Map;
/** Samples for SqlVirtualMachineGroups CreateOrUpdate. */
public final class SqlVirtualMachineGroupsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateSqlVirtualMachineGroup.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine group.
@@ -244,6 +244,7 @@ public final class SqlVirtualMachineGroupsCreateOrUpdateSamples {
.withClusterBootstrapAccount("testrpadmin")
.withClusterOperatorAccount("testrp@testdomain.com")
.withSqlServiceAccount("sqlservice@testdomain.com")
+ .withIsSqlServiceAccountGmsa(false)
.withStorageAccountUrl("https://storgact.blob.core.windows.net/")
.withStorageAccountPrimaryKey("fakeTokenPlaceholder")
.withClusterSubnetType(ClusterSubnetType.MULTI_SUBNET))
@@ -269,7 +270,7 @@ public final class SqlVirtualMachineGroupsCreateOrUpdateSamples {
/** Samples for SqlVirtualMachineGroups Delete. */
public final class SqlVirtualMachineGroupsDeleteSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/DeleteSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/DeleteSqlVirtualMachineGroup.json
*/
/**
* Sample code: Deletes a SQL virtual machine group.
@@ -289,7 +290,7 @@ public final class SqlVirtualMachineGroupsDeleteSamples {
/** Samples for SqlVirtualMachineGroups GetByResourceGroup. */
public final class SqlVirtualMachineGroupsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/GetSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/GetSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets a SQL virtual machine group.
@@ -311,7 +312,7 @@ public final class SqlVirtualMachineGroupsGetByResourceGroupSamples {
/** Samples for SqlVirtualMachineGroups List. */
public final class SqlVirtualMachineGroupsListSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListSubscriptionSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListSubscriptionSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets all SQL virtual machine groups in a subscription.
@@ -331,7 +332,7 @@ public final class SqlVirtualMachineGroupsListSamples {
/** Samples for SqlVirtualMachineGroups ListByResourceGroup. */
public final class SqlVirtualMachineGroupsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListByResourceGroupSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListByResourceGroupSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets all SQL virtual machine groups in a resource group.
@@ -355,7 +356,7 @@ import java.util.Map;
/** Samples for SqlVirtualMachineGroups Update. */
public final class SqlVirtualMachineGroupsUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/UpdateSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/UpdateSqlVirtualMachineGroup.json
*/
/**
* Sample code: Updates a SQL virtual machine group tags.
@@ -397,7 +398,7 @@ import java.time.OffsetDateTime;
/** Samples for SqlVirtualMachineTroubleshoot Troubleshoot. */
public final class SqlVirtualMachineTroubleshootTroubleshootSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/TroubleshootSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/TroubleshootSqlVirtualMachine.json
*/
/**
* Sample code: Start SQL virtual machine troubleshooting operation.
@@ -445,7 +446,6 @@ import com.azure.resourcemanager.sqlvirtualmachine.models.ServerConfigurationsMa
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;
@@ -460,7 +460,7 @@ import java.util.Arrays;
/** Samples for SqlVirtualMachines CreateOrUpdate. */
public final class SqlVirtualMachinesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or
@@ -486,7 +486,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateVirtualMachineWithVMGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateVirtualMachineWithVMGroup.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group.
@@ -512,7 +512,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-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
@@ -531,7 +531,6 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.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()
@@ -577,7 +576,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and
@@ -616,7 +615,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineMAX.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateSqlVirtualMachineMAX.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine with max parameters.
@@ -633,7 +632,6 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.withVirtualMachineResourceId(
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm")
.withSqlServerLicenseType(SqlServerLicenseType.PAYG)
- .withSqlManagement(SqlManagementMode.FULL)
.withLeastPrivilegeMode(LeastPrivilegeMode.ENABLED)
.withSqlImageSku(SqlImageSku.ENTERPRISE)
.withAutoPatchingSettings(
@@ -686,6 +684,32 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
.withIsIfiEnabled(true))
.withAzureAdAuthenticationSettings(
new AadAuthenticationSettings().withClientId("11111111-2222-3333-4444-555555555555")))
+ .withStorageConfigurationSettings(
+ new StorageConfigurationSettings()
+ .withSqlDataSettings(
+ new SqlStorageSettings()
+ .withLuns(Arrays.asList(0))
+ .withDefaultFilePath("F:\\folderpath\\")
+ .withUseStoragePool(false))
+ .withSqlLogSettings(
+ new SqlStorageSettings()
+ .withLuns(Arrays.asList(1))
+ .withDefaultFilePath("G:\\folderpath\\")
+ .withUseStoragePool(false))
+ .withSqlTempDbSettings(
+ new SqlTempDbSettings()
+ .withDataFileSize(256)
+ .withDataGrowth(512)
+ .withLogFileSize(256)
+ .withLogGrowth(512)
+ .withDataFileCount(8)
+ .withLuns(Arrays.asList(2))
+ .withDefaultFilePath("D:\\TEMP")
+ .withUseStoragePool(false))
+ .withSqlSystemDbOnDataDisk(true)
+ .withDiskConfigurationType(DiskConfigurationType.NEW)
+ .withStorageWorkloadType(StorageWorkloadType.OLTP)
+ .withEnableStorageConfigBlade(true))
.withAssessmentSettings(
new AssessmentSettings()
.withEnable(true)
@@ -701,7 +725,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineMIN.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateSqlVirtualMachineMIN.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine with min parameters.
@@ -728,7 +752,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
/** Samples for SqlVirtualMachines Delete. */
public final class SqlVirtualMachinesDeleteSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/DeleteSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/DeleteSqlVirtualMachine.json
*/
/**
* Sample code: Deletes a SQL virtual machine.
@@ -748,7 +772,7 @@ public final class SqlVirtualMachinesDeleteSamples {
/** Samples for SqlVirtualMachines GetByResourceGroup. */
public final class SqlVirtualMachinesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/GetSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/GetSqlVirtualMachine.json
*/
/**
* Sample code: Gets a SQL virtual machine.
@@ -770,7 +794,7 @@ public final class SqlVirtualMachinesGetByResourceGroupSamples {
/** Samples for SqlVirtualMachines List. */
public final class SqlVirtualMachinesListSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListSubscriptionSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListSubscriptionSqlVirtualMachine.json
*/
/**
* Sample code: Gets all SQL virtual machines in a subscription.
@@ -790,7 +814,7 @@ public final class SqlVirtualMachinesListSamples {
/** Samples for SqlVirtualMachines ListByResourceGroup. */
public final class SqlVirtualMachinesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListByResourceGroupSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListByResourceGroupSqlVirtualMachine.json
*/
/**
* Sample code: Gets all SQL virtual machines in a resource group.
@@ -810,7 +834,7 @@ public final class SqlVirtualMachinesListByResourceGroupSamples {
/** Samples for SqlVirtualMachines ListBySqlVmGroup. */
public final class SqlVirtualMachinesListBySqlVmGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json
*/
/**
* Sample code: Gets the list of sql virtual machines in a SQL virtual machine group.
@@ -830,7 +854,7 @@ public final class SqlVirtualMachinesListBySqlVmGroupSamples {
/** Samples for SqlVirtualMachines Redeploy. */
public final class SqlVirtualMachinesRedeploySamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/RedeploySqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/RedeploySqlVirtualMachine.json
*/
/**
* Sample code: Uninstalls and reinstalls the SQL IaaS Extension.
@@ -850,7 +874,7 @@ public final class SqlVirtualMachinesRedeploySamples {
/** Samples for SqlVirtualMachines StartAssessment. */
public final class SqlVirtualMachinesStartAssessmentSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/StartAssessmentOnSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/StartAssessmentOnSqlVirtualMachine.json
*/
/**
* Sample code: Starts SQL best practices Assessment on SQL virtual machine.
@@ -874,7 +898,7 @@ import java.util.Map;
/** Samples for SqlVirtualMachines Update. */
public final class SqlVirtualMachinesUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/UpdateSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/UpdateSqlVirtualMachine.json
*/
/**
* Sample code: Updates a SQL virtual machine tags.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
index 46dd358c36ab..60eab415ddec 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml
@@ -18,7 +18,7 @@
jar
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-2022-08.
+ 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-2023-01.
https://github.com/Azure/azure-sdk-for-java
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 093f746d9a6c..b9661d405704 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
@@ -224,7 +224,7 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr
.append("-")
.append("com.azure.resourcemanager.sqlvirtualmachine")
.append("/")
- .append("1.0.0-beta.4");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
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 9cc6c4e8f1e7..f71b2b363893 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
@@ -71,104 +71,94 @@ PagedIterable listBySqlVmGroup(
PagedIterable list(Context context);
/**
- * Gets a SQL virtual machine.
+ * Starts SQL best practices 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 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 a SQL virtual machine along with {@link Response}.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String sqlVirtualMachineName, String expand, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStartAssessment(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Gets a SQL virtual machine.
+ * Starts SQL best practices 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 a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStartAssessment(
+ String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Creates or updates a SQL virtual machine.
+ * Starts SQL best practices 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 parameters 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 a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void startAssessment(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Creates or updates a SQL virtual machine.
+ * Starts SQL best practices 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 parameters 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 a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters 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 a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineInner createOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters 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 a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineInner createOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRedeploy(
+ String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Deletes a SQL virtual machine.
+ * 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.
@@ -176,13 +166,12 @@ 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 {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void redeploy(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Deletes a SQL virtual machine.
+ * 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.
@@ -191,41 +180,43 @@ 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 {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginDelete(
- String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Deletes a SQL virtual machine.
+ * Gets a 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 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 a SQL virtual machine along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String sqlVirtualMachineName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sqlVirtualMachineName, String expand, Context context);
/**
- * Deletes a SQL virtual machine.
+ * Gets a 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 a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- void delete(String resourceGroupName, String sqlVirtualMachineName, Context context);
+ SqlVirtualMachineInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -237,11 +228,11 @@ SyncPoller, Void> beginDelete(
* @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, SqlVirtualMachineInner> beginUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters);
+ SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters);
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -254,11 +245,11 @@ SyncPoller, SqlVirtualMachineInner> beginUpda
* @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, SqlVirtualMachineInner> beginUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context);
+ SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context);
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -270,11 +261,11 @@ SyncPoller, SqlVirtualMachineInner> beginUpda
* @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineInner update(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters);
+ SqlVirtualMachineInner createOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters);
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -287,38 +278,41 @@ SqlVirtualMachineInner update(
* @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- SqlVirtualMachineInner update(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context);
+ SqlVirtualMachineInner createOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context);
/**
- * Gets all SQL virtual machines in a resource group.
+ * Deletes a 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 all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Gets all SQL virtual machines in a resource group.
+ * Deletes a 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 all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Deletes a 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.
@@ -326,13 +320,12 @@ 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 the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStartAssessment(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Deletes a 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.
@@ -341,93 +334,100 @@ 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 the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginStartAssessment(
- String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters 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 a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- void startAssessment(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SqlVirtualMachineInner> beginUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters);
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters 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 a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SqlVirtualMachineInner> beginUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context);
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Updates a 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 parameters 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.
+ * @return a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlVirtualMachineInner update(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters);
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Updates a 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 parameters 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.
+ * @return a SQL virtual machine.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- SyncPoller, Void> beginRedeploy(
- String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SqlVirtualMachineInner update(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context);
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- void redeploy(String resourceGroupName, String sqlVirtualMachineName);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
}
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 a27bb5c9f974..8c5a9bb3b058 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
@@ -27,7 +27,7 @@
@Fluent
public final class SqlVirtualMachineInner extends Resource {
/*
- * Azure Active Directory identity of the server.
+ * DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server.
*/
@JsonProperty(value = "identity")
private ResourceIdentity identity;
@@ -49,7 +49,8 @@ public SqlVirtualMachineInner() {
}
/**
- * Get the identity property: Azure Active Directory identity of the server.
+ * Get the identity property: DO NOT USE. This value will be deprecated. Azure Active Directory identity of the
+ * server.
*
* @return the identity value.
*/
@@ -58,7 +59,8 @@ public ResourceIdentity identity() {
}
/**
- * Set the identity property: Azure Active Directory identity of the server.
+ * Set the identity property: DO NOT USE. This value will be deprecated. Azure Active Directory identity of the
+ * server.
*
* @param identity the identity value to set.
* @return the SqlVirtualMachineInner object itself.
@@ -181,7 +183,8 @@ public SqlVirtualMachineInner withSqlServerLicenseType(SqlServerLicenseType sqlS
}
/**
- * Get the sqlManagement property: SQL Server Management type.
+ * Get the sqlManagement property: SQL Server Management type. NOTE: This parameter is not used anymore. API will
+ * automatically detect the Sql Management, refrain from using it.
*
* @return the sqlManagement value.
*/
@@ -190,7 +193,8 @@ public SqlManagementMode sqlManagement() {
}
/**
- * Set the sqlManagement property: SQL Server Management type.
+ * Set the sqlManagement property: SQL Server Management type. NOTE: This parameter is not used anymore. API will
+ * automatically detect the Sql Management, refrain from using it.
*
* @param sqlManagement the sqlManagement value to set.
* @return the SqlVirtualMachineInner object itself.
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
index 61c055b9b6e6..858581a7c3bf 100644
--- 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
@@ -47,7 +47,8 @@ public final class SqlVirtualMachineProperties {
private SqlServerLicenseType sqlServerLicenseType;
/*
- * SQL Server Management type.
+ * SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql
+ * Management, refrain from using it.
*/
@JsonProperty(value = "sqlManagement")
private SqlManagementMode sqlManagement;
@@ -206,7 +207,8 @@ public SqlVirtualMachineProperties withSqlServerLicenseType(SqlServerLicenseType
}
/**
- * Get the sqlManagement property: SQL Server Management type.
+ * Get the sqlManagement property: SQL Server Management type. NOTE: This parameter is not used anymore. API will
+ * automatically detect the Sql Management, refrain from using it.
*
* @return the sqlManagement value.
*/
@@ -215,7 +217,8 @@ public SqlManagementMode sqlManagement() {
}
/**
- * Set the sqlManagement property: SQL Server Management type.
+ * Set the sqlManagement property: SQL Server Management type. NOTE: This parameter is not used anymore. API will
+ * automatically detect the Sql Management, refrain from using it.
*
* @param sqlManagement the sqlManagement value to set.
* @return the SqlVirtualMachineProperties object itself.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientImpl.java
index 4a2730034fda..2ab8876b8bd0 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientImpl.java
@@ -194,7 +194,7 @@ public SqlVirtualMachineTroubleshootsClient getSqlVirtualMachineTroubleshoots()
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2022-08-01-preview";
+ this.apiVersion = "2023-01-01-preview";
this.availabilityGroupListeners = new AvailabilityGroupListenersClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsClientImpl(this);
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesClientImpl.java
index c9ae8bdace1e..0a2709bc53a3 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesClientImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesClientImpl.java
@@ -92,6 +92,34 @@ Mono> list(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> startAssessment(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> redeploy(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}")
@@ -164,34 +192,6 @@ Mono> listByResourceGroup(
@HeaderParam("Accept") String accept,
Context context);
- @Headers({"Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> startAssessment(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
-
- @Headers({"Content-Type: application/json"})
- @Post(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy")
- @ExpectedResponses({200, 202})
- @UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> redeploy(
- @HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("sqlVirtualMachineName") String sqlVirtualMachineName,
- @PathParam("subscriptionId") String subscriptionId,
- @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept,
- Context context);
-
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -566,20 +566,19 @@ public PagedIterable list(Context context) {
}
/**
- * Gets a SQL virtual machine.
+ * Starts SQL best practices 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 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 a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, String expand) {
+ private Mono>> startAssessmentWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -605,11 +604,10 @@ private Mono> getByResourceGroupWithResponseAsy
.withContext(
context ->
service
- .getByResourceGroup(
+ .startAssessment(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
- expand,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
@@ -618,21 +616,20 @@ private Mono> getByResourceGroupWithResponseAsy
}
/**
- * Gets a SQL virtual machine.
+ * Starts SQL best practices 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 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 a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, String expand, Context context) {
+ private Mono>> startAssessmentWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -656,11 +653,10 @@ private Mono> getByResourceGroupWithResponseAsy
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .getByResourceGroup(
+ .startAssessment(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
- expand,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
@@ -668,7 +664,7 @@ private Mono> getByResourceGroupWithResponseAsy
}
/**
- * Gets a SQL virtual machine.
+ * Starts SQL best practices 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.
@@ -676,68 +672,159 @@ private Mono> getByResourceGroupWithResponseAsy
* @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 on successful completion of {@link Mono}.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStartAssessmentAsync(
String resourceGroupName, String sqlVirtualMachineName) {
- final String expand = null;
- return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ Mono>> mono =
+ startAssessmentWithResponseAsync(resourceGroupName, sqlVirtualMachineName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
- * Gets a SQL virtual machine.
+ * Starts SQL best practices 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 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 a SQL virtual machine along with {@link Response}.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStartAssessmentAsync(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ startAssessmentWithResponseAsync(resourceGroupName, sqlVirtualMachineName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Starts SQL best practices 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 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)
+ public SyncPoller, Void> beginStartAssessment(
+ String resourceGroupName, String sqlVirtualMachineName) {
+ return this.beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName).getSyncPoller();
+ }
+
+ /**
+ * Starts SQL best practices 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 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)
+ public SyncPoller, Void> beginStartAssessment(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ return this.beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName, context).getSyncPoller();
+ }
+
+ /**
+ * Starts SQL best practices 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 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 {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String sqlVirtualMachineName, String expand, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand, context).block();
+ private Mono startAssessmentAsync(String resourceGroupName, String sqlVirtualMachineName) {
+ return beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Gets a SQL virtual machine.
+ * Starts SQL best practices 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 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 {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public SqlVirtualMachineInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName) {
- final String expand = null;
- return getByResourceGroupWithResponse(resourceGroupName, sqlVirtualMachineName, expand, Context.NONE)
- .getValue();
+ private Mono startAssessmentAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ return beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Creates or updates a SQL virtual machine.
+ * Starts SQL best practices 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 parameters The SQL virtual machine.
* @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 along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
+ public void startAssessment(String resourceGroupName, String sqlVirtualMachineName) {
+ startAssessmentAsync(resourceGroupName, sqlVirtualMachineName).block();
+ }
+
+ /**
+ * Starts SQL best practices 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 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)
+ public void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ startAssessmentAsync(resourceGroupName, sqlVirtualMachineName, context).block();
+ }
+
+ /**
+ * 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 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> redeployWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -758,44 +845,37 @@ private Mono>> createOrUpdateWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .createOrUpdate(
+ .redeploy(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
- parameters,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters The SQL virtual machine.
* @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 a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrUpdateWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
+ private Mono>> redeployWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -816,212 +896,180 @@ private Mono>> createOrUpdateWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .createOrUpdate(
+ .redeploy(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
- parameters,
accept,
context);
}
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters The SQL virtual machine.
* @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 {@link PollerFlux} for polling of a SQL virtual machine.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, SqlVirtualMachineInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
- Mono>> mono =
- createOrUpdateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters);
+ private PollerFlux, Void> beginRedeployAsync(
+ String resourceGroupName, String sqlVirtualMachineName) {
+ Mono>> mono = redeployWithResponseAsync(resourceGroupName, sqlVirtualMachineName);
return this
.client
- .getLroResult(
- mono,
- this.client.getHttpPipeline(),
- SqlVirtualMachineInner.class,
- SqlVirtualMachineInner.class,
- this.client.getContext());
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters The SQL virtual machine.
* @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 the {@link PollerFlux} for polling of a SQL virtual machine.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, SqlVirtualMachineInner> beginCreateOrUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
+ private PollerFlux, Void> beginRedeployAsync(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
context = this.client.mergeContext(context);
Mono>> mono =
- createOrUpdateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters, context);
+ redeployWithResponseAsync(resourceGroupName, sqlVirtualMachineName, context);
return this
.client
- .getLroResult(
- mono,
- this.client.getHttpPipeline(),
- SqlVirtualMachineInner.class,
- SqlVirtualMachineInner.class,
- context);
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
}
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters The SQL virtual machine.
* @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 {@link SyncPoller} for polling of a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
- return this.beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).getSyncPoller();
+ public SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName) {
+ return this.beginRedeployAsync(resourceGroupName, sqlVirtualMachineName).getSyncPoller();
}
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters The SQL virtual machine.
* @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 the {@link SyncPoller} for polling of a SQL virtual machine.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
- return this
- .beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
- .getSyncPoller();
+ public SyncPoller, Void> beginRedeploy(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ return this.beginRedeployAsync(resourceGroupName, sqlVirtualMachineName, context).getSyncPoller();
}
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters The SQL virtual machine.
* @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 on successful completion of {@link Mono}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
- return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters)
+ private Mono redeployAsync(String resourceGroupName, String sqlVirtualMachineName) {
+ return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters The SQL virtual machine.
* @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 a SQL virtual machine on successful completion of {@link Mono}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
- return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
+ private Mono redeployAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters The SQL virtual machine.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public SqlVirtualMachineInner createOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
- return createOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).block();
+ public void redeploy(String resourceGroupName, String sqlVirtualMachineName) {
+ redeployAsync(resourceGroupName, sqlVirtualMachineName).block();
}
/**
- * Creates or updates a SQL virtual machine.
+ * 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 parameters The SQL virtual machine.
* @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 a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public SqlVirtualMachineInner createOrUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
- return createOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).block();
+ public void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ redeployAsync(resourceGroupName, sqlVirtualMachineName, context).block();
}
/**
- * Deletes a SQL virtual machine.
+ * Gets a 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 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 the {@link Response} on successful completion of {@link Mono}.
+ * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, String expand) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1047,10 +1095,11 @@ private Mono>> deleteWithResponseAsync(
.withContext(
context ->
service
- .delete(
+ .getByResourceGroup(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
+ expand,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
@@ -1059,20 +1108,21 @@ private Mono>> deleteWithResponseAsync(
}
/**
- * Deletes a SQL virtual machine.
+ * Gets a 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 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 the {@link Response} on successful completion of {@link Mono}.
+ * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, String expand, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1096,10 +1146,11 @@ private Mono>> deleteWithResponseAsync(
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .delete(
+ .getByResourceGroup(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
+ expand,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
@@ -1107,85 +1158,7 @@ private Mono>> deleteWithResponseAsync(
}
/**
- * Deletes a 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 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 PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, sqlVirtualMachineName);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
- }
-
- /**
- * Deletes a 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 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 PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono =
- deleteWithResponseAsync(resourceGroupName, sqlVirtualMachineName, context);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
- }
-
- /**
- * Deletes a 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 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)
- public SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineName) {
- return this.beginDeleteAsync(resourceGroupName, sqlVirtualMachineName).getSyncPoller();
- }
-
- /**
- * Deletes a 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 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)
- public SyncPoller, Void> beginDelete(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return this.beginDeleteAsync(resourceGroupName, sqlVirtualMachineName, context).getSyncPoller();
- }
-
- /**
- * Deletes a SQL virtual machine.
+ * Gets a 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.
@@ -1193,67 +1166,55 @@ 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 A {@link Mono} that completes when a successful response is received.
+ * @return a SQL virtual machine on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachineName) {
- return beginDeleteAsync(resourceGroupName, sqlVirtualMachineName)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
+ private Mono getByResourceGroupAsync(
+ String resourceGroupName, String sqlVirtualMachineName) {
+ final String expand = null;
+ return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Deletes a SQL virtual machine.
+ * Gets a 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 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 A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return beginDeleteAsync(resourceGroupName, sqlVirtualMachineName, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
- /**
- * Deletes a 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 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 along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String sqlVirtualMachineName) {
- deleteAsync(resourceGroupName, sqlVirtualMachineName).block();
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sqlVirtualMachineName, String expand, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand, context).block();
}
/**
- * Deletes a SQL virtual machine.
+ * Gets a 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 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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void delete(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- deleteAsync(resourceGroupName, sqlVirtualMachineName, context).block();
+ public SqlVirtualMachineInner getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName) {
+ final String expand = null;
+ return getByResourceGroupWithResponse(resourceGroupName, sqlVirtualMachineName, expand, Context.NONE)
+ .getValue();
}
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -1265,8 +1226,8 @@ public void delete(String resourceGroupName, String sqlVirtualMachineName, Conte
* @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1297,7 +1258,7 @@ private Mono>> updateWithResponseAsync(
.withContext(
context ->
service
- .update(
+ .createOrUpdate(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
@@ -1310,7 +1271,7 @@ private Mono>> updateWithResponseAsync(
}
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -1323,8 +1284,8 @@ private Mono>> updateWithResponseAsync(
* @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> updateWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1353,7 +1314,7 @@ private Mono>> updateWithResponseAsync(
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .update(
+ .createOrUpdate(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
@@ -1365,7 +1326,7 @@ private Mono>> updateWithResponseAsync(
}
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -1377,10 +1338,10 @@ private Mono>> updateWithResponseAsync(
* @return the {@link PollerFlux} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, SqlVirtualMachineInner> beginUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
+ private PollerFlux, SqlVirtualMachineInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
Mono>> mono =
- updateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters);
+ createOrUpdateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters);
return this
.client
.getLroResult(
@@ -1392,7 +1353,7 @@ private PollerFlux, SqlVirtualMachineInner> b
}
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -1405,11 +1366,11 @@ private PollerFlux, SqlVirtualMachineInner> b
* @return the {@link PollerFlux} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, SqlVirtualMachineInner> beginUpdateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
+ private PollerFlux, SqlVirtualMachineInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
context = this.client.mergeContext(context);
Mono>> mono =
- updateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters, context);
+ createOrUpdateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters, context);
return this
.client
.getLroResult(
@@ -1421,7 +1382,7 @@ private PollerFlux, SqlVirtualMachineInner> b
}
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -1433,13 +1394,13 @@ private PollerFlux, SqlVirtualMachineInner> b
* @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, SqlVirtualMachineInner> beginUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
- return this.beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).getSyncPoller();
+ public SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
+ return this.beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).getSyncPoller();
}
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -1452,13 +1413,15 @@ public SyncPoller, SqlVirtualMachineInner> be
* @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, SqlVirtualMachineInner> beginUpdate(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
- return this.beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).getSyncPoller();
+ public SyncPoller, SqlVirtualMachineInner> beginCreateOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
+ return this
+ .beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
+ .getSyncPoller();
}
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -1470,15 +1433,15 @@ public SyncPoller, SqlVirtualMachineInner> be
* @return a SQL virtual machine on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
- return beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -1491,15 +1454,15 @@ private Mono updateAsync(
* @return a SQL virtual machine on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono updateAsync(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
- return beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -1511,13 +1474,13 @@ private Mono updateAsync(
* @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public SqlVirtualMachineInner update(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
- return updateAsync(resourceGroupName, sqlVirtualMachineName, parameters).block();
+ public SqlVirtualMachineInner createOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).block();
}
/**
- * Updates a SQL virtual machine.
+ * Creates or updates a 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.
@@ -1530,24 +1493,25 @@ public SqlVirtualMachineInner update(
* @return a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public SqlVirtualMachineInner update(
- String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
- return updateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).block();
+ public SqlVirtualMachineInner createOrUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineInner parameters, Context context) {
+ return createOrUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).block();
}
/**
- * Gets all SQL virtual machines in a resource group.
+ * Deletes a 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 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 along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1558,6 +1522,10 @@ private Mono> listByResourceGroupSinglePag
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
+ if (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName is required and cannot be null."));
+ }
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
@@ -1569,40 +1537,32 @@ private Mono> listByResourceGroupSinglePag
.withContext(
context ->
service
- .listByResourceGroup(
+ .delete(
this.client.getEndpoint(),
resourceGroupName,
+ sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
context))
- .>map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Gets all SQL virtual machines in a resource group.
+ * Deletes a 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 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 along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(
- String resourceGroupName, Context context) {
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1613,6 +1573,10 @@ private Mono> listByResourceGroupSinglePag
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
+ if (sqlVirtualMachineName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter sqlVirtualMachineName is required and cannot be null."));
+ }
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
@@ -1622,92 +1586,96 @@ private Mono> listByResourceGroupSinglePag
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .listByResourceGroup(
+ .delete(
this.client.getEndpoint(),
resourceGroupName,
+ sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
- context)
- .map(
- res ->
- new PagedResponseBase<>(
- res.getRequest(),
- res.getStatusCode(),
- res.getHeaders(),
- res.getValue().value(),
- res.getValue().nextLink(),
- null));
+ context);
}
/**
- * Gets all SQL virtual machines in a resource group.
+ * Deletes a 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 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 as paginated response with {@link PagedFlux}.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- return new PagedFlux<>(
- () -> listByResourceGroupSinglePageAsync(resourceGroupName),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String sqlVirtualMachineName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, sqlVirtualMachineName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
- * Gets all SQL virtual machines in a resource group.
+ * Deletes a 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 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 as paginated response with {@link PagedFlux}.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
- return new PagedFlux<>(
- () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ deleteWithResponseAsync(resourceGroupName, sqlVirtualMachineName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
}
/**
- * Gets all SQL virtual machines in a resource group.
+ * Deletes a 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 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 as paginated response with {@link PagedIterable}.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String sqlVirtualMachineName) {
+ return this.beginDeleteAsync(resourceGroupName, sqlVirtualMachineName).getSyncPoller();
}
/**
- * Gets all SQL virtual machines in a resource group.
+ * Deletes a 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 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 as paginated response with {@link PagedIterable}.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, sqlVirtualMachineName, context).getSyncPoller();
}
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Deletes a 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.
@@ -1715,11 +1683,80 @@ public PagedIterable listByResourceGroup(String resource
* @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 {@link Response} on successful completion of {@link Mono}.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> startAssessmentWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
+ private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachineName) {
+ return beginDeleteAsync(resourceGroupName, sqlVirtualMachineName)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a 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 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 {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ return beginDeleteAsync(resourceGroupName, sqlVirtualMachineName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a 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 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)
+ public void delete(String resourceGroupName, String sqlVirtualMachineName) {
+ deleteAsync(resourceGroupName, sqlVirtualMachineName).block();
+ }
+
+ /**
+ * Deletes a 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 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)
+ public void delete(String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ deleteAsync(resourceGroupName, sqlVirtualMachineName, context).block();
+ }
+
+ /**
+ * Updates a 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 parameters The SQL virtual machine.
+ * @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 along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1740,37 +1777,44 @@ private Mono>> startAssessmentWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
- final String accept = "application/json";
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .startAssessment(
+ .update(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ parameters,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters The SQL virtual machine.
* @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 the {@link Response} on successful completion of {@link Mono}.
+ * @return a SQL virtual machine along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> startAssessmentWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ private Mono>> updateWithResponseAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1791,181 +1835,209 @@ private Mono>> startAssessmentWithResponseAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .startAssessment(
+ .update(
this.client.getEndpoint(),
resourceGroupName,
sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
+ parameters,
accept,
context);
}
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters The SQL virtual machine.
* @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 {@link PollerFlux} for polling of long-running operation.
+ * @return the {@link PollerFlux} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginStartAssessmentAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
+ private PollerFlux, SqlVirtualMachineInner> beginUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
Mono>> mono =
- startAssessmentWithResponseAsync(resourceGroupName, sqlVirtualMachineName);
+ updateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters);
return this
.client
- .getLroResult(
- mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ SqlVirtualMachineInner.class,
+ SqlVirtualMachineInner.class,
+ this.client.getContext());
}
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters The SQL virtual machine.
* @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 the {@link PollerFlux} for polling of long-running operation.
+ * @return the {@link PollerFlux} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginStartAssessmentAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ private PollerFlux, SqlVirtualMachineInner> beginUpdateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
context = this.client.mergeContext(context);
Mono>> mono =
- startAssessmentWithResponseAsync(resourceGroupName, sqlVirtualMachineName, context);
+ updateWithResponseAsync(resourceGroupName, sqlVirtualMachineName, parameters, context);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ SqlVirtualMachineInner.class,
+ SqlVirtualMachineInner.class,
+ context);
}
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters The SQL virtual machine.
* @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 {@link SyncPoller} for polling of long-running operation.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginStartAssessment(
- String resourceGroupName, String sqlVirtualMachineName) {
- return this.beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName).getSyncPoller();
+ public SyncPoller, SqlVirtualMachineInner> beginUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
+ return this.beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters).getSyncPoller();
}
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters The SQL virtual machine.
* @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 the {@link SyncPoller} for polling of long-running operation.
+ * @return the {@link SyncPoller} for polling of a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, Void> beginStartAssessment(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return this.beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName, context).getSyncPoller();
+ public SyncPoller, SqlVirtualMachineInner> beginUpdate(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).getSyncPoller();
}
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters The SQL virtual machine.
* @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 {@link Mono} that completes when a successful response is received.
+ * @return a SQL virtual machine on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono startAssessmentAsync(String resourceGroupName, String sqlVirtualMachineName) {
- return beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName)
+ private Mono updateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
+ return beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters The SQL virtual machine.
* @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 A {@link Mono} that completes when a successful response is received.
+ * @return a SQL virtual machine on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono startAssessmentAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return beginStartAssessmentAsync(resourceGroupName, sqlVirtualMachineName, context)
+ private Mono updateAsync(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
+ return beginUpdateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters The SQL virtual machine.
* @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.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void startAssessment(String resourceGroupName, String sqlVirtualMachineName) {
- startAssessmentAsync(resourceGroupName, sqlVirtualMachineName).block();
+ public SqlVirtualMachineInner update(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters) {
+ return updateAsync(resourceGroupName, sqlVirtualMachineName, parameters).block();
}
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Updates a 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 parameters The SQL virtual machine.
* @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 a SQL virtual machine.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- startAssessmentAsync(resourceGroupName, sqlVirtualMachineName, context).block();
+ public SqlVirtualMachineInner update(
+ String resourceGroupName, String sqlVirtualMachineName, SqlVirtualMachineUpdate parameters, Context context) {
+ return updateAsync(resourceGroupName, sqlVirtualMachineName, parameters, context).block();
}
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 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 Response} on successful completion of {@link Mono}.
+ * @return all SQL virtual machines in a resource group along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> redeployWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -1976,10 +2048,6 @@ private Mono>> redeployWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (sqlVirtualMachineName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter sqlVirtualMachineName is required and cannot be null."));
- }
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
@@ -1991,32 +2059,40 @@ private Mono>> redeployWithResponseAsync(
.withContext(
context ->
service
- .redeploy(
+ .listByResourceGroup(
this.client.getEndpoint(),
resourceGroupName,
- sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 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 Response} on successful completion of {@link Mono}.
+ * @return all SQL virtual machines in a resource group along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> redeployWithResponseAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
@@ -2027,10 +2103,6 @@ private Mono>> redeployWithResponseAsync(
return Mono
.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
- if (sqlVirtualMachineName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter sqlVirtualMachineName is required and cannot be null."));
- }
if (this.client.getSubscriptionId() == null) {
return Mono
.error(
@@ -2040,160 +2112,88 @@ private Mono>> redeployWithResponseAsync(
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .redeploy(
+ .listByResourceGroup(
this.client.getEndpoint(),
resourceGroupName,
- sqlVirtualMachineName,
this.client.getSubscriptionId(),
this.client.getApiVersion(),
accept,
- 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 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 PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginRedeployAsync(
- String resourceGroupName, String sqlVirtualMachineName) {
- Mono>> mono = redeployWithResponseAsync(resourceGroupName, sqlVirtualMachineName);
- return this
- .client
- .getLroResult(
- mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
- }
-
- /**
- * 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 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 PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginRedeployAsync(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono =
- redeployWithResponseAsync(resourceGroupName, sqlVirtualMachineName, context);
- return this
- .client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, 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 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)
- public SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName) {
- return this.beginRedeployAsync(resourceGroupName, sqlVirtualMachineName).getSyncPoller();
- }
-
- /**
- * 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 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)
- public SyncPoller, Void> beginRedeploy(
- String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return this.beginRedeployAsync(resourceGroupName, sqlVirtualMachineName, context).getSyncPoller();
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
}
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 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 {@link Mono} that completes when a successful response is received.
+ * @return all SQL virtual machines in a resource group as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono redeployAsync(String resourceGroupName, String sqlVirtualMachineName) {
- return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 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 {@link Mono} that completes when a successful response is received.
+ * @return all SQL virtual machines in a resource group as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono redeployAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName, context)
- .last()
- .flatMap(this.client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
}
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 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 as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void redeploy(String resourceGroupName, String sqlVirtualMachineName) {
- redeployAsync(resourceGroupName, sqlVirtualMachineName).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
}
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 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 as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- redeployAsync(resourceGroupName, sqlVirtualMachineName, context).block();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
}
/**
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesImpl.java
index 88883e297c91..4f065c18130b 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesImpl.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachinesImpl.java
@@ -52,6 +52,22 @@ public PagedIterable list(Context context) {
return Utils.mapPage(inner, inner1 -> new SqlVirtualMachineImpl(inner1, this.manager()));
}
+ public void startAssessment(String resourceGroupName, String sqlVirtualMachineName) {
+ this.serviceClient().startAssessment(resourceGroupName, sqlVirtualMachineName);
+ }
+
+ public void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ this.serviceClient().startAssessment(resourceGroupName, sqlVirtualMachineName, context);
+ }
+
+ public void redeploy(String resourceGroupName, String sqlVirtualMachineName) {
+ this.serviceClient().redeploy(resourceGroupName, sqlVirtualMachineName);
+ }
+
+ public void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context) {
+ this.serviceClient().redeploy(resourceGroupName, sqlVirtualMachineName, context);
+ }
+
public Response getByResourceGroupWithResponse(
String resourceGroupName, String sqlVirtualMachineName, String expand, Context context) {
Response inner =
@@ -98,22 +114,6 @@ public PagedIterable listByResourceGroup(String resourceGroup
return Utils.mapPage(inner, inner1 -> new SqlVirtualMachineImpl(inner1, this.manager()));
}
- public void startAssessment(String resourceGroupName, String sqlVirtualMachineName) {
- this.serviceClient().startAssessment(resourceGroupName, sqlVirtualMachineName);
- }
-
- public void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- this.serviceClient().startAssessment(resourceGroupName, sqlVirtualMachineName, context);
- }
-
- public void redeploy(String resourceGroupName, String sqlVirtualMachineName) {
- this.serviceClient().redeploy(resourceGroupName, sqlVirtualMachineName);
- }
-
- public void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context) {
- this.serviceClient().redeploy(resourceGroupName, sqlVirtualMachineName, context);
- }
-
public SqlVirtualMachine getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AdditionalVmPatch.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AdditionalVmPatch.java
new file mode 100644
index 000000000000..88f5dda2b08a
--- /dev/null
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AdditionalVmPatch.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.sqlvirtualmachine.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Additional Patch to be enable or enabled on the SQL Virtual Machine. */
+public final class AdditionalVmPatch extends ExpandableStringEnum {
+ /** Static value NotSet for AdditionalVmPatch. */
+ public static final AdditionalVmPatch NOT_SET = fromString("NotSet");
+
+ /** Static value MicrosoftUpdate for AdditionalVmPatch. */
+ public static final AdditionalVmPatch MICROSOFT_UPDATE = fromString("MicrosoftUpdate");
+
+ /**
+ * Creates a new instance of AdditionalVmPatch value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public AdditionalVmPatch() {
+ }
+
+ /**
+ * Creates or finds a AdditionalVmPatch from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding AdditionalVmPatch.
+ */
+ @JsonCreator
+ public static AdditionalVmPatch fromString(String name) {
+ return fromString(name, AdditionalVmPatch.class);
+ }
+
+ /**
+ * Gets known AdditionalVmPatch values.
+ *
+ * @return known AdditionalVmPatch values.
+ */
+ public static Collection values() {
+ return values(AdditionalVmPatch.class);
+ }
+}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoPatchingSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoPatchingSettings.java
index b15c65b703a7..b6dc7cc16be6 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoPatchingSettings.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoPatchingSettings.java
@@ -34,6 +34,12 @@ public final class AutoPatchingSettings {
@JsonProperty(value = "maintenanceWindowDuration")
private Integer maintenanceWindowDuration;
+ /*
+ * Additional Patch to be enable or enabled on the SQL Virtual Machine.
+ */
+ @JsonProperty(value = "additionalVmPatch")
+ private AdditionalVmPatch additionalVmPatch;
+
/** Creates an instance of AutoPatchingSettings class. */
public AutoPatchingSettings() {
}
@@ -118,6 +124,26 @@ public AutoPatchingSettings withMaintenanceWindowDuration(Integer maintenanceWin
return this;
}
+ /**
+ * Get the additionalVmPatch property: Additional Patch to be enable or enabled on the SQL Virtual Machine.
+ *
+ * @return the additionalVmPatch value.
+ */
+ public AdditionalVmPatch additionalVmPatch() {
+ return this.additionalVmPatch;
+ }
+
+ /**
+ * Set the additionalVmPatch property: Additional Patch to be enable or enabled on the SQL Virtual Machine.
+ *
+ * @param additionalVmPatch the additionalVmPatch value to set.
+ * @return the AutoPatchingSettings object itself.
+ */
+ public AutoPatchingSettings withAdditionalVmPatch(AdditionalVmPatch additionalVmPatch) {
+ this.additionalVmPatch = additionalVmPatch;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AvailabilityGroupListener.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AvailabilityGroupListener.java
index a2072d20c89b..a0e033a2d2a3 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AvailabilityGroupListener.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AvailabilityGroupListener.java
@@ -108,11 +108,13 @@ public interface AvailabilityGroupListener {
interface Definition
extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
}
+
/** The AvailabilityGroupListener definition stages. */
interface DefinitionStages {
/** The first stage of the AvailabilityGroupListener definition. */
interface Blank extends WithParentResource {
}
+
/** The stage of the AvailabilityGroupListener definition allowing to specify parent resource. */
interface WithParentResource {
/**
@@ -125,6 +127,7 @@ interface WithParentResource {
*/
WithCreate withExistingSqlVirtualMachineGroup(String resourceGroupName, String sqlVirtualMachineGroupName);
}
+
/**
* The stage of the AvailabilityGroupListener definition which contains all the minimum required properties for
* the resource to be created, but also allows for any other optional properties to be specified.
@@ -151,6 +154,7 @@ interface WithCreate
*/
AvailabilityGroupListener create(Context context);
}
+
/** The stage of the AvailabilityGroupListener definition allowing to specify availabilityGroupName. */
interface WithAvailabilityGroupName {
/**
@@ -161,6 +165,7 @@ interface WithAvailabilityGroupName {
*/
WithCreate withAvailabilityGroupName(String availabilityGroupName);
}
+
/** The stage of the AvailabilityGroupListener definition allowing to specify loadBalancerConfigurations. */
interface WithLoadBalancerConfigurations {
/**
@@ -173,6 +178,7 @@ interface WithLoadBalancerConfigurations {
*/
WithCreate withLoadBalancerConfigurations(List loadBalancerConfigurations);
}
+
/** The stage of the AvailabilityGroupListener definition allowing to specify multiSubnetIpConfigurations. */
interface WithMultiSubnetIpConfigurations {
/**
@@ -184,6 +190,7 @@ interface WithMultiSubnetIpConfigurations {
*/
WithCreate withMultiSubnetIpConfigurations(List multiSubnetIpConfigurations);
}
+
/**
* The stage of the AvailabilityGroupListener definition allowing to specify
* createDefaultAvailabilityGroupIfNotExist.
@@ -198,6 +205,7 @@ interface WithCreateDefaultAvailabilityGroupIfNotExist {
*/
WithCreate withCreateDefaultAvailabilityGroupIfNotExist(Boolean createDefaultAvailabilityGroupIfNotExist);
}
+
/** The stage of the AvailabilityGroupListener definition allowing to specify port. */
interface WithPort {
/**
@@ -208,6 +216,7 @@ interface WithPort {
*/
WithCreate withPort(Integer port);
}
+
/** The stage of the AvailabilityGroupListener definition allowing to specify availabilityGroupConfiguration. */
interface WithAvailabilityGroupConfiguration {
/**
@@ -219,6 +228,7 @@ interface WithAvailabilityGroupConfiguration {
WithCreate withAvailabilityGroupConfiguration(AgConfiguration availabilityGroupConfiguration);
}
}
+
/**
* Begins update for the AvailabilityGroupListener resource.
*
@@ -249,6 +259,7 @@ interface Update
*/
AvailabilityGroupListener apply(Context context);
}
+
/** The AvailabilityGroupListener update stages. */
interface UpdateStages {
/** The stage of the AvailabilityGroupListener update allowing to specify availabilityGroupName. */
@@ -261,6 +272,7 @@ interface WithAvailabilityGroupName {
*/
Update withAvailabilityGroupName(String availabilityGroupName);
}
+
/** The stage of the AvailabilityGroupListener update allowing to specify loadBalancerConfigurations. */
interface WithLoadBalancerConfigurations {
/**
@@ -273,6 +285,7 @@ interface WithLoadBalancerConfigurations {
*/
Update withLoadBalancerConfigurations(List loadBalancerConfigurations);
}
+
/** The stage of the AvailabilityGroupListener update allowing to specify multiSubnetIpConfigurations. */
interface WithMultiSubnetIpConfigurations {
/**
@@ -284,6 +297,7 @@ interface WithMultiSubnetIpConfigurations {
*/
Update withMultiSubnetIpConfigurations(List multiSubnetIpConfigurations);
}
+
/**
* The stage of the AvailabilityGroupListener update allowing to specify
* createDefaultAvailabilityGroupIfNotExist.
@@ -298,6 +312,7 @@ interface WithCreateDefaultAvailabilityGroupIfNotExist {
*/
Update withCreateDefaultAvailabilityGroupIfNotExist(Boolean createDefaultAvailabilityGroupIfNotExist);
}
+
/** The stage of the AvailabilityGroupListener update allowing to specify port. */
interface WithPort {
/**
@@ -308,6 +323,7 @@ interface WithPort {
*/
Update withPort(Integer port);
}
+
/** The stage of the AvailabilityGroupListener update allowing to specify availabilityGroupConfiguration. */
interface WithAvailabilityGroupConfiguration {
/**
@@ -319,6 +335,7 @@ interface WithAvailabilityGroupConfiguration {
Update withAvailabilityGroupConfiguration(AgConfiguration availabilityGroupConfiguration);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Commit.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Commit.java
index ff96b1db5d29..854afbd77cc5 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Commit.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Commit.java
@@ -10,11 +10,11 @@
/** Replica commit mode in availability group. */
public final class Commit extends ExpandableStringEnum {
- /** Static value SYNCHRONOUS_COMMIT for Commit. */
- public static final Commit SYNCHRONOUS_COMMIT = fromString("SYNCHRONOUS_COMMIT");
+ /** Static value Synchronous_Commit for Commit. */
+ public static final Commit SYNCHRONOUS_COMMIT = fromString("Synchronous_Commit");
- /** Static value ASYNCHRONOUS_COMMIT for Commit. */
- public static final Commit ASYNCHRONOUS_COMMIT = fromString("ASYNCHRONOUS_COMMIT");
+ /** Static value Asynchronous_Commit for Commit. */
+ public static final Commit ASYNCHRONOUS_COMMIT = fromString("Asynchronous_Commit");
/**
* Creates a new instance of Commit value.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Failover.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Failover.java
index 3ec1cedd8f7f..8756f1ba6c5d 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Failover.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Failover.java
@@ -10,11 +10,11 @@
/** Replica failover mode in availability group. */
public final class Failover extends ExpandableStringEnum {
- /** Static value AUTOMATIC for Failover. */
- public static final Failover AUTOMATIC = fromString("AUTOMATIC");
+ /** Static value Automatic for Failover. */
+ public static final Failover AUTOMATIC = fromString("Automatic");
- /** Static value MANUAL for Failover. */
- public static final Failover MANUAL = fromString("MANUAL");
+ /** Static value Manual for Failover. */
+ public static final Failover MANUAL = fromString("Manual");
/**
* Creates a new instance of Failover value.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ReadableSecondary.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ReadableSecondary.java
index 7e9feb6974a2..6e3beb41753c 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ReadableSecondary.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ReadableSecondary.java
@@ -10,14 +10,14 @@
/** Replica readable secondary mode in availability group. */
public final class ReadableSecondary extends ExpandableStringEnum {
- /** Static value NO for ReadableSecondary. */
- public static final ReadableSecondary NO = fromString("NO");
+ /** Static value No for ReadableSecondary. */
+ public static final ReadableSecondary NO = fromString("No");
- /** Static value ALL for ReadableSecondary. */
- public static final ReadableSecondary ALL = fromString("ALL");
+ /** Static value All for ReadableSecondary. */
+ public static final ReadableSecondary ALL = fromString("All");
- /** Static value READ_ONLY for ReadableSecondary. */
- public static final ReadableSecondary READ_ONLY = fromString("READ_ONLY");
+ /** Static value Read_Only for ReadableSecondary. */
+ public static final ReadableSecondary READ_ONLY = fromString("Read_Only");
/**
* Creates a new instance of ReadableSecondary value.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Role.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Role.java
index 2a0a4913009c..5e47721001b1 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Role.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Role.java
@@ -10,11 +10,11 @@
/** Replica Role in availability group. */
public final class Role extends ExpandableStringEnum {
- /** Static value PRIMARY for Role. */
- public static final Role PRIMARY = fromString("PRIMARY");
+ /** Static value Primary for Role. */
+ public static final Role PRIMARY = fromString("Primary");
- /** Static value SECONDARY for Role. */
- public static final Role SECONDARY = fromString("SECONDARY");
+ /** Static value Secondary for Role. */
+ public static final Role SECONDARY = fromString("Secondary");
/**
* Creates a new instance of Role value.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlManagementMode.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlManagementMode.java
index 073bf09a4345..4f9a16a0e116 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlManagementMode.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlManagementMode.java
@@ -8,7 +8,10 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
-/** SQL Server Management type. */
+/**
+ * SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql
+ * Management, refrain from using it.
+ */
public final class SqlManagementMode extends ExpandableStringEnum {
/** Static value Full for SqlManagementMode. */
public static final SqlManagementMode FULL = fromString("Full");
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlStorageSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlStorageSettings.java
index 91278b73ea83..28799a2981e1 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlStorageSettings.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlStorageSettings.java
@@ -23,6 +23,12 @@ public final class SqlStorageSettings {
@JsonProperty(value = "defaultFilePath")
private String defaultFilePath;
+ /*
+ * Use storage pool to build a drive if true or not provided
+ */
+ @JsonProperty(value = "useStoragePool")
+ private Boolean useStoragePool;
+
/** Creates an instance of SqlStorageSettings class. */
public SqlStorageSettings() {
}
@@ -67,6 +73,26 @@ public SqlStorageSettings withDefaultFilePath(String defaultFilePath) {
return this;
}
+ /**
+ * Get the useStoragePool property: Use storage pool to build a drive if true or not provided.
+ *
+ * @return the useStoragePool value.
+ */
+ public Boolean useStoragePool() {
+ return this.useStoragePool;
+ }
+
+ /**
+ * Set the useStoragePool property: Use storage pool to build a drive if true or not provided.
+ *
+ * @param useStoragePool the useStoragePool value to set.
+ * @return the SqlStorageSettings object itself.
+ */
+ public SqlStorageSettings withUseStoragePool(Boolean useStoragePool) {
+ this.useStoragePool = useStoragePool;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlTempDbSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlTempDbSettings.java
index 4574416159fc..5268c55ae0d6 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlTempDbSettings.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlTempDbSettings.java
@@ -65,6 +65,12 @@ public final class SqlTempDbSettings {
@JsonProperty(value = "defaultFilePath")
private String defaultFilePath;
+ /*
+ * Use storage pool to build a drive if true or not provided
+ */
+ @JsonProperty(value = "useStoragePool")
+ private Boolean useStoragePool;
+
/** Creates an instance of SqlTempDbSettings class. */
public SqlTempDbSettings() {
}
@@ -249,6 +255,26 @@ public SqlTempDbSettings withDefaultFilePath(String defaultFilePath) {
return this;
}
+ /**
+ * Get the useStoragePool property: Use storage pool to build a drive if true or not provided.
+ *
+ * @return the useStoragePool value.
+ */
+ public Boolean useStoragePool() {
+ return this.useStoragePool;
+ }
+
+ /**
+ * Set the useStoragePool property: Use storage pool to build a drive if true or not provided.
+ *
+ * @param useStoragePool the useStoragePool value to set.
+ * @return the SqlTempDbSettings object itself.
+ */
+ public SqlTempDbSettings withUseStoragePool(Boolean useStoragePool) {
+ this.useStoragePool = useStoragePool;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachine.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachine.java
index 159ac258e03f..cf2faa68512d 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachine.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachine.java
@@ -48,7 +48,8 @@ public interface SqlVirtualMachine {
Map tags();
/**
- * Gets the identity property: Azure Active Directory identity of the server.
+ * Gets the identity property: DO NOT USE. This value will be deprecated. Azure Active Directory identity of the
+ * server.
*
* @return the identity value.
*/
@@ -91,7 +92,8 @@ public interface SqlVirtualMachine {
SqlServerLicenseType sqlServerLicenseType();
/**
- * Gets the sqlManagement property: SQL Server Management type.
+ * Gets the sqlManagement property: SQL Server Management type. NOTE: This parameter is not used anymore. API will
+ * automatically detect the Sql Management, refrain from using it.
*
* @return the sqlManagement value.
*/
@@ -227,11 +229,13 @@ interface Definition
DefinitionStages.WithResourceGroup,
DefinitionStages.WithCreate {
}
+
/** The SqlVirtualMachine definition stages. */
interface DefinitionStages {
/** The first stage of the SqlVirtualMachine definition. */
interface Blank extends WithLocation {
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify location. */
interface WithLocation {
/**
@@ -250,6 +254,7 @@ interface WithLocation {
*/
WithResourceGroup withRegion(String location);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify parent resource. */
interface WithResourceGroup {
/**
@@ -261,6 +266,7 @@ interface WithResourceGroup {
*/
WithCreate withExistingResourceGroup(String resourceGroupName);
}
+
/**
* The stage of the SqlVirtualMachine definition which contains all the minimum required properties for the
* resource to be created, but also allows for any other optional properties to be specified.
@@ -298,6 +304,7 @@ interface WithCreate
*/
SqlVirtualMachine create(Context context);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify tags. */
interface WithTags {
/**
@@ -308,16 +315,19 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify identity. */
interface WithIdentity {
/**
- * Specifies the identity property: Azure Active Directory identity of the server..
+ * Specifies the identity property: DO NOT USE. This value will be deprecated. Azure Active Directory
+ * identity of the server..
*
- * @param identity Azure Active Directory identity of the server.
+ * @param identity DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server.
* @return the next definition stage.
*/
WithCreate withIdentity(ResourceIdentity identity);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify virtualMachineResourceId. */
interface WithVirtualMachineResourceId {
/**
@@ -330,6 +340,7 @@ interface WithVirtualMachineResourceId {
*/
WithCreate withVirtualMachineResourceId(String virtualMachineResourceId);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify sqlImageOffer. */
interface WithSqlImageOffer {
/**
@@ -340,6 +351,7 @@ interface WithSqlImageOffer {
*/
WithCreate withSqlImageOffer(String sqlImageOffer);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify sqlServerLicenseType. */
interface WithSqlServerLicenseType {
/**
@@ -350,16 +362,20 @@ interface WithSqlServerLicenseType {
*/
WithCreate withSqlServerLicenseType(SqlServerLicenseType sqlServerLicenseType);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify sqlManagement. */
interface WithSqlManagement {
/**
- * Specifies the sqlManagement property: SQL Server Management type..
+ * Specifies the sqlManagement property: SQL Server Management type. NOTE: This parameter is not used
+ * anymore. API will automatically detect the Sql Management, refrain from using it..
*
- * @param sqlManagement SQL Server Management type.
+ * @param sqlManagement SQL Server Management type. NOTE: This parameter is not used anymore. API will
+ * automatically detect the Sql Management, refrain from using it.
* @return the next definition stage.
*/
WithCreate withSqlManagement(SqlManagementMode sqlManagement);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify leastPrivilegeMode. */
interface WithLeastPrivilegeMode {
/**
@@ -370,6 +386,7 @@ interface WithLeastPrivilegeMode {
*/
WithCreate withLeastPrivilegeMode(LeastPrivilegeMode leastPrivilegeMode);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify sqlImageSku. */
interface WithSqlImageSku {
/**
@@ -380,6 +397,7 @@ interface WithSqlImageSku {
*/
WithCreate withSqlImageSku(SqlImageSku sqlImageSku);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify wsfcDomainCredentials. */
interface WithWsfcDomainCredentials {
/**
@@ -392,6 +410,7 @@ interface WithWsfcDomainCredentials {
*/
WithCreate withWsfcDomainCredentials(WsfcDomainCredentials wsfcDomainCredentials);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify wsfcStaticIp. */
interface WithWsfcStaticIp {
/**
@@ -404,6 +423,7 @@ interface WithWsfcStaticIp {
*/
WithCreate withWsfcStaticIp(String wsfcStaticIp);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify autoPatchingSettings. */
interface WithAutoPatchingSettings {
/**
@@ -416,6 +436,7 @@ interface WithAutoPatchingSettings {
*/
WithCreate withAutoPatchingSettings(AutoPatchingSettings autoPatchingSettings);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify autoBackupSettings. */
interface WithAutoBackupSettings {
/**
@@ -426,6 +447,7 @@ interface WithAutoBackupSettings {
*/
WithCreate withAutoBackupSettings(AutoBackupSettings autoBackupSettings);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify keyVaultCredentialSettings. */
interface WithKeyVaultCredentialSettings {
/**
@@ -436,6 +458,7 @@ interface WithKeyVaultCredentialSettings {
*/
WithCreate withKeyVaultCredentialSettings(KeyVaultCredentialSettings keyVaultCredentialSettings);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify serverConfigurationsManagementSettings. */
interface WithServerConfigurationsManagementSettings {
/**
@@ -448,6 +471,7 @@ interface WithServerConfigurationsManagementSettings {
WithCreate withServerConfigurationsManagementSettings(
ServerConfigurationsManagementSettings serverConfigurationsManagementSettings);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify storageConfigurationSettings. */
interface WithStorageConfigurationSettings {
/**
@@ -458,6 +482,7 @@ interface WithStorageConfigurationSettings {
*/
WithCreate withStorageConfigurationSettings(StorageConfigurationSettings storageConfigurationSettings);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify assessmentSettings. */
interface WithAssessmentSettings {
/**
@@ -468,6 +493,7 @@ interface WithAssessmentSettings {
*/
WithCreate withAssessmentSettings(AssessmentSettings assessmentSettings);
}
+
/** The stage of the SqlVirtualMachine definition allowing to specify enableAutomaticUpgrade. */
interface WithEnableAutomaticUpgrade {
/**
@@ -479,6 +505,7 @@ interface WithEnableAutomaticUpgrade {
WithCreate withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade);
}
}
+
/**
* Begins update for the SqlVirtualMachine resource.
*
@@ -503,6 +530,7 @@ interface Update extends UpdateStages.WithTags {
*/
SqlVirtualMachine apply(Context context);
}
+
/** The SqlVirtualMachine update stages. */
interface UpdateStages {
/** The stage of the SqlVirtualMachine update allowing to specify tags. */
@@ -516,6 +544,7 @@ interface WithTags {
Update withTags(Map tags);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroup.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroup.java
index 2f95780818de..ebbf532c9ae0 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroup.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroup.java
@@ -139,11 +139,13 @@ interface Definition
DefinitionStages.WithResourceGroup,
DefinitionStages.WithCreate {
}
+
/** The SqlVirtualMachineGroup definition stages. */
interface DefinitionStages {
/** The first stage of the SqlVirtualMachineGroup definition. */
interface Blank extends WithLocation {
}
+
/** The stage of the SqlVirtualMachineGroup definition allowing to specify location. */
interface WithLocation {
/**
@@ -162,6 +164,7 @@ interface WithLocation {
*/
WithResourceGroup withRegion(String location);
}
+
/** The stage of the SqlVirtualMachineGroup definition allowing to specify parent resource. */
interface WithResourceGroup {
/**
@@ -173,6 +176,7 @@ interface WithResourceGroup {
*/
WithCreate withExistingResourceGroup(String resourceGroupName);
}
+
/**
* The stage of the SqlVirtualMachineGroup definition which contains all the minimum required properties for the
* resource to be created, but also allows for any other optional properties to be specified.
@@ -197,6 +201,7 @@ interface WithCreate
*/
SqlVirtualMachineGroup create(Context context);
}
+
/** The stage of the SqlVirtualMachineGroup definition allowing to specify tags. */
interface WithTags {
/**
@@ -207,6 +212,7 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+
/** The stage of the SqlVirtualMachineGroup definition allowing to specify sqlImageOffer. */
interface WithSqlImageOffer {
/**
@@ -218,6 +224,7 @@ interface WithSqlImageOffer {
*/
WithCreate withSqlImageOffer(String sqlImageOffer);
}
+
/** The stage of the SqlVirtualMachineGroup definition allowing to specify sqlImageSku. */
interface WithSqlImageSku {
/**
@@ -228,6 +235,7 @@ interface WithSqlImageSku {
*/
WithCreate withSqlImageSku(SqlVmGroupImageSku sqlImageSku);
}
+
/** The stage of the SqlVirtualMachineGroup definition allowing to specify wsfcDomainProfile. */
interface WithWsfcDomainProfile {
/**
@@ -239,6 +247,7 @@ interface WithWsfcDomainProfile {
WithCreate withWsfcDomainProfile(WsfcDomainProfile wsfcDomainProfile);
}
}
+
/**
* Begins update for the SqlVirtualMachineGroup resource.
*
@@ -263,6 +272,7 @@ interface Update extends UpdateStages.WithTags {
*/
SqlVirtualMachineGroup apply(Context context);
}
+
/** The SqlVirtualMachineGroup update stages. */
interface UpdateStages {
/** The stage of the SqlVirtualMachineGroup update allowing to specify tags. */
@@ -276,6 +286,7 @@ interface WithTags {
Update withTags(Map tags);
}
}
+
/**
* Refreshes the resource to sync with Azure.
*
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachines.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachines.java
index 4e83268fc6fe..fb02a20c24ef 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachines.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachines.java
@@ -61,36 +61,32 @@ PagedIterable listBySqlVmGroup(
PagedIterable list(Context context);
/**
- * Gets a SQL virtual machine.
+ * Starts SQL best practices 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 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 a SQL virtual machine along with {@link Response}.
*/
- Response getByResourceGroupWithResponse(
- String resourceGroupName, String sqlVirtualMachineName, String expand, Context context);
+ void startAssessment(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Gets a SQL virtual machine.
+ * Starts SQL best practices 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 a SQL virtual machine.
*/
- SqlVirtualMachine getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName);
+ void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Deletes a SQL virtual machine.
+ * 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.
@@ -99,10 +95,10 @@ Response getByResourceGroupWithResponse(
* @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.
*/
- void deleteByResourceGroup(String resourceGroupName, String sqlVirtualMachineName);
+ void redeploy(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Deletes a SQL virtual machine.
+ * 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.
@@ -112,35 +108,39 @@ Response getByResourceGroupWithResponse(
* @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.
*/
- void delete(String resourceGroupName, String sqlVirtualMachineName, Context context);
+ void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Gets all SQL virtual machines in a resource group.
+ * Gets a 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 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 all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
+ * @return a SQL virtual machine along with {@link Response}.
*/
- PagedIterable listByResourceGroup(String resourceGroupName);
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String sqlVirtualMachineName, String expand, Context context);
/**
- * Gets all SQL virtual machines in a resource group.
+ * Gets a 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 context The context to associate with this operation.
+ * @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 all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
+ * @return a SQL virtual machine.
*/
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+ SqlVirtualMachine getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Deletes a 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.
@@ -149,10 +149,10 @@ Response getByResourceGroupWithResponse(
* @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.
*/
- void startAssessment(String resourceGroupName, String sqlVirtualMachineName);
+ void deleteByResourceGroup(String resourceGroupName, String sqlVirtualMachineName);
/**
- * Starts SQL best practices Assessment on SQL virtual machine.
+ * Deletes a 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.
@@ -162,32 +162,32 @@ Response getByResourceGroupWithResponse(
* @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.
*/
- void startAssessment(String resourceGroupName, String sqlVirtualMachineName, Context context);
+ void delete(String resourceGroupName, String sqlVirtualMachineName, Context context);
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
- void redeploy(String resourceGroupName, String sqlVirtualMachineName);
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Uninstalls and reinstalls the SQL IaaS Extension.
+ * Gets all SQL virtual machines in a resource group.
*
* @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 all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}.
*/
- void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context);
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
/**
* Gets a SQL virtual machine.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/StorageConfigurationSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/StorageConfigurationSettings.java
index d2ad8923415f..dfc6f546490f 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/StorageConfigurationSettings.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/StorageConfigurationSettings.java
@@ -46,6 +46,12 @@ public final class StorageConfigurationSettings {
@JsonProperty(value = "storageWorkloadType")
private StorageWorkloadType storageWorkloadType;
+ /*
+ * Enable SQL IaaS Agent storage configuration blade in Azure Portal.
+ */
+ @JsonProperty(value = "enableStorageConfigBlade")
+ private Boolean enableStorageConfigBlade;
+
/** Creates an instance of StorageConfigurationSettings class. */
public StorageConfigurationSettings() {
}
@@ -170,6 +176,26 @@ public StorageConfigurationSettings withStorageWorkloadType(StorageWorkloadType
return this;
}
+ /**
+ * Get the enableStorageConfigBlade property: Enable SQL IaaS Agent storage configuration blade in Azure Portal.
+ *
+ * @return the enableStorageConfigBlade value.
+ */
+ public Boolean enableStorageConfigBlade() {
+ return this.enableStorageConfigBlade;
+ }
+
+ /**
+ * Set the enableStorageConfigBlade property: Enable SQL IaaS Agent storage configuration blade in Azure Portal.
+ *
+ * @param enableStorageConfigBlade the enableStorageConfigBlade value to set.
+ * @return the StorageConfigurationSettings object itself.
+ */
+ public StorageConfigurationSettings withEnableStorageConfigBlade(Boolean enableStorageConfigBlade) {
+ this.enableStorageConfigBlade = enableStorageConfigBlade;
+ return this;
+ }
+
/**
* Validates the instance.
*
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/WsfcDomainProfile.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/WsfcDomainProfile.java
index aaca04fec65f..cedffa8449b7 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/WsfcDomainProfile.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/WsfcDomainProfile.java
@@ -41,6 +41,12 @@ public final class WsfcDomainProfile {
@JsonProperty(value = "sqlServiceAccount")
private String sqlServiceAccount;
+ /*
+ * The flag to check if SQL service account is GMSA.
+ */
+ @JsonProperty(value = "isSqlServiceAccountGmsa")
+ private Boolean isSqlServiceAccountGmsa;
+
/*
* Optional path for fileshare witness.
*/
@@ -175,6 +181,26 @@ public WsfcDomainProfile withSqlServiceAccount(String sqlServiceAccount) {
return this;
}
+ /**
+ * Get the isSqlServiceAccountGmsa property: The flag to check if SQL service account is GMSA.
+ *
+ * @return the isSqlServiceAccountGmsa value.
+ */
+ public Boolean isSqlServiceAccountGmsa() {
+ return this.isSqlServiceAccountGmsa;
+ }
+
+ /**
+ * Set the isSqlServiceAccountGmsa property: The flag to check if SQL service account is GMSA.
+ *
+ * @param isSqlServiceAccountGmsa the isSqlServiceAccountGmsa value to set.
+ * @return the WsfcDomainProfile object itself.
+ */
+ public WsfcDomainProfile withIsSqlServiceAccountGmsa(Boolean isSqlServiceAccountGmsa) {
+ this.isSqlServiceAccountGmsa = isSqlServiceAccountGmsa;
+ return this;
+ }
+
/**
* Get the fileShareWitnessPath property: Optional path for fileshare witness.
*
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersCreateOrUpdateSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersCreateOrUpdateSamples.java
index 1612dc08a2e9..a2b56b9b3a53 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersCreateOrUpdateSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersCreateOrUpdateSamples.java
@@ -12,7 +12,7 @@
/** Samples for AvailabilityGroupListeners CreateOrUpdate. */
public final class AvailabilityGroupListenersCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateAvailabilityGroupListener.json
*/
/**
* Sample code: Creates or updates an availability group listener using load balancer. This is used for VMs present
@@ -50,7 +50,7 @@ public final class AvailabilityGroupListenersCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json
*/
/**
* Sample code: Creates or updates an availability group listener. This is used for VMs present in multi subnet.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersDeleteSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersDeleteSamples.java
index 0386b96f763c..8179d10e5f62 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersDeleteSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for AvailabilityGroupListeners Delete. */
public final class AvailabilityGroupListenersDeleteSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/DeleteAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/DeleteAvailabilityGroupListener.json
*/
/**
* Sample code: Deletes an availability group listener.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersGetSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersGetSamples.java
index 08a6546d32be..cf4f8f0b5a84 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersGetSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersGetSamples.java
@@ -7,7 +7,7 @@
/** Samples for AvailabilityGroupListeners Get. */
public final class AvailabilityGroupListenersGetSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/GetAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/GetAvailabilityGroupListener.json
*/
/**
* Sample code: Gets an availability group listener.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersListByGroupSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersListByGroupSamples.java
index 7d5ab1b8b118..2b117bd3316d 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersListByGroupSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersListByGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for AvailabilityGroupListeners ListByGroup. */
public final class AvailabilityGroupListenersListByGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListByGroupAvailabilityGroupListener.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListByGroupAvailabilityGroupListener.json
*/
/**
* Sample code: Lists all availability group listeners in a SQL virtual machine group.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationsListSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationsListSamples.java
index eac3683e8a1d..881fc4a11b4f 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationsListSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListOperation.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListOperation.json
*/
/**
* Sample code: Lists all of the available SQL Virtual Machine Rest API operations.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsCreateOrUpdateSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsCreateOrUpdateSamples.java
index a7fb327dbc8f..cd96d27ddea5 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsCreateOrUpdateSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsCreateOrUpdateSamples.java
@@ -13,7 +13,7 @@
/** Samples for SqlVirtualMachineGroups CreateOrUpdate. */
public final class SqlVirtualMachineGroupsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateSqlVirtualMachineGroup.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine group.
@@ -37,6 +37,7 @@ public static void createsOrUpdatesASQLVirtualMachineGroup(
.withClusterBootstrapAccount("testrpadmin")
.withClusterOperatorAccount("testrp@testdomain.com")
.withSqlServiceAccount("sqlservice@testdomain.com")
+ .withIsSqlServiceAccountGmsa(false)
.withStorageAccountUrl("https://storgact.blob.core.windows.net/")
.withStorageAccountPrimaryKey("fakeTokenPlaceholder")
.withClusterSubnetType(ClusterSubnetType.MULTI_SUBNET))
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsDeleteSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsDeleteSamples.java
index fde2911cf752..5fc88986a55e 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsDeleteSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachineGroups Delete. */
public final class SqlVirtualMachineGroupsDeleteSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/DeleteSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/DeleteSqlVirtualMachineGroup.json
*/
/**
* Sample code: Deletes a SQL virtual machine group.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsGetByResourceGroupSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsGetByResourceGroupSamples.java
index 4c9d1253c09d..ef5a8116c739 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsGetByResourceGroupSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachineGroups GetByResourceGroup. */
public final class SqlVirtualMachineGroupsGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/GetSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/GetSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets a SQL virtual machine group.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsListByResourceGroupSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsListByResourceGroupSamples.java
index 0072d9e1b970..0bd3942e147d 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsListByResourceGroupSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachineGroups ListByResourceGroup. */
public final class SqlVirtualMachineGroupsListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListByResourceGroupSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListByResourceGroupSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets all SQL virtual machine groups in a resource group.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsListSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsListSamples.java
index 44cef4fdc654..8083a421240f 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsListSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsListSamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachineGroups List. */
public final class SqlVirtualMachineGroupsListSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListSubscriptionSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListSubscriptionSqlVirtualMachineGroup.json
*/
/**
* Sample code: Gets all SQL virtual machine groups in a subscription.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsUpdateSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsUpdateSamples.java
index 2696397c9289..b4636ceda225 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsUpdateSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsUpdateSamples.java
@@ -11,7 +11,7 @@
/** Samples for SqlVirtualMachineGroups Update. */
public final class SqlVirtualMachineGroupsUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/UpdateSqlVirtualMachineGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/UpdateSqlVirtualMachineGroup.json
*/
/**
* Sample code: Updates a SQL virtual machine group tags.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineTroubleshootTroubleshootSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineTroubleshootTroubleshootSamples.java
index 2437b3bb617a..b575a56447ed 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineTroubleshootTroubleshootSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineTroubleshootTroubleshootSamples.java
@@ -13,7 +13,7 @@
/** Samples for SqlVirtualMachineTroubleshoot Troubleshoot. */
public final class SqlVirtualMachineTroubleshootTroubleshootSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/TroubleshootSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/TroubleshootSqlVirtualMachine.json
*/
/**
* Sample code: Start SQL virtual machine troubleshooting operation.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesCreateOrUpdateSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesCreateOrUpdateSamples.java
index 9f05d413180b..b54b77cb6f72 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesCreateOrUpdateSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesCreateOrUpdateSamples.java
@@ -23,7 +23,6 @@
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;
@@ -38,7 +37,7 @@
/** Samples for SqlVirtualMachines CreateOrUpdate. */
public final class SqlVirtualMachinesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or
@@ -64,7 +63,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples {
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateVirtualMachineWithVMGroup.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateVirtualMachineWithVMGroup.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group.
@@ -90,7 +89,7 @@ public static void createsOrUpdatesASQLVirtualMachineAndJoinsItToASQLVirtualMach
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-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
@@ -109,7 +108,6 @@ public static void createsOrUpdatesASQLVirtualMachineAndJoinsItToASQLVirtualMach
.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()
@@ -155,7 +153,7 @@ public static void createsOrUpdatesASQLVirtualMachineAndJoinsItToASQLVirtualMach
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and
@@ -194,7 +192,7 @@ public static void createsOrUpdatesASQLVirtualMachineAndJoinsItToASQLVirtualMach
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineMAX.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateSqlVirtualMachineMAX.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine with max parameters.
@@ -211,7 +209,6 @@ public static void createsOrUpdatesASQLVirtualMachineWithMaxParameters(
.withVirtualMachineResourceId(
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm")
.withSqlServerLicenseType(SqlServerLicenseType.PAYG)
- .withSqlManagement(SqlManagementMode.FULL)
.withLeastPrivilegeMode(LeastPrivilegeMode.ENABLED)
.withSqlImageSku(SqlImageSku.ENTERPRISE)
.withAutoPatchingSettings(
@@ -264,6 +261,32 @@ public static void createsOrUpdatesASQLVirtualMachineWithMaxParameters(
.withIsIfiEnabled(true))
.withAzureAdAuthenticationSettings(
new AadAuthenticationSettings().withClientId("11111111-2222-3333-4444-555555555555")))
+ .withStorageConfigurationSettings(
+ new StorageConfigurationSettings()
+ .withSqlDataSettings(
+ new SqlStorageSettings()
+ .withLuns(Arrays.asList(0))
+ .withDefaultFilePath("F:\\folderpath\\")
+ .withUseStoragePool(false))
+ .withSqlLogSettings(
+ new SqlStorageSettings()
+ .withLuns(Arrays.asList(1))
+ .withDefaultFilePath("G:\\folderpath\\")
+ .withUseStoragePool(false))
+ .withSqlTempDbSettings(
+ new SqlTempDbSettings()
+ .withDataFileSize(256)
+ .withDataGrowth(512)
+ .withLogFileSize(256)
+ .withLogGrowth(512)
+ .withDataFileCount(8)
+ .withLuns(Arrays.asList(2))
+ .withDefaultFilePath("D:\\TEMP")
+ .withUseStoragePool(false))
+ .withSqlSystemDbOnDataDisk(true)
+ .withDiskConfigurationType(DiskConfigurationType.NEW)
+ .withStorageWorkloadType(StorageWorkloadType.OLTP)
+ .withEnableStorageConfigBlade(true))
.withAssessmentSettings(
new AssessmentSettings()
.withEnable(true)
@@ -279,7 +302,7 @@ public static void createsOrUpdatesASQLVirtualMachineWithMaxParameters(
}
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/CreateOrUpdateSqlVirtualMachineMIN.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/CreateOrUpdateSqlVirtualMachineMIN.json
*/
/**
* Sample code: Creates or updates a SQL virtual machine with min parameters.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesDeleteSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesDeleteSamples.java
index 795496d4f274..f883af223e91 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesDeleteSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesDeleteSamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachines Delete. */
public final class SqlVirtualMachinesDeleteSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/DeleteSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/DeleteSqlVirtualMachine.json
*/
/**
* Sample code: Deletes a SQL virtual machine.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesGetByResourceGroupSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesGetByResourceGroupSamples.java
index f82b94f89d2a..71f46c693336 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesGetByResourceGroupSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesGetByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachines GetByResourceGroup. */
public final class SqlVirtualMachinesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/GetSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/GetSqlVirtualMachine.json
*/
/**
* Sample code: Gets a SQL virtual machine.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListByResourceGroupSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListByResourceGroupSamples.java
index 56b8ca905980..72e3217ef552 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListByResourceGroupSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListByResourceGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachines ListByResourceGroup. */
public final class SqlVirtualMachinesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListByResourceGroupSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListByResourceGroupSqlVirtualMachine.json
*/
/**
* Sample code: Gets all SQL virtual machines in a resource group.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListBySqlVmGroupSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListBySqlVmGroupSamples.java
index 5983914f513e..82bb853ae1e2 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListBySqlVmGroupSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListBySqlVmGroupSamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachines ListBySqlVmGroup. */
public final class SqlVirtualMachinesListBySqlVmGroupSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json
*/
/**
* Sample code: Gets the list of sql virtual machines in a SQL virtual machine group.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListSamples.java
index 9ce584784197..1fb558f8271e 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesListSamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachines List. */
public final class SqlVirtualMachinesListSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/ListSubscriptionSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/ListSubscriptionSqlVirtualMachine.json
*/
/**
* Sample code: Gets all SQL virtual machines in a subscription.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesRedeploySamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesRedeploySamples.java
index c637dda5aa61..ed56cc6b18b4 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesRedeploySamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesRedeploySamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachines Redeploy. */
public final class SqlVirtualMachinesRedeploySamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/RedeploySqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/RedeploySqlVirtualMachine.json
*/
/**
* Sample code: Uninstalls and reinstalls the SQL IaaS Extension.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesStartAssessmentSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesStartAssessmentSamples.java
index 799a4e31544b..eab04e800736 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesStartAssessmentSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesStartAssessmentSamples.java
@@ -7,7 +7,7 @@
/** Samples for SqlVirtualMachines StartAssessment. */
public final class SqlVirtualMachinesStartAssessmentSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/StartAssessmentOnSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/StartAssessmentOnSqlVirtualMachine.json
*/
/**
* Sample code: Starts SQL best practices Assessment on SQL virtual machine.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesUpdateSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesUpdateSamples.java
index c464e7453d11..f1d394ad96f9 100644
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesUpdateSamples.java
+++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesUpdateSamples.java
@@ -11,7 +11,7 @@
/** Samples for SqlVirtualMachines Update. */
public final class SqlVirtualMachinesUpdateSamples {
/*
- * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2022-08-01-preview/examples/UpdateSqlVirtualMachine.json
+ * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2023-01-01-preview/examples/UpdateSqlVirtualMachine.json
*/
/**
* Sample code: Updates a SQL virtual machine tags.
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AadAuthenticationSettingsTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AadAuthenticationSettingsTests.java
deleted file mode 100644
index e59234300455..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AadAuthenticationSettingsTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AadAuthenticationSettings;
-import org.junit.jupiter.api.Assertions;
-
-public final class AadAuthenticationSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AadAuthenticationSettings model =
- BinaryData.fromString("{\"clientId\":\"pfhyhl\"}").toObject(AadAuthenticationSettings.class);
- Assertions.assertEquals("pfhyhl", model.clientId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AadAuthenticationSettings model = new AadAuthenticationSettings().withClientId("pfhyhl");
- model = BinaryData.fromObject(model).toObject(AadAuthenticationSettings.class);
- Assertions.assertEquals("pfhyhl", model.clientId());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AdditionalFeaturesServerConfigurationsTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AdditionalFeaturesServerConfigurationsTests.java
deleted file mode 100644
index a0e47e93385c..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AdditionalFeaturesServerConfigurationsTests.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations;
-import org.junit.jupiter.api.Assertions;
-
-public final class AdditionalFeaturesServerConfigurationsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AdditionalFeaturesServerConfigurations model =
- BinaryData
- .fromString("{\"isRServicesEnabled\":true}")
- .toObject(AdditionalFeaturesServerConfigurations.class);
- Assertions.assertEquals(true, model.isRServicesEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AdditionalFeaturesServerConfigurations model =
- new AdditionalFeaturesServerConfigurations().withIsRServicesEnabled(true);
- model = BinaryData.fromObject(model).toObject(AdditionalFeaturesServerConfigurations.class);
- Assertions.assertEquals(true, model.isRServicesEnabled());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AgConfigurationTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AgConfigurationTests.java
deleted file mode 100644
index ea06922979e0..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AgConfigurationTests.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AgReplica;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Commit;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Failover;
-import com.azure.resourcemanager.sqlvirtualmachine.models.ReadableSecondary;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Role;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AgConfigurationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AgConfiguration model =
- BinaryData
- .fromString(
- "{\"replicas\":[{\"sqlVirtualMachineInstanceId\":\"bcryffdfd\",\"role\":\"SECONDARY\",\"commit\":\"SYNCHRONOUS_COMMIT\",\"failover\":\"MANUAL\",\"readableSecondary\":\"ALL\"}]}")
- .toObject(AgConfiguration.class);
- Assertions.assertEquals("bcryffdfd", model.replicas().get(0).sqlVirtualMachineInstanceId());
- Assertions.assertEquals(Role.SECONDARY, model.replicas().get(0).role());
- Assertions.assertEquals(Commit.SYNCHRONOUS_COMMIT, model.replicas().get(0).commit());
- Assertions.assertEquals(Failover.MANUAL, model.replicas().get(0).failover());
- Assertions.assertEquals(ReadableSecondary.ALL, model.replicas().get(0).readableSecondary());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AgConfiguration model =
- new AgConfiguration()
- .withReplicas(
- Arrays
- .asList(
- new AgReplica()
- .withSqlVirtualMachineInstanceId("bcryffdfd")
- .withRole(Role.SECONDARY)
- .withCommit(Commit.SYNCHRONOUS_COMMIT)
- .withFailover(Failover.MANUAL)
- .withReadableSecondary(ReadableSecondary.ALL)));
- model = BinaryData.fromObject(model).toObject(AgConfiguration.class);
- Assertions.assertEquals("bcryffdfd", model.replicas().get(0).sqlVirtualMachineInstanceId());
- Assertions.assertEquals(Role.SECONDARY, model.replicas().get(0).role());
- Assertions.assertEquals(Commit.SYNCHRONOUS_COMMIT, model.replicas().get(0).commit());
- Assertions.assertEquals(Failover.MANUAL, model.replicas().get(0).failover());
- Assertions.assertEquals(ReadableSecondary.ALL, model.replicas().get(0).readableSecondary());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AgReplicaTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AgReplicaTests.java
deleted file mode 100644
index 3b48a6ed5dfc..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AgReplicaTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AgReplica;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Commit;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Failover;
-import com.azure.resourcemanager.sqlvirtualmachine.models.ReadableSecondary;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Role;
-import org.junit.jupiter.api.Assertions;
-
-public final class AgReplicaTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AgReplica model =
- BinaryData
- .fromString(
- "{\"sqlVirtualMachineInstanceId\":\"akhmsbzjhcrz\",\"role\":\"SECONDARY\",\"commit\":\"ASYNCHRONOUS_COMMIT\",\"failover\":\"AUTOMATIC\",\"readableSecondary\":\"ALL\"}")
- .toObject(AgReplica.class);
- Assertions.assertEquals("akhmsbzjhcrz", model.sqlVirtualMachineInstanceId());
- Assertions.assertEquals(Role.SECONDARY, model.role());
- Assertions.assertEquals(Commit.ASYNCHRONOUS_COMMIT, model.commit());
- Assertions.assertEquals(Failover.AUTOMATIC, model.failover());
- Assertions.assertEquals(ReadableSecondary.ALL, model.readableSecondary());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AgReplica model =
- new AgReplica()
- .withSqlVirtualMachineInstanceId("akhmsbzjhcrz")
- .withRole(Role.SECONDARY)
- .withCommit(Commit.ASYNCHRONOUS_COMMIT)
- .withFailover(Failover.AUTOMATIC)
- .withReadableSecondary(ReadableSecondary.ALL);
- model = BinaryData.fromObject(model).toObject(AgReplica.class);
- Assertions.assertEquals("akhmsbzjhcrz", model.sqlVirtualMachineInstanceId());
- Assertions.assertEquals(Role.SECONDARY, model.role());
- Assertions.assertEquals(Commit.ASYNCHRONOUS_COMMIT, model.commit());
- Assertions.assertEquals(Failover.AUTOMATIC, model.failover());
- Assertions.assertEquals(ReadableSecondary.ALL, model.readableSecondary());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AssessmentSettingsTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AssessmentSettingsTests.java
deleted file mode 100644
index 94a456bad2ad..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AssessmentSettingsTests.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentDayOfWeek;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Schedule;
-import org.junit.jupiter.api.Assertions;
-
-public final class AssessmentSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AssessmentSettings model =
- BinaryData
- .fromString(
- "{\"enable\":true,\"runImmediately\":true,\"schedule\":{\"enable\":false,\"weeklyInterval\":972559338,\"monthlyOccurrence\":364064517,\"dayOfWeek\":\"Saturday\",\"startTime\":\"auu\"}}")
- .toObject(AssessmentSettings.class);
- Assertions.assertEquals(true, model.enable());
- Assertions.assertEquals(true, model.runImmediately());
- Assertions.assertEquals(false, model.schedule().enable());
- Assertions.assertEquals(972559338, model.schedule().weeklyInterval());
- Assertions.assertEquals(364064517, model.schedule().monthlyOccurrence());
- Assertions.assertEquals(AssessmentDayOfWeek.SATURDAY, model.schedule().dayOfWeek());
- Assertions.assertEquals("auu", model.schedule().startTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AssessmentSettings model =
- new AssessmentSettings()
- .withEnable(true)
- .withRunImmediately(true)
- .withSchedule(
- new Schedule()
- .withEnable(false)
- .withWeeklyInterval(972559338)
- .withMonthlyOccurrence(364064517)
- .withDayOfWeek(AssessmentDayOfWeek.SATURDAY)
- .withStartTime("auu"));
- model = BinaryData.fromObject(model).toObject(AssessmentSettings.class);
- Assertions.assertEquals(true, model.enable());
- Assertions.assertEquals(true, model.runImmediately());
- Assertions.assertEquals(false, model.schedule().enable());
- Assertions.assertEquals(972559338, model.schedule().weeklyInterval());
- Assertions.assertEquals(364064517, model.schedule().monthlyOccurrence());
- Assertions.assertEquals(AssessmentDayOfWeek.SATURDAY, model.schedule().dayOfWeek());
- Assertions.assertEquals("auu", model.schedule().startTime());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AutoPatchingSettingsTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AutoPatchingSettingsTests.java
deleted file mode 100644
index bc5062c24bb3..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AutoPatchingSettingsTests.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings;
-import com.azure.resourcemanager.sqlvirtualmachine.models.DayOfWeek;
-import org.junit.jupiter.api.Assertions;
-
-public final class AutoPatchingSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AutoPatchingSettings model =
- BinaryData
- .fromString(
- "{\"enable\":true,\"dayOfWeek\":\"Sunday\",\"maintenanceWindowStartingHour\":1833298254,\"maintenanceWindowDuration\":1813223927}")
- .toObject(AutoPatchingSettings.class);
- Assertions.assertEquals(true, model.enable());
- Assertions.assertEquals(DayOfWeek.SUNDAY, model.dayOfWeek());
- Assertions.assertEquals(1833298254, model.maintenanceWindowStartingHour());
- Assertions.assertEquals(1813223927, model.maintenanceWindowDuration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AutoPatchingSettings model =
- new AutoPatchingSettings()
- .withEnable(true)
- .withDayOfWeek(DayOfWeek.SUNDAY)
- .withMaintenanceWindowStartingHour(1833298254)
- .withMaintenanceWindowDuration(1813223927);
- model = BinaryData.fromObject(model).toObject(AutoPatchingSettings.class);
- Assertions.assertEquals(true, model.enable());
- Assertions.assertEquals(DayOfWeek.SUNDAY, model.dayOfWeek());
- Assertions.assertEquals(1833298254, model.maintenanceWindowStartingHour());
- Assertions.assertEquals(1813223927, model.maintenanceWindowDuration());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenerInnerTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenerInnerTests.java
deleted file mode 100644
index 2bd52983271b..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenerInnerTests.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerInner;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration;
-import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
-import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AvailabilityGroupListenerInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailabilityGroupListenerInner model =
- BinaryData
- .fromString(
- "{\"properties\":{\"provisioningState\":\"hq\",\"availabilityGroupName\":\"gjxpybczmehmt\",\"loadBalancerConfigurations\":[{\"publicIpAddressResourceId\":\"phrupidgsybbejhp\",\"loadBalancerResourceId\":\"ycm\",\"probePort\":501010271,\"sqlVirtualMachineInstances\":[]},{\"publicIpAddressResourceId\":\"dxbmtqioq\",\"loadBalancerResourceId\":\"ehtbm\",\"probePort\":261903418,\"sqlVirtualMachineInstances\":[]},{\"publicIpAddressResourceId\":\"oizh\",\"loadBalancerResourceId\":\"rxybqsoq\",\"probePort\":1262663343,\"sqlVirtualMachineInstances\":[]}],\"multiSubnetIpConfigurations\":[{\"sqlVirtualMachineInstance\":\"bpazlobcufpdzn\"},{\"sqlVirtualMachineInstance\":\"btcqq\"},{\"sqlVirtualMachineInstance\":\"nq\"},{\"sqlVirtualMachineInstance\":\"lhqgnufooojy\"}],\"createDefaultAvailabilityGroupIfNotExist\":true,\"port\":609105572,\"availabilityGroupConfiguration\":{\"replicas\":[]}},\"id\":\"gdf\",\"name\":\"glzlhjxrifkwmrv\",\"type\":\"tsizntocipaoua\"}")
- .toObject(AvailabilityGroupListenerInner.class);
- Assertions.assertEquals("gjxpybczmehmt", model.availabilityGroupName());
- Assertions
- .assertEquals("phrupidgsybbejhp", model.loadBalancerConfigurations().get(0).publicIpAddressResourceId());
- Assertions.assertEquals("ycm", model.loadBalancerConfigurations().get(0).loadBalancerResourceId());
- Assertions.assertEquals(501010271, model.loadBalancerConfigurations().get(0).probePort());
- Assertions
- .assertEquals("bpazlobcufpdzn", model.multiSubnetIpConfigurations().get(0).sqlVirtualMachineInstance());
- Assertions.assertEquals(true, model.createDefaultAvailabilityGroupIfNotExist());
- Assertions.assertEquals(609105572, model.port());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailabilityGroupListenerInner model =
- new AvailabilityGroupListenerInner()
- .withAvailabilityGroupName("gjxpybczmehmt")
- .withLoadBalancerConfigurations(
- Arrays
- .asList(
- new LoadBalancerConfiguration()
- .withPublicIpAddressResourceId("phrupidgsybbejhp")
- .withLoadBalancerResourceId("ycm")
- .withProbePort(501010271)
- .withSqlVirtualMachineInstances(Arrays.asList()),
- new LoadBalancerConfiguration()
- .withPublicIpAddressResourceId("dxbmtqioq")
- .withLoadBalancerResourceId("ehtbm")
- .withProbePort(261903418)
- .withSqlVirtualMachineInstances(Arrays.asList()),
- new LoadBalancerConfiguration()
- .withPublicIpAddressResourceId("oizh")
- .withLoadBalancerResourceId("rxybqsoq")
- .withProbePort(1262663343)
- .withSqlVirtualMachineInstances(Arrays.asList())))
- .withMultiSubnetIpConfigurations(
- Arrays
- .asList(
- new MultiSubnetIpConfiguration().withSqlVirtualMachineInstance("bpazlobcufpdzn"),
- new MultiSubnetIpConfiguration().withSqlVirtualMachineInstance("btcqq"),
- new MultiSubnetIpConfiguration().withSqlVirtualMachineInstance("nq"),
- new MultiSubnetIpConfiguration().withSqlVirtualMachineInstance("lhqgnufooojy")))
- .withCreateDefaultAvailabilityGroupIfNotExist(true)
- .withPort(609105572)
- .withAvailabilityGroupConfiguration(new AgConfiguration().withReplicas(Arrays.asList()));
- model = BinaryData.fromObject(model).toObject(AvailabilityGroupListenerInner.class);
- Assertions.assertEquals("gjxpybczmehmt", model.availabilityGroupName());
- Assertions
- .assertEquals("phrupidgsybbejhp", model.loadBalancerConfigurations().get(0).publicIpAddressResourceId());
- Assertions.assertEquals("ycm", model.loadBalancerConfigurations().get(0).loadBalancerResourceId());
- Assertions.assertEquals(501010271, model.loadBalancerConfigurations().get(0).probePort());
- Assertions
- .assertEquals("bpazlobcufpdzn", model.multiSubnetIpConfigurations().get(0).sqlVirtualMachineInstance());
- Assertions.assertEquals(true, model.createDefaultAvailabilityGroupIfNotExist());
- Assertions.assertEquals(609105572, model.port());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenerListResultTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenerListResultTests.java
deleted file mode 100644
index 7fcb7348006a..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenerListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListenerListResult;
-
-public final class AvailabilityGroupListenerListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailabilityGroupListenerListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"trg\",\"availabilityGroupName\":\"bpf\",\"loadBalancerConfigurations\":[],\"multiSubnetIpConfigurations\":[],\"createDefaultAvailabilityGroupIfNotExist\":false,\"port\":1078970203},\"id\":\"cjrwzoxxjtfellu\",\"name\":\"fziton\",\"type\":\"eqfpj\"}],\"nextLink\":\"lxofpdvhpfxxypin\"}")
- .toObject(AvailabilityGroupListenerListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailabilityGroupListenerListResult model = new AvailabilityGroupListenerListResult();
- model = BinaryData.fromObject(model).toObject(AvailabilityGroupListenerListResult.class);
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenerPropertiesTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenerPropertiesTests.java
deleted file mode 100644
index 5cfac445358f..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenerPropertiesTests.java
+++ /dev/null
@@ -1,143 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerProperties;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AgReplica;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Commit;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Failover;
-import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
-import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration;
-import com.azure.resourcemanager.sqlvirtualmachine.models.PrivateIpAddress;
-import com.azure.resourcemanager.sqlvirtualmachine.models.ReadableSecondary;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Role;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class AvailabilityGroupListenerPropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailabilityGroupListenerProperties model =
- BinaryData
- .fromString(
- "{\"provisioningState\":\"s\",\"availabilityGroupName\":\"cmpoyfdkfogkny\",\"loadBalancerConfigurations\":[{\"privateIpAddress\":{\"ipAddress\":\"ddeqsrdeupewnwre\",\"subnetResourceId\":\"jzyflu\"},\"publicIpAddressResourceId\":\"rh\",\"loadBalancerResourceId\":\"fcqhsmyurkd\",\"probePort\":337855308,\"sqlVirtualMachineInstances\":[\"ekuksjtx\"]},{\"privateIpAddress\":{\"ipAddress\":\"dmpa\",\"subnetResourceId\":\"ryuanzwuxzdxtay\"},\"publicIpAddressResourceId\":\"hmwhfpmrqo\",\"loadBalancerResourceId\":\"tu\",\"probePort\":1941399376,\"sqlVirtualMachineInstances\":[\"rtihfxtijbpz\",\"gnwzsymglzufc\"]}],\"multiSubnetIpConfigurations\":[{\"privateIpAddress\":{\"ipAddress\":\"hdbihan\",\"subnetResourceId\":\"hfcbjysa\"},\"sqlVirtualMachineInstance\":\"ithxqhabifpi\"},{\"privateIpAddress\":{\"ipAddress\":\"wczbys\",\"subnetResourceId\":\"pqxu\"},\"sqlVirtualMachineInstance\":\"ivyqniwbybrkxvd\"}],\"createDefaultAvailabilityGroupIfNotExist\":true,\"port\":850212440,\"availabilityGroupConfiguration\":{\"replicas\":[{\"sqlVirtualMachineInstanceId\":\"ukxgaud\",\"role\":\"SECONDARY\",\"commit\":\"SYNCHRONOUS_COMMIT\",\"failover\":\"AUTOMATIC\",\"readableSecondary\":\"NO\"},{\"sqlVirtualMachineInstanceId\":\"ejhkry\",\"role\":\"SECONDARY\",\"commit\":\"SYNCHRONOUS_COMMIT\",\"failover\":\"AUTOMATIC\",\"readableSecondary\":\"NO\"}]}}")
- .toObject(AvailabilityGroupListenerProperties.class);
- Assertions.assertEquals("cmpoyfdkfogkny", model.availabilityGroupName());
- Assertions
- .assertEquals("ddeqsrdeupewnwre", model.loadBalancerConfigurations().get(0).privateIpAddress().ipAddress());
- Assertions
- .assertEquals("jzyflu", model.loadBalancerConfigurations().get(0).privateIpAddress().subnetResourceId());
- Assertions.assertEquals("rh", model.loadBalancerConfigurations().get(0).publicIpAddressResourceId());
- Assertions.assertEquals("fcqhsmyurkd", model.loadBalancerConfigurations().get(0).loadBalancerResourceId());
- Assertions.assertEquals(337855308, model.loadBalancerConfigurations().get(0).probePort());
- Assertions
- .assertEquals("ekuksjtx", model.loadBalancerConfigurations().get(0).sqlVirtualMachineInstances().get(0));
- Assertions.assertEquals("hdbihan", model.multiSubnetIpConfigurations().get(0).privateIpAddress().ipAddress());
- Assertions
- .assertEquals("hfcbjysa", model.multiSubnetIpConfigurations().get(0).privateIpAddress().subnetResourceId());
- Assertions.assertEquals("ithxqhabifpi", model.multiSubnetIpConfigurations().get(0).sqlVirtualMachineInstance());
- Assertions.assertEquals(true, model.createDefaultAvailabilityGroupIfNotExist());
- Assertions.assertEquals(850212440, model.port());
- Assertions
- .assertEquals(
- "ukxgaud", model.availabilityGroupConfiguration().replicas().get(0).sqlVirtualMachineInstanceId());
- Assertions.assertEquals(Role.SECONDARY, model.availabilityGroupConfiguration().replicas().get(0).role());
- Assertions
- .assertEquals(Commit.SYNCHRONOUS_COMMIT, model.availabilityGroupConfiguration().replicas().get(0).commit());
- Assertions
- .assertEquals(Failover.AUTOMATIC, model.availabilityGroupConfiguration().replicas().get(0).failover());
- Assertions
- .assertEquals(
- ReadableSecondary.NO, model.availabilityGroupConfiguration().replicas().get(0).readableSecondary());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailabilityGroupListenerProperties model =
- new AvailabilityGroupListenerProperties()
- .withAvailabilityGroupName("cmpoyfdkfogkny")
- .withLoadBalancerConfigurations(
- Arrays
- .asList(
- new LoadBalancerConfiguration()
- .withPrivateIpAddress(
- new PrivateIpAddress()
- .withIpAddress("ddeqsrdeupewnwre")
- .withSubnetResourceId("jzyflu"))
- .withPublicIpAddressResourceId("rh")
- .withLoadBalancerResourceId("fcqhsmyurkd")
- .withProbePort(337855308)
- .withSqlVirtualMachineInstances(Arrays.asList("ekuksjtx")),
- new LoadBalancerConfiguration()
- .withPrivateIpAddress(
- new PrivateIpAddress()
- .withIpAddress("dmpa")
- .withSubnetResourceId("ryuanzwuxzdxtay"))
- .withPublicIpAddressResourceId("hmwhfpmrqo")
- .withLoadBalancerResourceId("tu")
- .withProbePort(1941399376)
- .withSqlVirtualMachineInstances(Arrays.asList("rtihfxtijbpz", "gnwzsymglzufc"))))
- .withMultiSubnetIpConfigurations(
- Arrays
- .asList(
- new MultiSubnetIpConfiguration()
- .withPrivateIpAddress(
- new PrivateIpAddress().withIpAddress("hdbihan").withSubnetResourceId("hfcbjysa"))
- .withSqlVirtualMachineInstance("ithxqhabifpi"),
- new MultiSubnetIpConfiguration()
- .withPrivateIpAddress(
- new PrivateIpAddress().withIpAddress("wczbys").withSubnetResourceId("pqxu"))
- .withSqlVirtualMachineInstance("ivyqniwbybrkxvd")))
- .withCreateDefaultAvailabilityGroupIfNotExist(true)
- .withPort(850212440)
- .withAvailabilityGroupConfiguration(
- new AgConfiguration()
- .withReplicas(
- Arrays
- .asList(
- new AgReplica()
- .withSqlVirtualMachineInstanceId("ukxgaud")
- .withRole(Role.SECONDARY)
- .withCommit(Commit.SYNCHRONOUS_COMMIT)
- .withFailover(Failover.AUTOMATIC)
- .withReadableSecondary(ReadableSecondary.NO),
- new AgReplica()
- .withSqlVirtualMachineInstanceId("ejhkry")
- .withRole(Role.SECONDARY)
- .withCommit(Commit.SYNCHRONOUS_COMMIT)
- .withFailover(Failover.AUTOMATIC)
- .withReadableSecondary(ReadableSecondary.NO))));
- model = BinaryData.fromObject(model).toObject(AvailabilityGroupListenerProperties.class);
- Assertions.assertEquals("cmpoyfdkfogkny", model.availabilityGroupName());
- Assertions
- .assertEquals("ddeqsrdeupewnwre", model.loadBalancerConfigurations().get(0).privateIpAddress().ipAddress());
- Assertions
- .assertEquals("jzyflu", model.loadBalancerConfigurations().get(0).privateIpAddress().subnetResourceId());
- Assertions.assertEquals("rh", model.loadBalancerConfigurations().get(0).publicIpAddressResourceId());
- Assertions.assertEquals("fcqhsmyurkd", model.loadBalancerConfigurations().get(0).loadBalancerResourceId());
- Assertions.assertEquals(337855308, model.loadBalancerConfigurations().get(0).probePort());
- Assertions
- .assertEquals("ekuksjtx", model.loadBalancerConfigurations().get(0).sqlVirtualMachineInstances().get(0));
- Assertions.assertEquals("hdbihan", model.multiSubnetIpConfigurations().get(0).privateIpAddress().ipAddress());
- Assertions
- .assertEquals("hfcbjysa", model.multiSubnetIpConfigurations().get(0).privateIpAddress().subnetResourceId());
- Assertions.assertEquals("ithxqhabifpi", model.multiSubnetIpConfigurations().get(0).sqlVirtualMachineInstance());
- Assertions.assertEquals(true, model.createDefaultAvailabilityGroupIfNotExist());
- Assertions.assertEquals(850212440, model.port());
- Assertions
- .assertEquals(
- "ukxgaud", model.availabilityGroupConfiguration().replicas().get(0).sqlVirtualMachineInstanceId());
- Assertions.assertEquals(Role.SECONDARY, model.availabilityGroupConfiguration().replicas().get(0).role());
- Assertions
- .assertEquals(Commit.SYNCHRONOUS_COMMIT, model.availabilityGroupConfiguration().replicas().get(0).commit());
- Assertions
- .assertEquals(Failover.AUTOMATIC, model.availabilityGroupConfiguration().replicas().get(0).failover());
- Assertions
- .assertEquals(
- ReadableSecondary.NO, model.availabilityGroupConfiguration().replicas().get(0).readableSecondary());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersCreateOrUpdateMockTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersCreateOrUpdateMockTests.java
deleted file mode 100644
index 83af32b1ce56..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersCreateOrUpdateMockTests.java
+++ /dev/null
@@ -1,81 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AvailabilityGroupListenersCreateOrUpdateMockTests {
- @Test
- public void testCreateOrUpdate() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"Succeeded\",\"availabilityGroupName\":\"ihkaetcktvfc\",\"loadBalancerConfigurations\":[],\"multiSubnetIpConfigurations\":[],\"createDefaultAvailabilityGroupIfNotExist\":true,\"port\":5394429,\"availabilityGroupConfiguration\":{\"replicas\":[]}},\"id\":\"hjfbebrjcxe\",\"name\":\"fuwutttxf\",\"type\":\"jrbirphxepcyv\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SqlVirtualMachineManager manager =
- SqlVirtualMachineManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AvailabilityGroupListener response =
- manager
- .availabilityGroupListeners()
- .define("heun")
- .withExistingSqlVirtualMachineGroup("qnwvlrya", "w")
- .withAvailabilityGroupName("oklyaxuconuq")
- .withLoadBalancerConfigurations(Arrays.asList())
- .withMultiSubnetIpConfigurations(Arrays.asList())
- .withCreateDefaultAvailabilityGroupIfNotExist(true)
- .withPort(1413337127)
- .withAvailabilityGroupConfiguration(new AgConfiguration().withReplicas(Arrays.asList()))
- .create();
-
- Assertions.assertEquals("ihkaetcktvfc", response.availabilityGroupName());
- Assertions.assertEquals(true, response.createDefaultAvailabilityGroupIfNotExist());
- Assertions.assertEquals(5394429, response.port());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersDeleteMockTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersDeleteMockTests.java
deleted file mode 100644
index b94662c32410..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersDeleteMockTests.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AvailabilityGroupListenersDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SqlVirtualMachineManager manager =
- SqlVirtualMachineManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager
- .availabilityGroupListeners()
- .delete("dpydn", "yhxdeoejzicwi", "sjttgzfbish", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersGetWithResponseMockTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersGetWithResponseMockTests.java
deleted file mode 100644
index b234f644fc51..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersGetWithResponseMockTests.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AvailabilityGroupListenersGetWithResponseMockTests {
- @Test
- public void testGetWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"properties\":{\"provisioningState\":\"jnspydp\",\"availabilityGroupName\":\"oenkouknvudwti\",\"loadBalancerConfigurations\":[],\"multiSubnetIpConfigurations\":[],\"createDefaultAvailabilityGroupIfNotExist\":true,\"port\":1223607421,\"availabilityGroupConfiguration\":{\"replicas\":[]}},\"id\":\"pazyxoegukg\",\"name\":\"npiucgygevqznty\",\"type\":\"mrbpizcdrqj\"}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SqlVirtualMachineManager manager =
- SqlVirtualMachineManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- AvailabilityGroupListener response =
- manager
- .availabilityGroupListeners()
- .getWithResponse(
- "fmvfaxkffeiit", "lvmezyvshxmzsbbz", "ggi", "rxwburv", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("oenkouknvudwti", response.availabilityGroupName());
- Assertions.assertEquals(true, response.createDefaultAvailabilityGroupIfNotExist());
- Assertions.assertEquals(1223607421, response.port());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersListByGroupMockTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersListByGroupMockTests.java
deleted file mode 100644
index fbd244dc6f74..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/AvailabilityGroupListenersListByGroupMockTests.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class AvailabilityGroupListenersListByGroupMockTests {
- @Test
- public void testListByGroup() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"properties\":{\"provisioningState\":\"pbuxwgipwhon\",\"availabilityGroupName\":\"kgshwa\",\"loadBalancerConfigurations\":[],\"multiSubnetIpConfigurations\":[],\"createDefaultAvailabilityGroupIfNotExist\":false,\"port\":624724935,\"availabilityGroupConfiguration\":{\"replicas\":[]}},\"id\":\"ttmrywnuzoqf\",\"name\":\"iyqzrnk\",\"type\":\"qvyxlwhzlsicoho\"}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SqlVirtualMachineManager manager =
- SqlVirtualMachineManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response =
- manager.availabilityGroupListeners().listByGroup("bkh", "jdeyeamdpha", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("kgshwa", response.iterator().next().availabilityGroupName());
- Assertions.assertEquals(false, response.iterator().next().createDefaultAvailabilityGroupIfNotExist());
- Assertions.assertEquals(624724935, response.iterator().next().port());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/LoadBalancerConfigurationTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/LoadBalancerConfigurationTests.java
deleted file mode 100644
index 7471e38cf84e..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/LoadBalancerConfigurationTests.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration;
-import com.azure.resourcemanager.sqlvirtualmachine.models.PrivateIpAddress;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class LoadBalancerConfigurationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- LoadBalancerConfiguration model =
- BinaryData
- .fromString(
- "{\"privateIpAddress\":{\"ipAddress\":\"jye\",\"subnetResourceId\":\"kvnipjoxz\"},\"publicIpAddressResourceId\":\"chgejspodm\",\"loadBalancerResourceId\":\"lzydehojwyahux\",\"probePort\":1511051439,\"sqlVirtualMachineInstances\":[\"njaqwixjspro\",\"vcputegj\"]}")
- .toObject(LoadBalancerConfiguration.class);
- Assertions.assertEquals("jye", model.privateIpAddress().ipAddress());
- Assertions.assertEquals("kvnipjoxz", model.privateIpAddress().subnetResourceId());
- Assertions.assertEquals("chgejspodm", model.publicIpAddressResourceId());
- Assertions.assertEquals("lzydehojwyahux", model.loadBalancerResourceId());
- Assertions.assertEquals(1511051439, model.probePort());
- Assertions.assertEquals("njaqwixjspro", model.sqlVirtualMachineInstances().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- LoadBalancerConfiguration model =
- new LoadBalancerConfiguration()
- .withPrivateIpAddress(new PrivateIpAddress().withIpAddress("jye").withSubnetResourceId("kvnipjoxz"))
- .withPublicIpAddressResourceId("chgejspodm")
- .withLoadBalancerResourceId("lzydehojwyahux")
- .withProbePort(1511051439)
- .withSqlVirtualMachineInstances(Arrays.asList("njaqwixjspro", "vcputegj"));
- model = BinaryData.fromObject(model).toObject(LoadBalancerConfiguration.class);
- Assertions.assertEquals("jye", model.privateIpAddress().ipAddress());
- Assertions.assertEquals("kvnipjoxz", model.privateIpAddress().subnetResourceId());
- Assertions.assertEquals("chgejspodm", model.publicIpAddressResourceId());
- Assertions.assertEquals("lzydehojwyahux", model.loadBalancerResourceId());
- Assertions.assertEquals(1511051439, model.probePort());
- Assertions.assertEquals("njaqwixjspro", model.sqlVirtualMachineInstances().get(0));
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/MultiSubnetIpConfigurationTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/MultiSubnetIpConfigurationTests.java
deleted file mode 100644
index fd9ca891c31d..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/MultiSubnetIpConfigurationTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration;
-import com.azure.resourcemanager.sqlvirtualmachine.models.PrivateIpAddress;
-import org.junit.jupiter.api.Assertions;
-
-public final class MultiSubnetIpConfigurationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- MultiSubnetIpConfiguration model =
- BinaryData
- .fromString(
- "{\"privateIpAddress\":{\"ipAddress\":\"djpslw\",\"subnetResourceId\":\"dpvwryoqpsoaccta\"},\"sqlVirtualMachineInstance\":\"akl\"}")
- .toObject(MultiSubnetIpConfiguration.class);
- Assertions.assertEquals("djpslw", model.privateIpAddress().ipAddress());
- Assertions.assertEquals("dpvwryoqpsoaccta", model.privateIpAddress().subnetResourceId());
- Assertions.assertEquals("akl", model.sqlVirtualMachineInstance());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- MultiSubnetIpConfiguration model =
- new MultiSubnetIpConfiguration()
- .withPrivateIpAddress(
- new PrivateIpAddress().withIpAddress("djpslw").withSubnetResourceId("dpvwryoqpsoaccta"))
- .withSqlVirtualMachineInstance("akl");
- model = BinaryData.fromObject(model).toObject(MultiSubnetIpConfiguration.class);
- Assertions.assertEquals("djpslw", model.privateIpAddress().ipAddress());
- Assertions.assertEquals("dpvwryoqpsoaccta", model.privateIpAddress().subnetResourceId());
- Assertions.assertEquals("akl", model.sqlVirtualMachineInstance());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationDisplayTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationDisplayTests.java
deleted file mode 100644
index a78b2790157d..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationDisplayTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.OperationDisplay;
-
-public final class OperationDisplayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationDisplay model =
- BinaryData
- .fromString(
- "{\"provider\":\"dosvqwhbmdgbbjf\",\"resource\":\"gmbmbexppbh\",\"operation\":\"qrolfpf\",\"description\":\"algbquxigjyjg\"}")
- .toObject(OperationDisplay.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationDisplay model = new OperationDisplay();
- model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationInnerTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationInnerTests.java
deleted file mode 100644
index 5f085d7b9891..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationInnerTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.OperationInner;
-
-public final class OperationInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationInner model =
- BinaryData
- .fromString(
- "{\"name\":\"yb\",\"display\":{\"provider\":\"e\",\"resource\":\"ytb\",\"operation\":\"qfou\",\"description\":\"mmnkzsmodmgl\"},\"origin\":\"system\",\"properties\":{\"cuertu\":\"datakwtmutduqktapspw\"}}")
- .toObject(OperationInner.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationInner model = new OperationInner();
- model = BinaryData.fromObject(model).toObject(OperationInner.class);
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationListResultTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationListResultTests.java
deleted file mode 100644
index 8fbe1f0fbfce..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.OperationListResult;
-
-public final class OperationListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"name\":\"yhuybbkpod\",\"display\":{\"provider\":\"oginuvamiheognar\",\"resource\":\"xth\",\"operation\":\"tusivyevcciqihn\",\"description\":\"ngbwjz\"},\"origin\":\"system\",\"properties\":{\"ljofxqeofjaeqjh\":\"dataxgispemvtzfkufu\"}},{\"name\":\"b\",\"display\":{\"provider\":\"msmjqulngsntn\",\"resource\":\"bkzgcwrwclx\",\"operation\":\"rljdouskcqv\",\"description\":\"cr\"},\"origin\":\"user\",\"properties\":{\"biksq\":\"datatnhxbn\",\"ainqpjwnzlljfm\":\"datagls\",\"vmgxsab\":\"datapee\",\"jczdzevndh\":\"datayqduujit\"}},{\"name\":\"wpdappdsbdkv\",\"display\":{\"provider\":\"jfeusnh\",\"resource\":\"je\",\"operation\":\"mrldhu\",\"description\":\"zzd\"},\"origin\":\"system\",\"properties\":{\"geablgphuticndvk\":\"dataoc\",\"ftyxolniw\":\"dataozwyiftyhxhuro\"}},{\"name\":\"cukjf\",\"display\":{\"provider\":\"awxklr\",\"resource\":\"lwckbasyypnddhs\",\"operation\":\"bacphejko\",\"description\":\"nqgoulzndli\"},\"origin\":\"user\",\"properties\":{\"dgak\":\"datagfgibm\"}}],\"nextLink\":\"s\"}")
- .toObject(OperationListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationListResult model = new OperationListResult();
- model = BinaryData.fromObject(model).toObject(OperationListResult.class);
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationsListMockTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationsListMockTests.java
deleted file mode 100644
index 9e62559cf960..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/OperationsListMockTests.java
+++ /dev/null
@@ -1,64 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.rest.PagedIterable;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Operation;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class OperationsListMockTests {
- @Test
- public void testList() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr =
- "{\"value\":[{\"name\":\"fnljky\",\"display\":{\"provider\":\"vuujq\",\"resource\":\"dokgjl\",\"operation\":\"oxgvclt\",\"description\":\"sncghkjeszz\"},\"origin\":\"user\",\"properties\":{\"fsm\":\"datatxfvgx\",\"odebfqkkrbmpu\":\"datanehmpvecx\",\"wflzlfbxzpuzy\":\"datagr\",\"y\":\"dataispnqzahmgkbrp\"}}]}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SqlVirtualMachineManager manager =
- SqlVirtualMachineManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/PrivateIpAddressTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/PrivateIpAddressTests.java
deleted file mode 100644
index f9c35082ef0d..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/PrivateIpAddressTests.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.PrivateIpAddress;
-import org.junit.jupiter.api.Assertions;
-
-public final class PrivateIpAddressTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PrivateIpAddress model =
- BinaryData
- .fromString("{\"ipAddress\":\"mfdatscmdvpj\",\"subnetResourceId\":\"lsuuvmkjozkrwfnd\"}")
- .toObject(PrivateIpAddress.class);
- Assertions.assertEquals("mfdatscmdvpj", model.ipAddress());
- Assertions.assertEquals("lsuuvmkjozkrwfnd", model.subnetResourceId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PrivateIpAddress model =
- new PrivateIpAddress().withIpAddress("mfdatscmdvpj").withSubnetResourceId("lsuuvmkjozkrwfnd");
- model = BinaryData.fromObject(model).toObject(PrivateIpAddress.class);
- Assertions.assertEquals("mfdatscmdvpj", model.ipAddress());
- Assertions.assertEquals("lsuuvmkjozkrwfnd", model.subnetResourceId());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/ResourceIdentityTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/ResourceIdentityTests.java
deleted file mode 100644
index 141ccf5aed76..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/ResourceIdentityTests.java
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.IdentityType;
-import com.azure.resourcemanager.sqlvirtualmachine.models.ResourceIdentity;
-import org.junit.jupiter.api.Assertions;
-
-public final class ResourceIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ResourceIdentity model =
- BinaryData
- .fromString(
- "{\"principalId\":\"69302b8f-5663-4c3b-932a-ee7af2f94b9f\",\"type\":\"None\",\"tenantId\":\"570ff5b7-a1c1-4e0b-809d-2547824d6276\"}")
- .toObject(ResourceIdentity.class);
- Assertions.assertEquals(IdentityType.NONE, model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ResourceIdentity model = new ResourceIdentity().withType(IdentityType.NONE);
- model = BinaryData.fromObject(model).toObject(ResourceIdentity.class);
- Assertions.assertEquals(IdentityType.NONE, model.type());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/ScheduleTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/ScheduleTests.java
deleted file mode 100644
index 1198168387f4..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/ScheduleTests.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentDayOfWeek;
-import com.azure.resourcemanager.sqlvirtualmachine.models.Schedule;
-import org.junit.jupiter.api.Assertions;
-
-public final class ScheduleTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Schedule model =
- BinaryData
- .fromString(
- "{\"enable\":false,\"weeklyInterval\":981074224,\"monthlyOccurrence\":586679230,\"dayOfWeek\":\"Wednesday\",\"startTime\":\"ugidyjrr\"}")
- .toObject(Schedule.class);
- Assertions.assertEquals(false, model.enable());
- Assertions.assertEquals(981074224, model.weeklyInterval());
- Assertions.assertEquals(586679230, model.monthlyOccurrence());
- Assertions.assertEquals(AssessmentDayOfWeek.WEDNESDAY, model.dayOfWeek());
- Assertions.assertEquals("ugidyjrr", model.startTime());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Schedule model =
- new Schedule()
- .withEnable(false)
- .withWeeklyInterval(981074224)
- .withMonthlyOccurrence(586679230)
- .withDayOfWeek(AssessmentDayOfWeek.WEDNESDAY)
- .withStartTime("ugidyjrr");
- model = BinaryData.fromObject(model).toObject(Schedule.class);
- Assertions.assertEquals(false, model.enable());
- Assertions.assertEquals(981074224, model.weeklyInterval());
- Assertions.assertEquals(586679230, model.monthlyOccurrence());
- Assertions.assertEquals(AssessmentDayOfWeek.WEDNESDAY, model.dayOfWeek());
- Assertions.assertEquals("ugidyjrr", model.startTime());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlInstanceSettingsTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlInstanceSettingsTests.java
deleted file mode 100644
index e0d40027aab0..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlInstanceSettingsTests.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.SqlInstanceSettings;
-import org.junit.jupiter.api.Assertions;
-
-public final class SqlInstanceSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SqlInstanceSettings model =
- BinaryData
- .fromString(
- "{\"collation\":\"sqpjhvmdajvn\",\"maxDop\":179610144,\"isOptimizeForAdHocWorkloadsEnabled\":true,\"minServerMemoryMB\":104525492,\"maxServerMemoryMB\":97546857,\"isLpimEnabled\":true,\"isIfiEnabled\":true}")
- .toObject(SqlInstanceSettings.class);
- Assertions.assertEquals("sqpjhvmdajvn", model.collation());
- Assertions.assertEquals(179610144, model.maxDop());
- Assertions.assertEquals(true, model.isOptimizeForAdHocWorkloadsEnabled());
- Assertions.assertEquals(104525492, model.minServerMemoryMB());
- Assertions.assertEquals(97546857, model.maxServerMemoryMB());
- Assertions.assertEquals(true, model.isLpimEnabled());
- Assertions.assertEquals(true, model.isIfiEnabled());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SqlInstanceSettings model =
- new SqlInstanceSettings()
- .withCollation("sqpjhvmdajvn")
- .withMaxDop(179610144)
- .withIsOptimizeForAdHocWorkloadsEnabled(true)
- .withMinServerMemoryMB(104525492)
- .withMaxServerMemoryMB(97546857)
- .withIsLpimEnabled(true)
- .withIsIfiEnabled(true);
- model = BinaryData.fromObject(model).toObject(SqlInstanceSettings.class);
- Assertions.assertEquals("sqpjhvmdajvn", model.collation());
- Assertions.assertEquals(179610144, model.maxDop());
- Assertions.assertEquals(true, model.isOptimizeForAdHocWorkloadsEnabled());
- Assertions.assertEquals(104525492, model.minServerMemoryMB());
- Assertions.assertEquals(97546857, model.maxServerMemoryMB());
- Assertions.assertEquals(true, model.isLpimEnabled());
- Assertions.assertEquals(true, model.isIfiEnabled());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlStorageSettingsTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlStorageSettingsTests.java
deleted file mode 100644
index 1f2d47f8773b..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlStorageSettingsTests.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.SqlStorageSettings;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class SqlStorageSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SqlStorageSettings model =
- BinaryData
- .fromString("{\"luns\":[186143874,2120884016],\"defaultFilePath\":\"qn\"}")
- .toObject(SqlStorageSettings.class);
- Assertions.assertEquals(186143874, model.luns().get(0));
- Assertions.assertEquals("qn", model.defaultFilePath());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SqlStorageSettings model =
- new SqlStorageSettings().withLuns(Arrays.asList(186143874, 2120884016)).withDefaultFilePath("qn");
- model = BinaryData.fromObject(model).toObject(SqlStorageSettings.class);
- Assertions.assertEquals(186143874, model.luns().get(0));
- Assertions.assertEquals("qn", model.defaultFilePath());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlStorageUpdateSettingsTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlStorageUpdateSettingsTests.java
deleted file mode 100644
index 694240c2664a..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlStorageUpdateSettingsTests.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.DiskConfigurationType;
-import com.azure.resourcemanager.sqlvirtualmachine.models.SqlStorageUpdateSettings;
-import org.junit.jupiter.api.Assertions;
-
-public final class SqlStorageUpdateSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SqlStorageUpdateSettings model =
- BinaryData
- .fromString(
- "{\"diskCount\":738552235,\"startingDeviceId\":1698610201,\"diskConfigurationType\":\"EXTEND\"}")
- .toObject(SqlStorageUpdateSettings.class);
- Assertions.assertEquals(738552235, model.diskCount());
- Assertions.assertEquals(1698610201, model.startingDeviceId());
- Assertions.assertEquals(DiskConfigurationType.EXTEND, model.diskConfigurationType());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SqlStorageUpdateSettings model =
- new SqlStorageUpdateSettings()
- .withDiskCount(738552235)
- .withStartingDeviceId(1698610201)
- .withDiskConfigurationType(DiskConfigurationType.EXTEND);
- model = BinaryData.fromObject(model).toObject(SqlStorageUpdateSettings.class);
- Assertions.assertEquals(738552235, model.diskCount());
- Assertions.assertEquals(1698610201, model.startingDeviceId());
- Assertions.assertEquals(DiskConfigurationType.EXTEND, model.diskConfigurationType());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlTempDbSettingsTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlTempDbSettingsTests.java
deleted file mode 100644
index 88050b14f3da..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlTempDbSettingsTests.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.SqlTempDbSettings;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class SqlTempDbSettingsTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SqlTempDbSettings model =
- BinaryData
- .fromString(
- "{\"dataFileSize\":1322831619,\"dataGrowth\":999035629,\"logFileSize\":2085551487,\"logGrowth\":2041227856,\"dataFileCount\":688230720,\"persistFolder\":false,\"persistFolderPath\":\"vjsllrmvvdfw\",\"luns\":[1825333220,207833423,500448783,676639191],\"defaultFilePath\":\"exxbczwtr\"}")
- .toObject(SqlTempDbSettings.class);
- Assertions.assertEquals(1322831619, model.dataFileSize());
- Assertions.assertEquals(999035629, model.dataGrowth());
- Assertions.assertEquals(2085551487, model.logFileSize());
- Assertions.assertEquals(2041227856, model.logGrowth());
- Assertions.assertEquals(688230720, model.dataFileCount());
- Assertions.assertEquals(false, model.persistFolder());
- Assertions.assertEquals("vjsllrmvvdfw", model.persistFolderPath());
- Assertions.assertEquals(1825333220, model.luns().get(0));
- Assertions.assertEquals("exxbczwtr", model.defaultFilePath());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SqlTempDbSettings model =
- new SqlTempDbSettings()
- .withDataFileSize(1322831619)
- .withDataGrowth(999035629)
- .withLogFileSize(2085551487)
- .withLogGrowth(2041227856)
- .withDataFileCount(688230720)
- .withPersistFolder(false)
- .withPersistFolderPath("vjsllrmvvdfw")
- .withLuns(Arrays.asList(1825333220, 207833423, 500448783, 676639191))
- .withDefaultFilePath("exxbczwtr");
- model = BinaryData.fromObject(model).toObject(SqlTempDbSettings.class);
- Assertions.assertEquals(1322831619, model.dataFileSize());
- Assertions.assertEquals(999035629, model.dataGrowth());
- Assertions.assertEquals(2085551487, model.logFileSize());
- Assertions.assertEquals(2041227856, model.logGrowth());
- Assertions.assertEquals(688230720, model.dataFileCount());
- Assertions.assertEquals(false, model.persistFolder());
- Assertions.assertEquals("vjsllrmvvdfw", model.persistFolderPath());
- Assertions.assertEquals(1825333220, model.luns().get(0));
- Assertions.assertEquals("exxbczwtr", model.defaultFilePath());
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupListResultTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupListResultTests.java
deleted file mode 100644
index 750e5c003bbf..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineGroupListResult;
-
-public final class SqlVirtualMachineGroupListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SqlVirtualMachineGroupListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"yulpkudjkr\",\"sqlImageOffer\":\"hbzhfepg\",\"sqlImageSku\":\"Developer\",\"scaleType\":\"HA\",\"clusterManagerType\":\"WSFC\",\"clusterConfiguration\":\"Domainful\"},\"location\":\"c\",\"tags\":{\"jtjaodxobnbdxkq\":\"erhhbcsglumm\",\"ajionpimexgstxg\":\"xo\",\"gmaajrm\":\"po\",\"clwhijcoejctbz\":\"djwzrlov\"},\"id\":\"qsqsy\",\"name\":\"bkbfkgukdkex\",\"type\":\"ppofmxaxcfjpgdd\"},{\"properties\":{\"provisioningState\":\"jjxhvpmo\",\"sqlImageOffer\":\"xhdzxibqeojnx\",\"sqlImageSku\":\"Enterprise\",\"scaleType\":\"HA\",\"clusterManagerType\":\"WSFC\",\"clusterConfiguration\":\"Domainful\"},\"location\":\"eic\",\"tags\":{\"uhrhcffcyddgl\":\"npzaoq\"},\"id\":\"jthjqkwpyei\",\"name\":\"xmqci\",\"type\":\"q\"}],\"nextLink\":\"khixuigdtopbo\"}")
- .toObject(SqlVirtualMachineGroupListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SqlVirtualMachineGroupListResult model = new SqlVirtualMachineGroupListResult();
- model = BinaryData.fromObject(model).toObject(SqlVirtualMachineGroupListResult.class);
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupUpdateTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupUpdateTests.java
deleted file mode 100644
index 78281a19361d..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupUpdateTests.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineGroupUpdate;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class SqlVirtualMachineGroupUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SqlVirtualMachineGroupUpdate model =
- BinaryData
- .fromString("{\"tags\":{\"vbqid\":\"gpbtoqcjmklj\"}}")
- .toObject(SqlVirtualMachineGroupUpdate.class);
- Assertions.assertEquals("gpbtoqcjmklj", model.tags().get("vbqid"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SqlVirtualMachineGroupUpdate model =
- new SqlVirtualMachineGroupUpdate().withTags(mapOf("vbqid", "gpbtoqcjmklj"));
- model = BinaryData.fromObject(model).toObject(SqlVirtualMachineGroupUpdate.class);
- Assertions.assertEquals("gpbtoqcjmklj", model.tags().get("vbqid"));
- }
-
- @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/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsDeleteMockTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsDeleteMockTests.java
deleted file mode 100644
index 9a7ec92cc060..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineGroupsDeleteMockTests.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class SqlVirtualMachineGroupsDeleteMockTests {
- @Test
- public void testDelete() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{}";
-
- Mockito.when(httpResponse.getStatusCode()).thenReturn(200);
- Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders());
- Mockito
- .when(httpResponse.getBody())
- .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8))));
- Mockito
- .when(httpResponse.getBodyAsByteArray())
- .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8)));
- Mockito
- .when(httpClient.send(httpRequest.capture(), Mockito.any()))
- .thenReturn(
- Mono
- .defer(
- () -> {
- Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue());
- return Mono.just(httpResponse);
- }));
-
- SqlVirtualMachineManager manager =
- SqlVirtualMachineManager
- .configure()
- .withHttpClient(httpClient)
- .authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.sqlVirtualMachineGroups().delete("uedck", "ywbiexzfeyueax", com.azure.core.util.Context.NONE);
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineListResultTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineListResultTests.java
deleted file mode 100644
index b7352cb09a28..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineListResultTests.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineListResult;
-
-public final class SqlVirtualMachineListResultTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SqlVirtualMachineListResult model =
- BinaryData
- .fromString(
- "{\"value\":[{\"identity\":{\"principalId\":\"eb5fbf4d-559e-4c8c-b748-e806cc8b6ece\",\"type\":\"None\",\"tenantId\":\"3a23954a-6ca7-49bc-adc3-485f8a27c26b\"},\"properties\":{\"virtualMachineResourceId\":\"m\",\"provisioningState\":\"hrzayvvtpgvdf\",\"sqlImageOffer\":\"otkftutqxlngx\",\"sqlServerLicenseType\":\"AHUB\",\"sqlManagement\":\"LightWeight\",\"leastPrivilegeMode\":\"Enabled\",\"sqlImageSku\":\"Web\",\"sqlVirtualMachineGroupResourceId\":\"xdqmidtthzrvqdra\",\"wsfcStaticIp\":\"yb\",\"enableAutomaticUpgrade\":false},\"location\":\"kanyktzlcuiywg\",\"tags\":{\"gpphrcgyn\":\"gndrvynh\",\"fsxlzevgbmqjqa\":\"ocpecfvmmco\",\"pmivkwlzu\":\"c\",\"ebxetqgtzxdp\":\"ccfwnfnbacfion\"},\"id\":\"qbqqwxr\",\"name\":\"feallnwsu\",\"type\":\"isnjampmngnz\"}],\"nextLink\":\"xaqwoochcbonqv\"}")
- .toObject(SqlVirtualMachineListResult.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SqlVirtualMachineListResult model = new SqlVirtualMachineListResult();
- model = BinaryData.fromObject(model).toObject(SqlVirtualMachineListResult.class);
- }
-}
diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineTroubleshootsTroubleshootMockTests.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineTroubleshootsTroubleshootMockTests.java
deleted file mode 100644
index 01c6206b910d..000000000000
--- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/test/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachineTroubleshootsTroubleshootMockTests.java
+++ /dev/null
@@ -1,86 +0,0 @@
-// 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.generated;
-
-import com.azure.core.credential.AccessToken;
-import com.azure.core.http.HttpClient;
-import com.azure.core.http.HttpHeaders;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.management.AzureEnvironment;
-import com.azure.core.management.profile.AzureProfile;
-import com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager;
-import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVmTroubleshootingInner;
-import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmTroubleshooting;
-import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingAdditionalProperties;
-import com.azure.resourcemanager.sqlvirtualmachine.models.TroubleshootingScenario;
-import com.azure.resourcemanager.sqlvirtualmachine.models.UnhealthyReplicaInfo;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.time.OffsetDateTime;
-import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Test;
-import org.mockito.ArgumentCaptor;
-import org.mockito.Mockito;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-public final class SqlVirtualMachineTroubleshootsTroubleshootMockTests {
- @Test
- public void testTroubleshoot() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor