diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/CHANGELOG.md index 3c3705fa8e0cc..5eb34cc2f6241 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.3 (Unreleased) +## 1.0.0-beta.1 (2022-08-05) + +- 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-2022-02. 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 5de0f82cc7c92..4597c96d55a08 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-2021-11. 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-2022-02. 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.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md index 633760ff8f4e6..fa595751b6bf4 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/SAMPLE.md @@ -36,21 +36,24 @@ ```java import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration; +import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration; import com.azure.resourcemanager.sqlvirtualmachine.models.PrivateIpAddress; import java.util.Arrays; /** Samples for AvailabilityGroupListeners CreateOrUpdate. */ public final class AvailabilityGroupListenersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateAvailabilityGroupListener.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateAvailabilityGroupListener.json */ /** - * Sample code: Creates or updates an availability group listener. + * Sample code: Creates or updates an availability group listener using load balancer. This is used for VMs present + * in single subnet. * * @param manager Entry point to SqlVirtualMachineManager. */ - public static void createsOrUpdatesAnAvailabilityGroupListener( - com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) { + public static void + createsOrUpdatesAnAvailabilityGroupListenerUsingLoadBalancerThisIsUsedForVMsPresentInSingleSubnet( + com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) { manager .availabilityGroupListeners() .define("agl-test") @@ -76,6 +79,44 @@ public final class AvailabilityGroupListenersCreateOrUpdateSamples { .withPort(1433) .create(); } + + /* + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json + */ + /** + * Sample code: Creates or updates an availability group listener. This is used for VMs present in multi subnet. + * + * @param manager Entry point to SqlVirtualMachineManager. + */ + public static void createsOrUpdatesAnAvailabilityGroupListenerThisIsUsedForVMsPresentInMultiSubnet( + com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) { + manager + .availabilityGroupListeners() + .define("agl-test") + .withExistingSqlVirtualMachineGroup("testrg", "testvmgroup") + .withAvailabilityGroupName("ag-test") + .withMultiSubnetIpConfigurations( + Arrays + .asList( + new MultiSubnetIpConfiguration() + .withPrivateIpAddress( + new PrivateIpAddress() + .withIpAddress("10.0.0.112") + .withSubnetResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default")) + .withSqlVirtualMachineInstance( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2"), + new MultiSubnetIpConfiguration() + .withPrivateIpAddress( + new PrivateIpAddress() + .withIpAddress("10.0.1.112") + .withSubnetResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate")) + .withSqlVirtualMachineInstance( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1"))) + .withPort(1433) + .create(); + } } ``` @@ -87,7 +128,7 @@ import com.azure.core.util.Context; /** Samples for AvailabilityGroupListeners Delete. */ public final class AvailabilityGroupListenersDeleteSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteAvailabilityGroupListener.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/DeleteAvailabilityGroupListener.json */ /** * Sample code: Deletes an availability group listener. @@ -109,7 +150,7 @@ import com.azure.core.util.Context; /** Samples for AvailabilityGroupListeners Get. */ public final class AvailabilityGroupListenersGetSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetAvailabilityGroupListener.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/GetAvailabilityGroupListener.json */ /** * Sample code: Gets an availability group listener. @@ -131,7 +172,7 @@ import com.azure.core.util.Context; /** Samples for AvailabilityGroupListeners ListByGroup. */ public final class AvailabilityGroupListenersListByGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByGroupAvailabilityGroupListener.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListByGroupAvailabilityGroupListener.json */ /** * Sample code: Lists all availability group listeners in a SQL virtual machine group. @@ -153,7 +194,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListOperation.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListOperation.json */ /** * Sample code: Lists all of the available SQL Virtual Machine Rest API operations. @@ -170,6 +211,7 @@ public final class OperationsListSamples { ### SqlVirtualMachineGroups_CreateOrUpdate ```java +import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterSubnetType; import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmGroupImageSku; import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainProfile; import java.util.HashMap; @@ -178,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/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineGroup.json */ /** * Sample code: Creates or updates a SQL virtual machine group. @@ -203,7 +245,8 @@ public final class SqlVirtualMachineGroupsCreateOrUpdateSamples { .withClusterOperatorAccount("testrp@testdomain.com") .withSqlServiceAccount("sqlservice@testdomain.com") .withStorageAccountUrl("https://storgact.blob.core.windows.net/") - .withStorageAccountPrimaryKey("")) + .withStorageAccountPrimaryKey("") + .withClusterSubnetType(ClusterSubnetType.MULTI_SUBNET)) .create(); } @@ -228,7 +271,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachineGroups Delete. */ public final class SqlVirtualMachineGroupsDeleteSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/DeleteSqlVirtualMachineGroup.json */ /** * Sample code: Deletes a SQL virtual machine group. @@ -250,7 +293,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachineGroups GetByResourceGroup. */ public final class SqlVirtualMachineGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/GetSqlVirtualMachineGroup.json */ /** * Sample code: Gets a SQL virtual machine group. @@ -272,7 +315,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachineGroups List. */ public final class SqlVirtualMachineGroupsListSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListSubscriptionSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListSubscriptionSqlVirtualMachineGroup.json */ /** * Sample code: Gets all SQL virtual machine groups in a subscription. @@ -294,7 +337,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachineGroups ListByResourceGroup. */ public final class SqlVirtualMachineGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByResourceGroupSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListByResourceGroupSqlVirtualMachineGroup.json */ /** * Sample code: Gets all SQL virtual machine groups in a resource group. @@ -319,7 +362,7 @@ import java.util.Map; /** Samples for SqlVirtualMachineGroups Update. */ public final class SqlVirtualMachineGroupsUpdateSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/UpdateSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/UpdateSqlVirtualMachineGroup.json */ /** * Sample code: Updates a SQL virtual machine group tags. @@ -353,13 +396,14 @@ public final class SqlVirtualMachineGroupsUpdateSamples { ```java import com.azure.resourcemanager.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations; +import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentDayOfWeek; import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings; +import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupDaysOfWeek; import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings; import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings; import com.azure.resourcemanager.sqlvirtualmachine.models.BackupScheduleType; import com.azure.resourcemanager.sqlvirtualmachine.models.ConnectivityType; import com.azure.resourcemanager.sqlvirtualmachine.models.DayOfWeek; -import com.azure.resourcemanager.sqlvirtualmachine.models.DaysOfWeek; import com.azure.resourcemanager.sqlvirtualmachine.models.DiskConfigurationType; import com.azure.resourcemanager.sqlvirtualmachine.models.FullBackupFrequencyType; import com.azure.resourcemanager.sqlvirtualmachine.models.KeyVaultCredentialSettings; @@ -383,7 +427,7 @@ import java.util.Arrays; /** Samples for SqlVirtualMachines CreateOrUpdate. */ public final class SqlVirtualMachinesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json */ /** * Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or @@ -409,7 +453,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateVirtualMachineWithVMGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateVirtualMachineWithVMGroup.json */ /** * Sample code: Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group. @@ -430,11 +474,12 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples { .withClusterBootstrapAccountPassword("") .withClusterOperatorAccountPassword("") .withSqlServiceAccountPassword("")) + .withWsfcStaticIp("10.0.0.7") .create(); } /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json */ /** * Sample code: Creates or updates a SQL virtual machine for Automated Back up Settings with Weekly and Days of the @@ -473,7 +518,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples { .withBackupSystemDbs(true) .withBackupScheduleType(BackupScheduleType.MANUAL) .withFullBackupFrequency(FullBackupFrequencyType.WEEKLY) - .withDaysOfWeek(Arrays.asList(DaysOfWeek.MONDAY, DaysOfWeek.FRIDAY)) + .withDaysOfWeek(Arrays.asList(AutoBackupDaysOfWeek.MONDAY, AutoBackupDaysOfWeek.FRIDAY)) .withFullBackupStartTime(6) .withFullBackupWindowHours(11) .withLogBackupFrequency(10)) @@ -499,7 +544,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json */ /** * Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and @@ -538,7 +583,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineMAX.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineMAX.json */ /** * Sample code: Creates or updates a SQL virtual machine with max parameters. @@ -602,7 +647,9 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples { .withMaxDop(8) .withIsOptimizeForAdHocWorkloadsEnabled(true) .withMinServerMemoryMB(0) - .withMaxServerMemoryMB(128))) + .withMaxServerMemoryMB(128) + .withIsLpimEnabled(true) + .withIsIfiEnabled(true))) .withAssessmentSettings( new AssessmentSettings() .withEnable(true) @@ -611,13 +658,13 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples { new Schedule() .withEnable(true) .withWeeklyInterval(1) - .withDayOfWeek(DayOfWeek.SUNDAY) + .withDayOfWeek(AssessmentDayOfWeek.SUNDAY) .withStartTime("23:17"))) .create(); } /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineMIN.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineMIN.json */ /** * Sample code: Creates or updates a SQL virtual machine with min parameters. @@ -646,7 +693,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachines Delete. */ public final class SqlVirtualMachinesDeleteSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/DeleteSqlVirtualMachine.json */ /** * Sample code: Deletes a SQL virtual machine. @@ -668,7 +715,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachines GetByResourceGroup. */ public final class SqlVirtualMachinesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/GetSqlVirtualMachine.json */ /** * Sample code: Gets a SQL virtual machine. @@ -690,7 +737,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachines List. */ public final class SqlVirtualMachinesListSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListSubscriptionSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListSubscriptionSqlVirtualMachine.json */ /** * Sample code: Gets all SQL virtual machines in a subscription. @@ -712,7 +759,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachines ListByResourceGroup. */ public final class SqlVirtualMachinesListByResourceGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByResourceGroupSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListByResourceGroupSqlVirtualMachine.json */ /** * Sample code: Gets all SQL virtual machines in a resource group. @@ -734,7 +781,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachines ListBySqlVmGroup. */ public final class SqlVirtualMachinesListBySqlVmGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json */ /** * Sample code: Gets the list of sql virtual machines in a SQL virtual machine group. @@ -756,7 +803,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachines Redeploy. */ public final class SqlVirtualMachinesRedeploySamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/RedeploySqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/RedeploySqlVirtualMachine.json */ /** * Sample code: Uninstalls and reinstalls the SQL Iaas Extension. @@ -778,7 +825,7 @@ import com.azure.core.util.Context; /** Samples for SqlVirtualMachines StartAssessment. */ public final class SqlVirtualMachinesStartAssessmentSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/StartAssessmentOnSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/StartAssessmentOnSqlVirtualMachine.json */ /** * Sample code: Starts Assessment on SQL virtual machine. @@ -803,7 +850,7 @@ import java.util.Map; /** Samples for SqlVirtualMachines Update. */ public final class SqlVirtualMachinesUpdateSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/UpdateSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 63987fb8a1b82..520f5834909c2 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/pom.xml @@ -13,7 +13,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-2021-11. + 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-2022-02. 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 95f09977ae6b8..244d403d814a3 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 @@ -10,11 +10,13 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -80,6 +82,19 @@ public static SqlVirtualMachineManager authenticate(TokenCredential credential, return configure().authenticate(credential, profile); } + /** + * Creates an instance of SqlVirtualMachine service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the SqlVirtualMachine service API instance. + */ + public static SqlVirtualMachineManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new SqlVirtualMachineManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create SqlVirtualMachineManager with optional configuration. * @@ -91,13 +106,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -158,6 +174,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -165,9 +194,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -189,7 +220,7 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr .append("-") .append("com.azure.resourcemanager.sqlvirtualmachine") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -207,10 +238,15 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); policies .addAll( @@ -241,7 +277,11 @@ public SqlVirtualMachineManager authenticate(TokenCredential credential, AzurePr } } - /** @return Resource collection API of AvailabilityGroupListeners. */ + /** + * Gets the resource collection API of AvailabilityGroupListeners. It manages AvailabilityGroupListener. + * + * @return Resource collection API of AvailabilityGroupListeners. + */ public AvailabilityGroupListeners availabilityGroupListeners() { if (this.availabilityGroupListeners == null) { this.availabilityGroupListeners = @@ -250,7 +290,11 @@ public AvailabilityGroupListeners availabilityGroupListeners() { return availabilityGroupListeners; } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -258,7 +302,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of SqlVirtualMachineGroups. */ + /** + * Gets the resource collection API of SqlVirtualMachineGroups. It manages SqlVirtualMachineGroup. + * + * @return Resource collection API of SqlVirtualMachineGroups. + */ public SqlVirtualMachineGroups sqlVirtualMachineGroups() { if (this.sqlVirtualMachineGroups == null) { this.sqlVirtualMachineGroups = @@ -267,7 +315,11 @@ public SqlVirtualMachineGroups sqlVirtualMachineGroups() { return sqlVirtualMachineGroups; } - /** @return Resource collection API of SqlVirtualMachines. */ + /** + * Gets the resource collection API of SqlVirtualMachines. It manages SqlVirtualMachine. + * + * @return Resource collection API of SqlVirtualMachines. + */ public SqlVirtualMachines sqlVirtualMachines() { if (this.sqlVirtualMachines == null) { this.sqlVirtualMachines = new SqlVirtualMachinesImpl(clientObject.getSqlVirtualMachines(), this); 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 4ebf4f68c6e25..ab022b0a4c20e 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 @@ -70,63 +70,6 @@ PagedIterable listBySqlVmGroup( @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); - /** - * Uninstalls and reinstalls the SQL Iaas Extension. - * - * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from - * the Azure Resource Manager API or the portal. - * @param sqlVirtualMachineName Name of the SQL virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName); - - /** - * Uninstalls and reinstalls the SQL Iaas Extension. - * - * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from - * the Azure Resource Manager API or the portal. - * @param sqlVirtualMachineName Name of the SQL virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRedeploy( - String resourceGroupName, String sqlVirtualMachineName, Context context); - - /** - * Uninstalls and reinstalls the SQL Iaas Extension. - * - * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from - * the Azure Resource Manager API or the portal. - * @param sqlVirtualMachineName Name of the SQL virtual machine. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void redeploy(String resourceGroupName, String sqlVirtualMachineName); - - /** - * Uninstalls and reinstalls the SQL Iaas Extension. - * - * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from - * the Azure Resource Manager API or the portal. - * @param sqlVirtualMachineName Name of the SQL virtual machine. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context); - /** * Gets a SQL virtual machine. * @@ -374,6 +317,63 @@ SqlVirtualMachineInner update( @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); + /** + * Uninstalls and reinstalls the SQL Iaas Extension. + * + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from + * the Azure Resource Manager API or the portal. + * @param sqlVirtualMachineName Name of the SQL virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRedeploy(String resourceGroupName, String sqlVirtualMachineName); + + /** + * Uninstalls and reinstalls the SQL Iaas Extension. + * + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from + * the Azure Resource Manager API or the portal. + * @param sqlVirtualMachineName Name of the SQL virtual machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRedeploy( + String resourceGroupName, String sqlVirtualMachineName, Context context); + + /** + * Uninstalls and reinstalls the SQL Iaas Extension. + * + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from + * the Azure Resource Manager API or the portal. + * @param sqlVirtualMachineName Name of the SQL virtual machine. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void redeploy(String resourceGroupName, String sqlVirtualMachineName); + + /** + * Uninstalls and reinstalls the SQL Iaas Extension. + * + * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from + * the Azure Resource Manager API or the portal. + * @param sqlVirtualMachineName Name of the SQL virtual machine. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context); + /** * Starts Assessment on SQL virtual machine. * diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java index db15c49ec3190..17075ad61dbef 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerInner.java @@ -7,18 +7,15 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration; import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A SQL Server availability group listener. */ @Fluent public final class AvailabilityGroupListenerInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenerInner.class); - /* * Resource properties. */ @@ -107,6 +104,30 @@ public AvailabilityGroupListenerInner withLoadBalancerConfigurations( return this; } + /** + * Get the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG listener. + * + * @return the multiSubnetIpConfigurations value. + */ + public List multiSubnetIpConfigurations() { + return this.innerProperties() == null ? null : this.innerProperties().multiSubnetIpConfigurations(); + } + + /** + * Set the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG listener. + * + * @param multiSubnetIpConfigurations the multiSubnetIpConfigurations value to set. + * @return the AvailabilityGroupListenerInner object itself. + */ + public AvailabilityGroupListenerInner withMultiSubnetIpConfigurations( + List multiSubnetIpConfigurations) { + if (this.innerProperties() == null) { + this.innerProperties = new AvailabilityGroupListenerProperties(); + } + this.innerProperties().withMultiSubnetIpConfigurations(multiSubnetIpConfigurations); + return this; + } + /** * Get the createDefaultAvailabilityGroupIfNotExist property: Create a default availability group if it does not * exist. diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java index ef8f4ad9abc67..75cbd76bde04a 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/AvailabilityGroupListenerProperties.java @@ -5,18 +5,15 @@ package com.azure.resourcemanager.sqlvirtualmachine.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration; import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The properties of an availability group listener. */ @Fluent public final class AvailabilityGroupListenerProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenerProperties.class); - /* * Provisioning state to track the async operation status. */ @@ -35,6 +32,12 @@ public final class AvailabilityGroupListenerProperties { @JsonProperty(value = "loadBalancerConfigurations") private List loadBalancerConfigurations; + /* + * List of multi subnet IP configurations for an AG listener. + */ + @JsonProperty(value = "multiSubnetIpConfigurations") + private List multiSubnetIpConfigurations; + /* * Create a default availability group if it does not exist. */ @@ -105,6 +108,27 @@ public AvailabilityGroupListenerProperties withLoadBalancerConfigurations( return this; } + /** + * Get the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG listener. + * + * @return the multiSubnetIpConfigurations value. + */ + public List multiSubnetIpConfigurations() { + return this.multiSubnetIpConfigurations; + } + + /** + * Set the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG listener. + * + * @param multiSubnetIpConfigurations the multiSubnetIpConfigurations value to set. + * @return the AvailabilityGroupListenerProperties object itself. + */ + public AvailabilityGroupListenerProperties withMultiSubnetIpConfigurations( + List multiSubnetIpConfigurations) { + this.multiSubnetIpConfigurations = multiSubnetIpConfigurations; + return this; + } + /** * Get the createDefaultAvailabilityGroupIfNotExist property: Create a default availability group if it does not * exist. @@ -178,6 +202,9 @@ public void validate() { if (loadBalancerConfigurations() != null) { loadBalancerConfigurations().forEach(e -> e.validate()); } + if (multiSubnetIpConfigurations() != null) { + multiSubnetIpConfigurations().forEach(e -> e.validate()); + } if (availabilityGroupConfiguration() != null) { availabilityGroupConfiguration().validate(); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java index b7eb2ffbc9f51..492497372282f 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/OperationInner.java @@ -5,10 +5,8 @@ package com.azure.resourcemanager.sqlvirtualmachine.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.models.OperationDisplay; import com.azure.resourcemanager.sqlvirtualmachine.models.OperationOrigin; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -16,8 +14,6 @@ /** SQL REST API operation definition. */ @Immutable public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* * The name of the operation being performed on this particular object. */ @@ -25,8 +21,7 @@ public final class OperationInner { private String name; /* - * The localized display information for this particular operation / - * action. + * The localized display information for this particular operation / action. */ @JsonProperty(value = "display", access = JsonProperty.Access.WRITE_ONLY) private OperationDisplay display; diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java index 1cbca3acb829c..6de89bd0c3015 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupInner.java @@ -7,21 +7,17 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterConfiguration; import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterManagerType; import com.azure.resourcemanager.sqlvirtualmachine.models.ScaleType; import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmGroupImageSku; import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainProfile; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** A SQL virtual machine group. */ @Fluent public final class SqlVirtualMachineGroupInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupInner.class); - /* * Resource properties. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java index 3294061efdc2c..e892dcac441b4 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/fluent/models/SqlVirtualMachineGroupProperties.java @@ -5,20 +5,16 @@ package com.azure.resourcemanager.sqlvirtualmachine.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterConfiguration; import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterManagerType; import com.azure.resourcemanager.sqlvirtualmachine.models.ScaleType; import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmGroupImageSku; import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainProfile; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The properties of a SQL virtual machine group. */ @Fluent public final class SqlVirtualMachineGroupProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupProperties.class); - /* * Provisioning state to track the async operation status. */ @@ -44,8 +40,8 @@ public final class SqlVirtualMachineGroupProperties { private ScaleType scaleType; /* - * Type of cluster manager: Windows Server Failover Cluster (WSFC), implied - * by the scale type of the group and the OS type. + * Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the + * OS type. */ @JsonProperty(value = "clusterManagerType", access = JsonProperty.Access.WRITE_ONLY) private ClusterManagerType clusterManagerType; 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 eac89001ab04c..1205e6e9670ef 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 @@ -7,7 +7,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings; import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings; import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings; @@ -19,15 +18,12 @@ import com.azure.resourcemanager.sqlvirtualmachine.models.SqlServerLicenseType; import com.azure.resourcemanager.sqlvirtualmachine.models.StorageConfigurationSettings; import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainCredentials; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** A SQL virtual machine. */ @Fluent public final class SqlVirtualMachineInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineInner.class); - /* * Azure Active Directory identity of the server. */ @@ -274,6 +270,31 @@ public SqlVirtualMachineInner withWsfcDomainCredentials(WsfcDomainCredentials ws return this; } + /** + * Get the wsfcStaticIp property: Domain credentials for setting up Windows Server Failover Cluster for SQL + * availability group. + * + * @return the wsfcStaticIp value. + */ + public String wsfcStaticIp() { + return this.innerProperties() == null ? null : this.innerProperties().wsfcStaticIp(); + } + + /** + * Set the wsfcStaticIp property: Domain credentials for setting up Windows Server Failover Cluster for SQL + * availability group. + * + * @param wsfcStaticIp the wsfcStaticIp value to set. + * @return the SqlVirtualMachineInner object itself. + */ + public SqlVirtualMachineInner withWsfcStaticIp(String wsfcStaticIp) { + if (this.innerProperties() == null) { + this.innerProperties = new SqlVirtualMachineProperties(); + } + this.innerProperties().withWsfcStaticIp(wsfcStaticIp); + return this; + } + /** * Get the autoPatchingSettings property: Auto patching settings for applying critical security updates to SQL * virtual machine. 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 070f5c530dcc3..f739d1ec914c4 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.sqlvirtualmachine.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings; import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings; import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings; @@ -16,17 +15,13 @@ import com.azure.resourcemanager.sqlvirtualmachine.models.SqlServerLicenseType; import com.azure.resourcemanager.sqlvirtualmachine.models.StorageConfigurationSettings; import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainCredentials; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The SQL virtual machine properties. */ @Fluent public final class SqlVirtualMachineProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineProperties.class); - /* - * ARM Resource id of underlying virtual machine created from SQL - * marketplace image. + * ARM Resource id of underlying virtual machine created from SQL marketplace image. */ @JsonProperty(value = "virtualMachineResourceId") private String virtualMachineResourceId; @@ -62,22 +57,25 @@ public final class SqlVirtualMachineProperties { private SqlImageSku sqlImageSku; /* - * ARM resource id of the SQL virtual machine group this SQL virtual - * machine is or will be part of. + * ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of. */ @JsonProperty(value = "sqlVirtualMachineGroupResourceId") private String sqlVirtualMachineGroupResourceId; /* - * Domain credentials for setting up Windows Server Failover Cluster for - * SQL availability group. + * Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. */ @JsonProperty(value = "wsfcDomainCredentials") private WsfcDomainCredentials wsfcDomainCredentials; /* - * Auto patching settings for applying critical security updates to SQL - * virtual machine. + * Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. + */ + @JsonProperty(value = "wsfcStaticIp") + private String wsfcStaticIp; + + /* + * Auto patching settings for applying critical security updates to SQL virtual machine. */ @JsonProperty(value = "autoPatchingSettings") private AutoPatchingSettings autoPatchingSettings; @@ -267,6 +265,28 @@ public SqlVirtualMachineProperties withWsfcDomainCredentials(WsfcDomainCredentia return this; } + /** + * Get the wsfcStaticIp property: Domain credentials for setting up Windows Server Failover Cluster for SQL + * availability group. + * + * @return the wsfcStaticIp value. + */ + public String wsfcStaticIp() { + return this.wsfcStaticIp; + } + + /** + * Set the wsfcStaticIp property: Domain credentials for setting up Windows Server Failover Cluster for SQL + * availability group. + * + * @param wsfcStaticIp the wsfcStaticIp value to set. + * @return the SqlVirtualMachineProperties object itself. + */ + public SqlVirtualMachineProperties withWsfcStaticIp(String wsfcStaticIp) { + this.wsfcStaticIp = wsfcStaticIp; + return this; + } + /** * Get the autoPatchingSettings property: Auto patching settings for applying critical security updates to SQL * virtual machine. diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java index d531bd7e371e3..9fc52048dfbb6 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenerImpl.java @@ -10,6 +10,7 @@ import com.azure.resourcemanager.sqlvirtualmachine.models.AgConfiguration; import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener; import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration; +import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration; import java.util.Collections; import java.util.List; @@ -52,6 +53,15 @@ public List loadBalancerConfigurations() { } } + public List multiSubnetIpConfigurations() { + List inner = this.innerModel().multiSubnetIpConfigurations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public Boolean createDefaultAvailabilityGroupIfNotExist() { return this.innerModel().createDefaultAvailabilityGroupIfNotExist(); } @@ -64,6 +74,10 @@ public AgConfiguration availabilityGroupConfiguration() { return this.innerModel().availabilityGroupConfiguration(); } + public String resourceGroupName() { + return resourceGroupName; + } + public AvailabilityGroupListenerInner innerModel() { return this.innerObject; } @@ -201,6 +215,12 @@ public AvailabilityGroupListenerImpl withLoadBalancerConfigurations( return this; } + public AvailabilityGroupListenerImpl withMultiSubnetIpConfigurations( + List multiSubnetIpConfigurations) { + this.innerModel().withMultiSubnetIpConfigurations(multiSubnetIpConfigurations); + return this; + } + public AvailabilityGroupListenerImpl withCreateDefaultAvailabilityGroupIfNotExist( Boolean createDefaultAvailabilityGroupIfNotExist) { this.innerModel().withCreateDefaultAvailabilityGroupIfNotExist(createDefaultAvailabilityGroupIfNotExist); diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java index e6e36ddc54f51..67b47220a511c 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sqlvirtualmachine.fluent.AvailabilityGroupListenersClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in AvailabilityGroupListenersClient. */ public final class AvailabilityGroupListenersClientImpl implements AvailabilityGroupListenersClient { - private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AvailabilityGroupListenersService service; @@ -297,14 +294,7 @@ private Mono getAsync( String expand) { return getWithResponseAsync( resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -325,14 +315,7 @@ private Mono getAsync( final String expand = null; return getWithResponseAsync( resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java index e5e356e32b5b7..348217a3a979d 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/AvailabilityGroupListenersImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerInner; import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListener; import com.azure.resourcemanager.sqlvirtualmachine.models.AvailabilityGroupListeners; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AvailabilityGroupListenersImpl implements AvailabilityGroupListeners { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AvailabilityGroupListenersImpl.class); private final AvailabilityGroupListenersClient innerClient; @@ -94,7 +93,7 @@ public PagedIterable listByGroup( public AvailabilityGroupListener getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -102,7 +101,7 @@ public AvailabilityGroupListener getById(String id) { } String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups"); if (sqlVirtualMachineGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -112,7 +111,7 @@ public AvailabilityGroupListener getById(String id) { } String availabilityGroupListenerName = Utils.getValueFromIdByName(id, "availabilityGroupListeners"); if (availabilityGroupListenerName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -130,7 +129,7 @@ public AvailabilityGroupListener getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -138,7 +137,7 @@ public Response getByIdWithResponse(String id, String } String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups"); if (sqlVirtualMachineGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -148,7 +147,7 @@ public Response getByIdWithResponse(String id, String } String availabilityGroupListenerName = Utils.getValueFromIdByName(id, "availabilityGroupListeners"); if (availabilityGroupListenerName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -164,7 +163,7 @@ public Response getByIdWithResponse(String id, String public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -172,7 +171,7 @@ public void deleteById(String id) { } String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups"); if (sqlVirtualMachineGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -182,7 +181,7 @@ public void deleteById(String id) { } String availabilityGroupListenerName = Utils.getValueFromIdByName(id, "availabilityGroupListeners"); if (availabilityGroupListenerName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -196,7 +195,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -204,7 +203,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups"); if (sqlVirtualMachineGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -214,7 +213,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String availabilityGroupListenerName = Utils.getValueFromIdByName(id, "availabilityGroupListeners"); if (availabilityGroupListenerName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java index c1ca667f2faba..6c1fe43e52b52 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.fluent.OperationsClient; import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.OperationInner; import com.azure.resourcemanager.sqlvirtualmachine.models.OperationListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java index ced421e7130e5..56f4eece132dd 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.OperationInner; import com.azure.resourcemanager.sqlvirtualmachine.models.Operation; import com.azure.resourcemanager.sqlvirtualmachine.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java index 3ac75bfb76ea5..2bbf72f5253d1 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupImpl.java @@ -89,6 +89,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public SqlVirtualMachineGroupInner innerModel() { return this.innerObject; } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java index cee813883adc6..3a2129dcf6e82 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sqlvirtualmachine.fluent.SqlVirtualMachineGroupsClient; @@ -43,8 +42,6 @@ /** An instance of this class provides access to all the operations defined in SqlVirtualMachineGroupsClient. */ public final class SqlVirtualMachineGroupsClientImpl implements SqlVirtualMachineGroupsClient { - private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SqlVirtualMachineGroupsService service; @@ -294,14 +291,7 @@ private Mono> getByResourceGroupWithRespon private Mono getByResourceGroupAsync( String resourceGroupName, String sqlVirtualMachineGroupName) { return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineGroupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsImpl.java index a8fe079458c65..8710adb16f0d4 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsImpl.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineGroupsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVirtualMachineGroupInner; import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineGroup; import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachineGroups; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SqlVirtualMachineGroupsImpl implements SqlVirtualMachineGroups { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SqlVirtualMachineGroupsImpl.class); private final SqlVirtualMachineGroupsClient innerClient; @@ -86,7 +85,7 @@ public PagedIterable list(Context context) { public SqlVirtualMachineGroup getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -94,7 +93,7 @@ public SqlVirtualMachineGroup getById(String id) { } String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups"); if (sqlVirtualMachineGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -110,7 +109,7 @@ public SqlVirtualMachineGroup getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -118,7 +117,7 @@ public Response getByIdWithResponse(String id, Context c } String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups"); if (sqlVirtualMachineGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -132,7 +131,7 @@ public Response getByIdWithResponse(String id, Context c public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -140,7 +139,7 @@ public void deleteById(String id) { } String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups"); if (sqlVirtualMachineGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -154,7 +153,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -162,7 +161,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String sqlVirtualMachineGroupName = Utils.getValueFromIdByName(id, "sqlVirtualMachineGroups"); if (sqlVirtualMachineGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineImpl.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineImpl.java index cf033a8ba0510..07bd5ecaccd37 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineImpl.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineImpl.java @@ -95,6 +95,10 @@ public WsfcDomainCredentials wsfcDomainCredentials() { return this.innerModel().wsfcDomainCredentials(); } + public String wsfcStaticIp() { + return this.innerModel().wsfcStaticIp(); + } + public AutoPatchingSettings autoPatchingSettings() { return this.innerModel().autoPatchingSettings(); } @@ -127,6 +131,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public SqlVirtualMachineInner innerModel() { return this.innerObject; } @@ -296,6 +304,11 @@ public SqlVirtualMachineImpl withWsfcDomainCredentials(WsfcDomainCredentials wsf return this; } + public SqlVirtualMachineImpl withWsfcStaticIp(String wsfcStaticIp) { + this.innerModel().withWsfcStaticIp(wsfcStaticIp); + return this; + } + public SqlVirtualMachineImpl withAutoPatchingSettings(AutoPatchingSettings autoPatchingSettings) { this.innerModel().withAutoPatchingSettings(autoPatchingSettings); return this; diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientBuilder.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientBuilder.java index ce28dcb231628..62bccf2343c28 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientBuilder.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/implementation/SqlVirtualMachineManagementClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public SqlVirtualMachineManagementClientBuilder environment(AzureEnvironment env } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the SqlVirtualMachineManagementClientBuilder. */ - public SqlVirtualMachineManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public SqlVirtualMachineManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the SqlVirtualMachineManagementClientBuilder. */ - public SqlVirtualMachineManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public SqlVirtualMachineManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -120,27 +119,26 @@ public SqlVirtualMachineManagementClientBuilder serializerAdapter(SerializerAdap * @return an instance of SqlVirtualMachineManagementClientImpl. */ public SqlVirtualMachineManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); SqlVirtualMachineManagementClientImpl client = new SqlVirtualMachineManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } 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 b8333e94a48bb..83277c97a76d2 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 @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -32,15 +33,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the SqlVirtualMachineManagementClientImpl type. */ @ServiceClient(builder = SqlVirtualMachineManagementClientBuilder.class) public final class SqlVirtualMachineManagementClientImpl implements SqlVirtualMachineManagementClient { - private final ClientLogger logger = new ClientLogger(SqlVirtualMachineManagementClientImpl.class); - /** Subscription ID that identifies an Azure subscription. */ private final String subscriptionId; @@ -183,7 +181,7 @@ public SqlVirtualMachinesClient getSqlVirtualMachines() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-11-01-preview"; + this.apiVersion = "2022-02-01"; this.availabilityGroupListeners = new AvailabilityGroupListenersClientImpl(this); this.operations = new OperationsClientImpl(this); this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsClientImpl(this); @@ -206,10 +204,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -273,7 +268,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -332,4 +327,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(SqlVirtualMachineManagementClientImpl.class); } 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 c415ca57398a2..f7859430558e3 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 @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sqlvirtualmachine.fluent.SqlVirtualMachinesClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in SqlVirtualMachinesClient. */ public final class SqlVirtualMachinesClientImpl implements SqlVirtualMachinesClient { - private final ClientLogger logger = new ClientLogger(SqlVirtualMachinesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final SqlVirtualMachinesService service; @@ -96,20 +93,6 @@ Mono> list( @HeaderParam("Accept") String accept, Context context); - @Headers({"Accept: application/json;q=0.9", "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, - Context context); - @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine" @@ -186,6 +169,20 @@ Mono> listByResourceGroup( @HeaderParam("Accept") String accept, Context context); + @Headers({"Accept: application/json;q=0.9", "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, + Context context); + @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine" @@ -573,246 +570,6 @@ public PagedIterable list(Context context) { return new PagedIterable<>(listAsync(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 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( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - 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( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - return FluxUtil - .withContext( - context -> - service - .redeploy( - this.client.getEndpoint(), - resourceGroupName, - sqlVirtualMachineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * 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 Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> redeployWithResponseAsync( - String resourceGroupName, String sqlVirtualMachineName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - 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( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - context = this.client.mergeContext(context); - return service - .redeploy( - this.client.getEndpoint(), - resourceGroupName, - sqlVirtualMachineName, - this.client.getSubscriptionId(), - this.client.getApiVersion(), - 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 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 beginRedeployAsync(resourceGroupName, sqlVirtualMachineName, context).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. - * @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 redeployAsync(String resourceGroupName, String sqlVirtualMachineName) { - return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono redeployAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) { - return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void redeploy(String resourceGroupName, String sqlVirtualMachineName) { - redeployAsync(resourceGroupName, sqlVirtualMachineName).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. - * @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 redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context) { - redeployAsync(resourceGroupName, sqlVirtualMachineName, context).block(); - } - /** * Gets a SQL virtual machine. * @@ -931,14 +688,7 @@ private Mono> getByResourceGroupWithResponseAsy private Mono getByResourceGroupAsync( String resourceGroupName, String sqlVirtualMachineName, String expand) { return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -957,14 +707,7 @@ private Mono getByResourceGroupAsync( String resourceGroupName, String sqlVirtualMachineName) { final String expand = null; return getByResourceGroupWithResponseAsync(resourceGroupName, sqlVirtualMachineName, expand) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1980,6 +1723,246 @@ public PagedIterable listByResourceGroup(String resource return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, 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 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( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + 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( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + return FluxUtil + .withContext( + context -> + service + .redeploy( + this.client.getEndpoint(), + resourceGroupName, + sqlVirtualMachineName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> redeployWithResponseAsync( + String resourceGroupName, String sqlVirtualMachineName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + 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( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + context = this.client.mergeContext(context); + return service + .redeploy( + this.client.getEndpoint(), + resourceGroupName, + sqlVirtualMachineName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + 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 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 beginRedeployAsync(resourceGroupName, sqlVirtualMachineName, context).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. + * @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 redeployAsync(String resourceGroupName, String sqlVirtualMachineName) { + return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono redeployAsync(String resourceGroupName, String sqlVirtualMachineName, Context context) { + return beginRedeployAsync(resourceGroupName, sqlVirtualMachineName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void redeploy(String resourceGroupName, String sqlVirtualMachineName) { + redeployAsync(resourceGroupName, sqlVirtualMachineName).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. + * @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 redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context) { + redeployAsync(resourceGroupName, sqlVirtualMachineName, context).block(); + } + /** * Starts Assessment on SQL virtual machine. * 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 5125e2a7e525b..c5f193bd7532d 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVirtualMachineInner; import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachine; import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVirtualMachines; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class SqlVirtualMachinesImpl implements SqlVirtualMachines { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachinesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(SqlVirtualMachinesImpl.class); private final SqlVirtualMachinesClient innerClient; @@ -53,14 +52,6 @@ public PagedIterable list(Context context) { return Utils.mapPage(inner, inner1 -> new SqlVirtualMachineImpl(inner1, this.manager())); } - 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 getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName) { SqlVirtualMachineInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, sqlVirtualMachineName); @@ -107,6 +98,14 @@ public PagedIterable listByResourceGroup(String resourceGroup return Utils.mapPage(inner, inner1 -> new SqlVirtualMachineImpl(inner1, this.manager())); } + 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 void startAssessment(String resourceGroupName, String sqlVirtualMachineName) { this.serviceClient().startAssessment(resourceGroupName, sqlVirtualMachineName); } @@ -118,7 +117,7 @@ public void startAssessment(String resourceGroupName, String sqlVirtualMachineNa public SqlVirtualMachine getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -126,7 +125,7 @@ public SqlVirtualMachine getById(String id) { } String sqlVirtualMachineName = Utils.getValueFromIdByName(id, "sqlVirtualMachines"); if (sqlVirtualMachineName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -142,7 +141,7 @@ public SqlVirtualMachine getById(String id) { public Response getByIdWithResponse(String id, String expand, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -150,7 +149,7 @@ public Response getByIdWithResponse(String id, String expand, } String sqlVirtualMachineName = Utils.getValueFromIdByName(id, "sqlVirtualMachines"); if (sqlVirtualMachineName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -163,7 +162,7 @@ public Response getByIdWithResponse(String id, String expand, public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -171,7 +170,7 @@ public void deleteById(String id) { } String sqlVirtualMachineName = Utils.getValueFromIdByName(id, "sqlVirtualMachines"); if (sqlVirtualMachineName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -184,7 +183,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -192,7 +191,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String sqlVirtualMachineName = Utils.getValueFromIdByName(id, "sqlVirtualMachines"); if (sqlVirtualMachineName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AdditionalFeaturesServerConfigurations.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AdditionalFeaturesServerConfigurations.java index ea807f2cd127b..ec3937d99f890 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AdditionalFeaturesServerConfigurations.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AdditionalFeaturesServerConfigurations.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Additional SQL Server feature settings. */ @Fluent public final class AdditionalFeaturesServerConfigurations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AdditionalFeaturesServerConfigurations.class); - /* * Enable or disable R services (SQL 2016 onwards). */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AgConfiguration.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AgConfiguration.java index 2457a21efe5f0..cd3ec0099bbd3 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AgConfiguration.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AgConfiguration.java @@ -4,21 +4,17 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Availability group configuration. */ -@Immutable +@Fluent public final class AgConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AgConfiguration.class); - /* * Replica configurations. */ - @JsonProperty(value = "replicas", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "replicas") private List replicas; /** @@ -30,6 +26,17 @@ public List replicas() { return this.replicas; } + /** + * Set the replicas property: Replica configurations. + * + * @param replicas the replicas value to set. + * @return the AgConfiguration object itself. + */ + public AgConfiguration withReplicas(List replicas) { + this.replicas = replicas; + return this; + } + /** * Validates the instance. * diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AgReplica.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AgReplica.java index 8a82a3fd634a6..d9f193eedb376 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AgReplica.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AgReplica.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Availability group replica configuration. */ @Fluent public final class AgReplica { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AgReplica.class); - /* * Sql VirtualMachine Instance Id. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AssessmentDayOfWeek.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AssessmentDayOfWeek.java new file mode 100644 index 0000000000000..6eee34a9c0f7c --- /dev/null +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AssessmentDayOfWeek.java @@ -0,0 +1,65 @@ +// 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.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for AssessmentDayOfWeek. */ +public enum AssessmentDayOfWeek { + /** Enum value Monday. */ + MONDAY("Monday"), + + /** Enum value Tuesday. */ + TUESDAY("Tuesday"), + + /** Enum value Wednesday. */ + WEDNESDAY("Wednesday"), + + /** Enum value Thursday. */ + THURSDAY("Thursday"), + + /** Enum value Friday. */ + FRIDAY("Friday"), + + /** Enum value Saturday. */ + SATURDAY("Saturday"), + + /** Enum value Sunday. */ + SUNDAY("Sunday"); + + /** The actual serialized value for a AssessmentDayOfWeek instance. */ + private final String value; + + AssessmentDayOfWeek(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AssessmentDayOfWeek instance. + * + * @param value the serialized value to parse. + * @return the parsed AssessmentDayOfWeek object, or null if unable to parse. + */ + @JsonCreator + public static AssessmentDayOfWeek fromString(String value) { + if (value == null) { + return null; + } + AssessmentDayOfWeek[] items = AssessmentDayOfWeek.values(); + for (AssessmentDayOfWeek item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AssessmentSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AssessmentSettings.java index ea25d5753c3bf..b35222327edf1 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AssessmentSettings.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AssessmentSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Configure assessment for databases in your SQL virtual machine. */ @Fluent public final class AssessmentSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AssessmentSettings.class); - /* * Enable or disable assessment feature on SQL virtual machine. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoBackupDaysOfWeek.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoBackupDaysOfWeek.java new file mode 100644 index 0000000000000..f851760972ea2 --- /dev/null +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoBackupDaysOfWeek.java @@ -0,0 +1,53 @@ +// 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; + +/** Defines values for AutoBackupDaysOfWeek. */ +public final class AutoBackupDaysOfWeek extends ExpandableStringEnum { + /** Static value Monday for AutoBackupDaysOfWeek. */ + public static final AutoBackupDaysOfWeek MONDAY = fromString("Monday"); + + /** Static value Tuesday for AutoBackupDaysOfWeek. */ + public static final AutoBackupDaysOfWeek TUESDAY = fromString("Tuesday"); + + /** Static value Wednesday for AutoBackupDaysOfWeek. */ + public static final AutoBackupDaysOfWeek WEDNESDAY = fromString("Wednesday"); + + /** Static value Thursday for AutoBackupDaysOfWeek. */ + public static final AutoBackupDaysOfWeek THURSDAY = fromString("Thursday"); + + /** Static value Friday for AutoBackupDaysOfWeek. */ + public static final AutoBackupDaysOfWeek FRIDAY = fromString("Friday"); + + /** Static value Saturday for AutoBackupDaysOfWeek. */ + public static final AutoBackupDaysOfWeek SATURDAY = fromString("Saturday"); + + /** Static value Sunday for AutoBackupDaysOfWeek. */ + public static final AutoBackupDaysOfWeek SUNDAY = fromString("Sunday"); + + /** + * Creates or finds a AutoBackupDaysOfWeek from its string representation. + * + * @param name a name to look for. + * @return the corresponding AutoBackupDaysOfWeek. + */ + @JsonCreator + public static AutoBackupDaysOfWeek fromString(String name) { + return fromString(name, AutoBackupDaysOfWeek.class); + } + + /** + * Gets known AutoBackupDaysOfWeek values. + * + * @return known AutoBackupDaysOfWeek values. + */ + public static Collection values() { + return values(AutoBackupDaysOfWeek.class); + } +} diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoBackupSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoBackupSettings.java index 4f3341d6938e7..6a30666898bc6 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoBackupSettings.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AutoBackupSettings.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Configure backups for databases in your SQL virtual machine. */ @Fluent public final class AutoBackupSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoBackupSettings.class); - /* * Enable or disable autobackup on SQL virtual machine. */ @@ -70,29 +66,25 @@ public final class AutoBackupSettings { private BackupScheduleType backupScheduleType; /* - * Frequency of full backups. In both cases, full backups begin during the - * next scheduled time window. + * Frequency of full backups. In both cases, full backups begin during the next scheduled time window. */ @JsonProperty(value = "fullBackupFrequency") private FullBackupFrequencyType fullBackupFrequency; /* - * Days of the week for the backups when FullBackupFrequency is set to - * Weekly. + * Days of the week for the backups when FullBackupFrequency is set to Weekly. */ @JsonProperty(value = "daysOfWeek") - private List daysOfWeek; + private List daysOfWeek; /* - * Start time of a given day during which full backups can take place. 0-23 - * hours. + * Start time of a given day during which full backups can take place. 0-23 hours. */ @JsonProperty(value = "fullBackupStartTime") private Integer fullBackupStartTime; /* - * Duration of the time window of a given day during which full backups can - * take place. 1-23 hours. + * Duration of the time window of a given day during which full backups can take place. 1-23 hours. */ @JsonProperty(value = "fullBackupWindowHours") private Integer fullBackupWindowHours; @@ -310,7 +302,7 @@ public AutoBackupSettings withFullBackupFrequency(FullBackupFrequencyType fullBa * * @return the daysOfWeek value. */ - public List daysOfWeek() { + public List daysOfWeek() { return this.daysOfWeek; } @@ -320,7 +312,7 @@ public List daysOfWeek() { * @param daysOfWeek the daysOfWeek value to set. * @return the AutoBackupSettings object itself. */ - public AutoBackupSettings withDaysOfWeek(List daysOfWeek) { + public AutoBackupSettings withDaysOfWeek(List daysOfWeek) { this.daysOfWeek = daysOfWeek; return this; } 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 ff7c6ac1a2afc..cbd0099c2985b 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Set a patching window during which Windows and SQL patches will be applied. */ @Fluent public final class AutoPatchingSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoPatchingSettings.class); - /* * Enable or disable autopatching on SQL virtual machine. */ 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 d49cf34a4c311..a2072d20c89b3 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 @@ -61,6 +61,13 @@ public interface AvailabilityGroupListener { */ List loadBalancerConfigurations(); + /** + * Gets the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG listener. + * + * @return the multiSubnetIpConfigurations value. + */ + List multiSubnetIpConfigurations(); + /** * Gets the createDefaultAvailabilityGroupIfNotExist property: Create a default availability group if it does not * exist. @@ -83,6 +90,13 @@ public interface AvailabilityGroupListener { */ AgConfiguration availabilityGroupConfiguration(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerInner object. * @@ -118,6 +132,7 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithAvailabilityGroupName, DefinitionStages.WithLoadBalancerConfigurations, + DefinitionStages.WithMultiSubnetIpConfigurations, DefinitionStages.WithCreateDefaultAvailabilityGroupIfNotExist, DefinitionStages.WithPort, DefinitionStages.WithAvailabilityGroupConfiguration { @@ -158,6 +173,17 @@ interface WithLoadBalancerConfigurations { */ WithCreate withLoadBalancerConfigurations(List loadBalancerConfigurations); } + /** The stage of the AvailabilityGroupListener definition allowing to specify multiSubnetIpConfigurations. */ + interface WithMultiSubnetIpConfigurations { + /** + * Specifies the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG + * listener.. + * + * @param multiSubnetIpConfigurations List of multi subnet IP configurations for an AG listener. + * @return the next definition stage. + */ + WithCreate withMultiSubnetIpConfigurations(List multiSubnetIpConfigurations); + } /** * The stage of the AvailabilityGroupListener definition allowing to specify * createDefaultAvailabilityGroupIfNotExist. @@ -204,6 +230,7 @@ interface WithAvailabilityGroupConfiguration { interface Update extends UpdateStages.WithAvailabilityGroupName, UpdateStages.WithLoadBalancerConfigurations, + UpdateStages.WithMultiSubnetIpConfigurations, UpdateStages.WithCreateDefaultAvailabilityGroupIfNotExist, UpdateStages.WithPort, UpdateStages.WithAvailabilityGroupConfiguration { @@ -246,6 +273,17 @@ interface WithLoadBalancerConfigurations { */ Update withLoadBalancerConfigurations(List loadBalancerConfigurations); } + /** The stage of the AvailabilityGroupListener update allowing to specify multiSubnetIpConfigurations. */ + interface WithMultiSubnetIpConfigurations { + /** + * Specifies the multiSubnetIpConfigurations property: List of multi subnet IP configurations for an AG + * listener.. + * + * @param multiSubnetIpConfigurations List of multi subnet IP configurations for an AG listener. + * @return the next definition stage. + */ + Update withMultiSubnetIpConfigurations(List multiSubnetIpConfigurations); + } /** * The stage of the AvailabilityGroupListener update allowing to specify * createDefaultAvailabilityGroupIfNotExist. diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AvailabilityGroupListenerListResult.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AvailabilityGroupListenerListResult.java index 95192ddfdc41f..cd5f98be150f6 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AvailabilityGroupListenerListResult.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/AvailabilityGroupListenerListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.AvailabilityGroupListenerInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of availability group listeners. */ @Immutable public final class AvailabilityGroupListenerListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityGroupListenerListResult.class); - /* * Array of results. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/BackupScheduleType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/BackupScheduleType.java index 89e078d05b501..0056ec8b285db 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/BackupScheduleType.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/BackupScheduleType.java @@ -27,7 +27,11 @@ public static BackupScheduleType fromString(String name) { return fromString(name, BackupScheduleType.class); } - /** @return known BackupScheduleType values. */ + /** + * Gets known BackupScheduleType values. + * + * @return known BackupScheduleType values. + */ public static Collection values() { return values(BackupScheduleType.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterConfiguration.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterConfiguration.java index bee2cf37b97f0..97318c7924a27 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterConfiguration.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterConfiguration.java @@ -24,7 +24,11 @@ public static ClusterConfiguration fromString(String name) { return fromString(name, ClusterConfiguration.class); } - /** @return known ClusterConfiguration values. */ + /** + * Gets known ClusterConfiguration values. + * + * @return known ClusterConfiguration values. + */ public static Collection values() { return values(ClusterConfiguration.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterManagerType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterManagerType.java index a0a175faa7750..c9530ed9fbe9f 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterManagerType.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterManagerType.java @@ -24,7 +24,11 @@ public static ClusterManagerType fromString(String name) { return fromString(name, ClusterManagerType.class); } - /** @return known ClusterManagerType values. */ + /** + * Gets known ClusterManagerType values. + * + * @return known ClusterManagerType values. + */ public static Collection values() { return values(ClusterManagerType.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterSubnetType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterSubnetType.java new file mode 100644 index 0000000000000..4dc9b8fe86e93 --- /dev/null +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ClusterSubnetType.java @@ -0,0 +1,38 @@ +// 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; + +/** Defines values for ClusterSubnetType. */ +public final class ClusterSubnetType extends ExpandableStringEnum { + /** Static value SingleSubnet for ClusterSubnetType. */ + public static final ClusterSubnetType SINGLE_SUBNET = fromString("SingleSubnet"); + + /** Static value MultiSubnet for ClusterSubnetType. */ + public static final ClusterSubnetType MULTI_SUBNET = fromString("MultiSubnet"); + + /** + * Creates or finds a ClusterSubnetType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterSubnetType. + */ + @JsonCreator + public static ClusterSubnetType fromString(String name) { + return fromString(name, ClusterSubnetType.class); + } + + /** + * Gets known ClusterSubnetType values. + * + * @return known ClusterSubnetType values. + */ + public static Collection values() { + return values(ClusterSubnetType.class); + } +} 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 a71c7c303bcea..99cb95e83aa56 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 @@ -27,7 +27,11 @@ public static Commit fromString(String name) { return fromString(name, Commit.class); } - /** @return known Commit values. */ + /** + * Gets known Commit values. + * + * @return known Commit values. + */ public static Collection values() { return values(Commit.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ConnectivityType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ConnectivityType.java index 37cb81a8397e7..f576670139e1a 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ConnectivityType.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ConnectivityType.java @@ -30,7 +30,11 @@ public static ConnectivityType fromString(String name) { return fromString(name, ConnectivityType.class); } - /** @return known ConnectivityType values. */ + /** + * Gets known ConnectivityType values. + * + * @return known ConnectivityType values. + */ public static Collection values() { return values(ConnectivityType.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DayOfWeek.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DayOfWeek.java index 20f68bc2632f8..9b83818b0dbeb 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DayOfWeek.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DayOfWeek.java @@ -9,6 +9,9 @@ /** Defines values for DayOfWeek. */ public enum DayOfWeek { + /** Enum value Everyday. */ + EVERYDAY("Everyday"), + /** Enum value Monday. */ MONDAY("Monday"), @@ -45,6 +48,9 @@ public enum DayOfWeek { */ @JsonCreator public static DayOfWeek fromString(String value) { + if (value == null) { + return null; + } DayOfWeek[] items = DayOfWeek.values(); for (DayOfWeek item : items) { if (item.toString().equalsIgnoreCase(value)) { diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DaysOfWeek.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DaysOfWeek.java deleted file mode 100644 index 6332ebd405787..0000000000000 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DaysOfWeek.java +++ /dev/null @@ -1,49 +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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DaysOfWeek. */ -public final class DaysOfWeek extends ExpandableStringEnum { - /** Static value Monday for DaysOfWeek. */ - public static final DaysOfWeek MONDAY = fromString("Monday"); - - /** Static value Tuesday for DaysOfWeek. */ - public static final DaysOfWeek TUESDAY = fromString("Tuesday"); - - /** Static value Wednesday for DaysOfWeek. */ - public static final DaysOfWeek WEDNESDAY = fromString("Wednesday"); - - /** Static value Thursday for DaysOfWeek. */ - public static final DaysOfWeek THURSDAY = fromString("Thursday"); - - /** Static value Friday for DaysOfWeek. */ - public static final DaysOfWeek FRIDAY = fromString("Friday"); - - /** Static value Saturday for DaysOfWeek. */ - public static final DaysOfWeek SATURDAY = fromString("Saturday"); - - /** Static value Sunday for DaysOfWeek. */ - public static final DaysOfWeek SUNDAY = fromString("Sunday"); - - /** - * Creates or finds a DaysOfWeek from its string representation. - * - * @param name a name to look for. - * @return the corresponding DaysOfWeek. - */ - @JsonCreator - public static DaysOfWeek fromString(String name) { - return fromString(name, DaysOfWeek.class); - } - - /** @return known DaysOfWeek values. */ - public static Collection values() { - return values(DaysOfWeek.class); - } -} diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DiskConfigurationType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DiskConfigurationType.java index 5a6d549939114..524ab1bde79a7 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DiskConfigurationType.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/DiskConfigurationType.java @@ -30,7 +30,11 @@ public static DiskConfigurationType fromString(String name) { return fromString(name, DiskConfigurationType.class); } - /** @return known DiskConfigurationType values. */ + /** + * Gets known DiskConfigurationType values. + * + * @return known DiskConfigurationType values. + */ public static Collection values() { return values(DiskConfigurationType.class); } 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 634c1314693f4..558426ad4c356 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 @@ -27,7 +27,11 @@ public static Failover fromString(String name) { return fromString(name, Failover.class); } - /** @return known Failover values. */ + /** + * Gets known Failover values. + * + * @return known Failover values. + */ public static Collection values() { return values(Failover.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/FullBackupFrequencyType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/FullBackupFrequencyType.java index fa898d61e85fc..ff78a472a1f3d 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/FullBackupFrequencyType.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/FullBackupFrequencyType.java @@ -27,7 +27,11 @@ public static FullBackupFrequencyType fromString(String name) { return fromString(name, FullBackupFrequencyType.class); } - /** @return known FullBackupFrequencyType values. */ + /** + * Gets known FullBackupFrequencyType values. + * + * @return known FullBackupFrequencyType values. + */ public static Collection values() { return values(FullBackupFrequencyType.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/IdentityType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/IdentityType.java index 900b7dc9a6df0..26c249a59c506 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/IdentityType.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/IdentityType.java @@ -27,7 +27,11 @@ public static IdentityType fromString(String name) { return fromString(name, IdentityType.class); } - /** @return known IdentityType values. */ + /** + * Gets known IdentityType values. + * + * @return known IdentityType values. + */ public static Collection values() { return values(IdentityType.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/KeyVaultCredentialSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/KeyVaultCredentialSettings.java index d912658efee0f..43d6330b2949f 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/KeyVaultCredentialSettings.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/KeyVaultCredentialSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Configure your SQL virtual machine to be able to connect to the Azure Key Vault service. */ @Fluent public final class KeyVaultCredentialSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyVaultCredentialSettings.class); - /* * Enable or disable key vault credential setting. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/LoadBalancerConfiguration.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/LoadBalancerConfiguration.java index b78b9f74fcef2..9574f5a359985 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/LoadBalancerConfiguration.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/LoadBalancerConfiguration.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A load balancer configuration for an availability group listener. */ @Fluent public final class LoadBalancerConfiguration { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LoadBalancerConfiguration.class); - /* * Private IP address. */ @@ -40,8 +36,7 @@ public final class LoadBalancerConfiguration { private Integer probePort; /* - * List of the SQL virtual machine instance resource id's that are enrolled - * into the availability group listener. + * List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener. */ @JsonProperty(value = "sqlVirtualMachineInstances") private List sqlVirtualMachineInstances; diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/MultiSubnetIpConfiguration.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/MultiSubnetIpConfiguration.java new file mode 100644 index 0000000000000..658d8fdf04c09 --- /dev/null +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/MultiSubnetIpConfiguration.java @@ -0,0 +1,91 @@ +// 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.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Multi subnet ip configuration for an availability group listener. */ +@Fluent +public final class MultiSubnetIpConfiguration { + /* + * Private IP address. + */ + @JsonProperty(value = "privateIpAddress", required = true) + private PrivateIpAddress privateIpAddress; + + /* + * SQL virtual machine instance resource id that are enrolled into the availability group listener. + */ + @JsonProperty(value = "sqlVirtualMachineInstance", required = true) + private String sqlVirtualMachineInstance; + + /** + * Get the privateIpAddress property: Private IP address. + * + * @return the privateIpAddress value. + */ + public PrivateIpAddress privateIpAddress() { + return this.privateIpAddress; + } + + /** + * Set the privateIpAddress property: Private IP address. + * + * @param privateIpAddress the privateIpAddress value to set. + * @return the MultiSubnetIpConfiguration object itself. + */ + public MultiSubnetIpConfiguration withPrivateIpAddress(PrivateIpAddress privateIpAddress) { + this.privateIpAddress = privateIpAddress; + return this; + } + + /** + * Get the sqlVirtualMachineInstance property: SQL virtual machine instance resource id that are enrolled into the + * availability group listener. + * + * @return the sqlVirtualMachineInstance value. + */ + public String sqlVirtualMachineInstance() { + return this.sqlVirtualMachineInstance; + } + + /** + * Set the sqlVirtualMachineInstance property: SQL virtual machine instance resource id that are enrolled into the + * availability group listener. + * + * @param sqlVirtualMachineInstance the sqlVirtualMachineInstance value to set. + * @return the MultiSubnetIpConfiguration object itself. + */ + public MultiSubnetIpConfiguration withSqlVirtualMachineInstance(String sqlVirtualMachineInstance) { + this.sqlVirtualMachineInstance = sqlVirtualMachineInstance; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateIpAddress() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property privateIpAddress in model MultiSubnetIpConfiguration")); + } else { + privateIpAddress().validate(); + } + if (sqlVirtualMachineInstance() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sqlVirtualMachineInstance in model MultiSubnetIpConfiguration")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(MultiSubnetIpConfiguration.class); +} diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationDisplay.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationDisplay.java index 95e4d44818ae8..c110ca5216707 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationDisplay.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Display metadata associated with the operation. */ @Immutable public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * The localized friendly form of the resource provider name. */ @@ -21,8 +17,7 @@ public final class OperationDisplay { private String provider; /* - * The localized friendly form of the resource type related to this - * action/operation. + * The localized friendly form of the resource type related to this action/operation. */ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationListResult.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationListResult.java index 9e57681352355..9f1be4ed49cbf 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationListResult.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Result of the request to list SQL operations. */ @Immutable public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - /* * Array of results. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationOrigin.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationOrigin.java index d45b4d1d13fa5..353902b73fb19 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationOrigin.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/OperationOrigin.java @@ -27,7 +27,11 @@ public static OperationOrigin fromString(String name) { return fromString(name, OperationOrigin.class); } - /** @return known OperationOrigin values. */ + /** + * Gets known OperationOrigin values. + * + * @return known OperationOrigin values. + */ public static Collection values() { return values(OperationOrigin.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/PrivateIpAddress.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/PrivateIpAddress.java index 0e7a115b1a6f5..fda692625b205 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/PrivateIpAddress.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/PrivateIpAddress.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A private IP address bound to the availability group listener. */ @Fluent public final class PrivateIpAddress { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateIpAddress.class); - /* * Private IP address bound to the availability group listener. */ 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 852c255639a53..ff6eda359fb3c 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 @@ -30,7 +30,11 @@ public static ReadableSecondary fromString(String name) { return fromString(name, ReadableSecondary.class); } - /** @return known ReadableSecondary values. */ + /** + * Gets known ReadableSecondary values. + * + * @return known ReadableSecondary values. + */ public static Collection values() { return values(ReadableSecondary.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ResourceIdentity.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ResourceIdentity.java index 0ede322d44116..a4603580bbeb5 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ResourceIdentity.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ResourceIdentity.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; /** Azure Active Directory identity configuration for a resource. */ @Fluent public class ResourceIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceIdentity.class); - /* * The Azure Active Directory principal id. */ @@ -22,9 +18,8 @@ public class ResourceIdentity { private UUID principalId; /* - * The identity type. Set this to 'SystemAssigned' in order to - * automatically create and assign an Azure Active Directory principal for - * the resource. + * The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active + * Directory principal for the resource. */ @JsonProperty(value = "type") private IdentityType type; 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 2dced7199d7c3..3d9c796aa4263 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 @@ -27,7 +27,11 @@ public static Role fromString(String name) { return fromString(name, Role.class); } - /** @return known Role values. */ + /** + * Gets known Role values. + * + * @return known Role values. + */ public static Collection values() { return values(Role.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ScaleType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ScaleType.java index 2b9eacd7de4f6..d848dacc742a3 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ScaleType.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ScaleType.java @@ -24,7 +24,11 @@ public static ScaleType fromString(String name) { return fromString(name, ScaleType.class); } - /** @return known ScaleType values. */ + /** + * Gets known ScaleType values. + * + * @return known ScaleType values. + */ public static Collection values() { return values(ScaleType.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Schedule.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Schedule.java index 752dcb8914d05..0a2cf09ee81f9 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Schedule.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/Schedule.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The Schedule model. */ @Fluent public final class Schedule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Schedule.class); - /* * Enable or disable assessment schedule on SQL virtual machine. */ @@ -21,15 +17,14 @@ public final class Schedule { private Boolean enable; /* - * Number of weeks to schedule between 2 assessment runs. Takes value from - * 1-6 + * Number of weeks to schedule between 2 assessment runs. Takes value from 1-6 */ @JsonProperty(value = "weeklyInterval") private Integer weeklyInterval; /* - * Occurrence of the DayOfWeek day within a month to schedule assessment. - * Takes values: 1,2,3,4 and -1. Use -1 for last DayOfWeek day of the month + * Occurrence of the DayOfWeek day within a month to schedule assessment. Takes values: 1,2,3,4 and -1. Use -1 for + * last DayOfWeek day of the month */ @JsonProperty(value = "monthlyOccurrence") private Integer monthlyOccurrence; @@ -38,7 +33,7 @@ public final class Schedule { * Day of the week to run assessment. */ @JsonProperty(value = "dayOfWeek") - private DayOfWeek dayOfWeek; + private AssessmentDayOfWeek dayOfWeek; /* * Time of the day in HH:mm format. Eg. 17:30 @@ -113,7 +108,7 @@ public Schedule withMonthlyOccurrence(Integer monthlyOccurrence) { * * @return the dayOfWeek value. */ - public DayOfWeek dayOfWeek() { + public AssessmentDayOfWeek dayOfWeek() { return this.dayOfWeek; } @@ -123,7 +118,7 @@ public DayOfWeek dayOfWeek() { * @param dayOfWeek the dayOfWeek value to set. * @return the Schedule object itself. */ - public Schedule withDayOfWeek(DayOfWeek dayOfWeek) { + public Schedule withDayOfWeek(AssessmentDayOfWeek dayOfWeek) { this.dayOfWeek = dayOfWeek; return this; } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ServerConfigurationsManagementSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ServerConfigurationsManagementSettings.java index 9f99425aa4be9..a360bae91647a 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ServerConfigurationsManagementSettings.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/ServerConfigurationsManagementSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Set the connectivity, storage and workload settings. */ @Fluent public final class ServerConfigurationsManagementSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerConfigurationsManagementSettings.class); - /* * SQL connectivity type settings. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlConnectivityUpdateSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlConnectivityUpdateSettings.java index 0ea9515472e42..bf59c84bfb186 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlConnectivityUpdateSettings.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlConnectivityUpdateSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Set the access level and network port settings for SQL Server. */ @Fluent public final class SqlConnectivityUpdateSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlConnectivityUpdateSettings.class); - /* * SQL Server connectivity option. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlImageSku.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlImageSku.java index 4d43156366934..e6e619641e768 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlImageSku.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlImageSku.java @@ -36,7 +36,11 @@ public static SqlImageSku fromString(String name) { return fromString(name, SqlImageSku.class); } - /** @return known SqlImageSku values. */ + /** + * Gets known SqlImageSku values. + * + * @return known SqlImageSku values. + */ public static Collection values() { return values(SqlImageSku.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlInstanceSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlInstanceSettings.java index f315be86eb101..dcff040910e62 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlInstanceSettings.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlInstanceSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Set the server/instance-level settings for SQL Server. */ @Fluent public final class SqlInstanceSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlInstanceSettings.class); - /* * SQL Server Collation. */ @@ -44,6 +40,18 @@ public final class SqlInstanceSettings { @JsonProperty(value = "maxServerMemoryMB") private Integer maxServerMemoryMB; + /* + * SQL Server LPIM. + */ + @JsonProperty(value = "isLpimEnabled") + private Boolean isLpimEnabled; + + /* + * SQL Server IFI. + */ + @JsonProperty(value = "isIfiEnabled") + private Boolean isIfiEnabled; + /** * Get the collation property: SQL Server Collation. * @@ -144,6 +152,46 @@ public SqlInstanceSettings withMaxServerMemoryMB(Integer maxServerMemoryMB) { return this; } + /** + * Get the isLpimEnabled property: SQL Server LPIM. + * + * @return the isLpimEnabled value. + */ + public Boolean isLpimEnabled() { + return this.isLpimEnabled; + } + + /** + * Set the isLpimEnabled property: SQL Server LPIM. + * + * @param isLpimEnabled the isLpimEnabled value to set. + * @return the SqlInstanceSettings object itself. + */ + public SqlInstanceSettings withIsLpimEnabled(Boolean isLpimEnabled) { + this.isLpimEnabled = isLpimEnabled; + return this; + } + + /** + * Get the isIfiEnabled property: SQL Server IFI. + * + * @return the isIfiEnabled value. + */ + public Boolean isIfiEnabled() { + return this.isIfiEnabled; + } + + /** + * Set the isIfiEnabled property: SQL Server IFI. + * + * @param isIfiEnabled the isIfiEnabled value to set. + * @return the SqlInstanceSettings object itself. + */ + public SqlInstanceSettings withIsIfiEnabled(Boolean isIfiEnabled) { + this.isIfiEnabled = isIfiEnabled; + return this; + } + /** * Validates the instance. * 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 9cc19ad08525c..d3bb293781fa5 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 @@ -30,7 +30,11 @@ public static SqlManagementMode fromString(String name) { return fromString(name, SqlManagementMode.class); } - /** @return known SqlManagementMode values. */ + /** + * Gets known SqlManagementMode values. + * + * @return known SqlManagementMode values. + */ public static Collection values() { return values(SqlManagementMode.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlServerLicenseType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlServerLicenseType.java index ca0c3f96581e8..2eafe9dc1eb0f 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlServerLicenseType.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlServerLicenseType.java @@ -30,7 +30,11 @@ public static SqlServerLicenseType fromString(String name) { return fromString(name, SqlServerLicenseType.class); } - /** @return known SqlServerLicenseType values. */ + /** + * Gets known SqlServerLicenseType values. + * + * @return known SqlServerLicenseType values. + */ public static Collection values() { return values(SqlServerLicenseType.class); } 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 c2c6ac5a7e0c9..88b6fc573a655 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Set disk storage settings for SQL Server. */ @Fluent public final class SqlStorageSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlStorageSettings.class); - /* * Logical Unit Numbers for the disks. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlStorageUpdateSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlStorageUpdateSettings.java index ae33fb9801994..d640f42f175ed 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlStorageUpdateSettings.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlStorageUpdateSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Set disk storage settings for SQL Server. */ @Fluent public final class SqlStorageUpdateSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlStorageUpdateSettings.class); - /* * Virtual machine disk count. */ 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 34c50c839abf5..c1455cde1908d 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 @@ -5,46 +5,54 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The SqlTempDbSettings model. */ @Fluent public final class SqlTempDbSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlTempDbSettings.class); - /* - * SQL Server default file size + * SQL Server tempdb data file size */ @JsonProperty(value = "dataFileSize") private Integer dataFileSize; /* - * SQL Server default file autoGrowth size + * SQL Server tempdb data file autoGrowth size */ @JsonProperty(value = "dataGrowth") private Integer dataGrowth; /* - * SQL Server default file size + * SQL Server tempdb log file size */ @JsonProperty(value = "logFileSize") private Integer logFileSize; /* - * SQL Server default file autoGrowth size + * SQL Server tempdb log file autoGrowth size */ @JsonProperty(value = "logGrowth") private Integer logGrowth; /* - * SQL Server default file count + * SQL Server tempdb data file count */ @JsonProperty(value = "dataFileCount") private Integer dataFileCount; + /* + * SQL Server tempdb persist folder choice + */ + @JsonProperty(value = "persistFolder") + private Boolean persistFolder; + + /* + * SQL Server tempdb persist folder location + */ + @JsonProperty(value = "persistFolderPath") + private String persistFolderPath; + /* * Logical Unit Numbers for the disks. */ @@ -58,7 +66,7 @@ public final class SqlTempDbSettings { private String defaultFilePath; /** - * Get the dataFileSize property: SQL Server default file size. + * Get the dataFileSize property: SQL Server tempdb data file size. * * @return the dataFileSize value. */ @@ -67,7 +75,7 @@ public Integer dataFileSize() { } /** - * Set the dataFileSize property: SQL Server default file size. + * Set the dataFileSize property: SQL Server tempdb data file size. * * @param dataFileSize the dataFileSize value to set. * @return the SqlTempDbSettings object itself. @@ -78,7 +86,7 @@ public SqlTempDbSettings withDataFileSize(Integer dataFileSize) { } /** - * Get the dataGrowth property: SQL Server default file autoGrowth size. + * Get the dataGrowth property: SQL Server tempdb data file autoGrowth size. * * @return the dataGrowth value. */ @@ -87,7 +95,7 @@ public Integer dataGrowth() { } /** - * Set the dataGrowth property: SQL Server default file autoGrowth size. + * Set the dataGrowth property: SQL Server tempdb data file autoGrowth size. * * @param dataGrowth the dataGrowth value to set. * @return the SqlTempDbSettings object itself. @@ -98,7 +106,7 @@ public SqlTempDbSettings withDataGrowth(Integer dataGrowth) { } /** - * Get the logFileSize property: SQL Server default file size. + * Get the logFileSize property: SQL Server tempdb log file size. * * @return the logFileSize value. */ @@ -107,7 +115,7 @@ public Integer logFileSize() { } /** - * Set the logFileSize property: SQL Server default file size. + * Set the logFileSize property: SQL Server tempdb log file size. * * @param logFileSize the logFileSize value to set. * @return the SqlTempDbSettings object itself. @@ -118,7 +126,7 @@ public SqlTempDbSettings withLogFileSize(Integer logFileSize) { } /** - * Get the logGrowth property: SQL Server default file autoGrowth size. + * Get the logGrowth property: SQL Server tempdb log file autoGrowth size. * * @return the logGrowth value. */ @@ -127,7 +135,7 @@ public Integer logGrowth() { } /** - * Set the logGrowth property: SQL Server default file autoGrowth size. + * Set the logGrowth property: SQL Server tempdb log file autoGrowth size. * * @param logGrowth the logGrowth value to set. * @return the SqlTempDbSettings object itself. @@ -138,7 +146,7 @@ public SqlTempDbSettings withLogGrowth(Integer logGrowth) { } /** - * Get the dataFileCount property: SQL Server default file count. + * Get the dataFileCount property: SQL Server tempdb data file count. * * @return the dataFileCount value. */ @@ -147,7 +155,7 @@ public Integer dataFileCount() { } /** - * Set the dataFileCount property: SQL Server default file count. + * Set the dataFileCount property: SQL Server tempdb data file count. * * @param dataFileCount the dataFileCount value to set. * @return the SqlTempDbSettings object itself. @@ -157,6 +165,46 @@ public SqlTempDbSettings withDataFileCount(Integer dataFileCount) { return this; } + /** + * Get the persistFolder property: SQL Server tempdb persist folder choice. + * + * @return the persistFolder value. + */ + public Boolean persistFolder() { + return this.persistFolder; + } + + /** + * Set the persistFolder property: SQL Server tempdb persist folder choice. + * + * @param persistFolder the persistFolder value to set. + * @return the SqlTempDbSettings object itself. + */ + public SqlTempDbSettings withPersistFolder(Boolean persistFolder) { + this.persistFolder = persistFolder; + return this; + } + + /** + * Get the persistFolderPath property: SQL Server tempdb persist folder location. + * + * @return the persistFolderPath value. + */ + public String persistFolderPath() { + return this.persistFolderPath; + } + + /** + * Set the persistFolderPath property: SQL Server tempdb persist folder location. + * + * @param persistFolderPath the persistFolderPath value to set. + * @return the SqlTempDbSettings object itself. + */ + public SqlTempDbSettings withPersistFolderPath(String persistFolderPath) { + this.persistFolderPath = persistFolderPath; + return this; + } + /** * Get the luns property: Logical Unit Numbers for the disks. * 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 f9ae74c3c7bb5..a862ef2d020ca 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 @@ -120,6 +120,14 @@ public interface SqlVirtualMachine { */ WsfcDomainCredentials wsfcDomainCredentials(); + /** + * Gets the wsfcStaticIp property: Domain credentials for setting up Windows Server Failover Cluster for SQL + * availability group. + * + * @return the wsfcStaticIp value. + */ + String wsfcStaticIp(); + /** * Gets the autoPatchingSettings property: Auto patching settings for applying critical security updates to SQL * virtual machine. @@ -177,6 +185,13 @@ public interface SqlVirtualMachine { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVirtualMachineInner object. * @@ -238,6 +253,7 @@ interface WithCreate DefinitionStages.WithSqlManagement, DefinitionStages.WithSqlImageSku, DefinitionStages.WithWsfcDomainCredentials, + DefinitionStages.WithWsfcStaticIp, DefinitionStages.WithAutoPatchingSettings, DefinitionStages.WithAutoBackupSettings, DefinitionStages.WithKeyVaultCredentialSettings, @@ -343,6 +359,18 @@ interface WithWsfcDomainCredentials { */ WithCreate withWsfcDomainCredentials(WsfcDomainCredentials wsfcDomainCredentials); } + /** The stage of the SqlVirtualMachine definition allowing to specify wsfcStaticIp. */ + interface WithWsfcStaticIp { + /** + * Specifies the wsfcStaticIp property: Domain credentials for setting up Windows Server Failover Cluster + * for SQL availability group.. + * + * @param wsfcStaticIp Domain credentials for setting up Windows Server Failover Cluster for SQL + * availability group. + * @return the next definition stage. + */ + WithCreate withWsfcStaticIp(String wsfcStaticIp); + } /** The stage of the SqlVirtualMachine definition allowing to specify autoPatchingSettings. */ interface WithAutoPatchingSettings { /** 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 c96d2605649f5..2f95780818de1 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 @@ -118,6 +118,13 @@ public interface SqlVirtualMachineGroup { */ String regionName(); + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVirtualMachineGroupInner object. * diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroupListResult.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroupListResult.java index 8bac0821f8f48..2686d4977d44a 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroupListResult.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroupListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVirtualMachineGroupInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of SQL virtual machine groups. */ @Immutable public final class SqlVirtualMachineGroupListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupListResult.class); - /* * Array of results. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroupUpdate.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroupUpdate.java index 47019f3567cbd..d70272aea2aac 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroupUpdate.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineGroupUpdate.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** An update to a SQL virtual machine group. */ @Fluent public final class SqlVirtualMachineGroupUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineGroupUpdate.class); - /* * Resource tags. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineListResult.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineListResult.java index ec58693068da7..80862b85fa5c9 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineListResult.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.sqlvirtualmachine.fluent.models.SqlVirtualMachineInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of SQL virtual machines. */ @Immutable public final class SqlVirtualMachineListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineListResult.class); - /* * Array of results. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineUpdate.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineUpdate.java index 232ee4674c3fb..067fbd5bd3f15 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineUpdate.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVirtualMachineUpdate.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** An update to a SQL virtual machine. */ @Fluent public final class SqlVirtualMachineUpdate { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlVirtualMachineUpdate.class); - /* * Resource tags. */ 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 da22c4642a849..57168d5a12a7d 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,7 +61,7 @@ PagedIterable listBySqlVmGroup( PagedIterable list(Context context); /** - * Uninstalls and reinstalls the SQL Iaas Extension. + * 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. @@ -69,24 +69,28 @@ PagedIterable listBySqlVmGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a SQL virtual machine. */ - void redeploy(String resourceGroupName, String sqlVirtualMachineName); + SqlVirtualMachine getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName); /** - * Uninstalls and reinstalls the SQL Iaas Extension. + * 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}. */ - void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context); + Response getByResourceGroupWithResponse( + String resourceGroupName, String sqlVirtualMachineName, String expand, Context context); /** - * Gets a 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. @@ -94,75 +98,71 @@ PagedIterable listBySqlVmGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SQL virtual machine. */ - SqlVirtualMachine getByResourceGroup(String resourceGroupName, String sqlVirtualMachineName); + void deleteByResourceGroup(String resourceGroupName, String sqlVirtualMachineName); /** - * Gets a 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. * @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 delete(String resourceGroupName, String sqlVirtualMachineName, Context context); /** - * Deletes a SQL virtual machine. + * 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 deleteByResourceGroup(String resourceGroupName, String sqlVirtualMachineName); + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Deletes a SQL virtual machine. + * 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 delete(String resourceGroupName, String sqlVirtualMachineName, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Gets all SQL virtual machines in a resource group. + * Uninstalls and reinstalls the SQL Iaas Extension. * * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from * the Azure Resource Manager API or the portal. + * @param sqlVirtualMachineName Name of the SQL virtual machine. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName); + void redeploy(String resourceGroupName, String sqlVirtualMachineName); /** - * Gets all SQL virtual machines in a resource group. + * Uninstalls and reinstalls the SQL Iaas Extension. * * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this value from * the Azure Resource Manager API or the portal. + * @param sqlVirtualMachineName Name of the SQL virtual machine. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all SQL virtual machines in a resource group as paginated response with {@link PagedIterable}. */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); + void redeploy(String resourceGroupName, String sqlVirtualMachineName, Context context); /** * Starts Assessment on SQL virtual machine. diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVmGroupImageSku.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVmGroupImageSku.java index 4acd11294c111..e3dc8eefffcc8 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVmGroupImageSku.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlVmGroupImageSku.java @@ -27,7 +27,11 @@ public static SqlVmGroupImageSku fromString(String name) { return fromString(name, SqlVmGroupImageSku.class); } - /** @return known SqlVmGroupImageSku values. */ + /** + * Gets known SqlVmGroupImageSku values. + * + * @return known SqlVmGroupImageSku values. + */ public static Collection values() { return values(SqlVmGroupImageSku.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlWorkloadType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlWorkloadType.java index cb499a0692f59..8315990c4b7f0 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlWorkloadType.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlWorkloadType.java @@ -30,7 +30,11 @@ public static SqlWorkloadType fromString(String name) { return fromString(name, SqlWorkloadType.class); } - /** @return known SqlWorkloadType values. */ + /** + * Gets known SqlWorkloadType values. + * + * @return known SqlWorkloadType values. + */ public static Collection values() { return values(SqlWorkloadType.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlWorkloadTypeUpdateSettings.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlWorkloadTypeUpdateSettings.java index 4c9ed5c75db2a..73b01523bdfab 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlWorkloadTypeUpdateSettings.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/SqlWorkloadTypeUpdateSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Set workload type to optimize storage for SQL Server. */ @Fluent public final class SqlWorkloadTypeUpdateSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlWorkloadTypeUpdateSettings.class); - /* * SQL Server workload type. */ 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 c49a1696e58b3..d8d4ee023ee65 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Storage Configurations for SQL Data, Log and TempDb. */ @Fluent public final class StorageConfigurationSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageConfigurationSettings.class); - /* * SQL Server Data Storage Settings. */ diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/StorageWorkloadType.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/StorageWorkloadType.java index f97af5175c68e..dac4131e8a5d0 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/StorageWorkloadType.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/StorageWorkloadType.java @@ -30,7 +30,11 @@ public static StorageWorkloadType fromString(String name) { return fromString(name, StorageWorkloadType.class); } - /** @return known StorageWorkloadType values. */ + /** + * Gets known StorageWorkloadType values. + * + * @return known StorageWorkloadType values. + */ public static Collection values() { return values(StorageWorkloadType.class); } diff --git a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/WsfcDomainCredentials.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/WsfcDomainCredentials.java index c93600bdd2a62..8ca5a74b7f06a 100644 --- a/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/WsfcDomainCredentials.java +++ b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/main/java/com/azure/resourcemanager/sqlvirtualmachine/models/WsfcDomainCredentials.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. */ @Fluent public final class WsfcDomainCredentials { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WsfcDomainCredentials.class); - /* * Cluster bootstrap account password. */ 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 6e96dcc5eaa25..f04abed27fab9 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 @@ -5,15 +5,11 @@ package com.azure.resourcemanager.sqlvirtualmachine.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Active Directory account details to operate Windows Server Failover Cluster. */ @Fluent public final class WsfcDomainProfile { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WsfcDomainProfile.class); - /* * Fully qualified name of the domain. */ @@ -27,23 +23,20 @@ public final class WsfcDomainProfile { private String ouPath; /* - * Account name used for creating cluster (at minimum needs permissions to - * 'Create Computer Objects' in domain). + * Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain). */ @JsonProperty(value = "clusterBootstrapAccount") private String clusterBootstrapAccount; /* - * Account name used for operating cluster i.e. will be part of - * administrators group on all the participating virtual machines in the - * cluster. + * Account name used for operating cluster i.e. will be part of administrators group on all the participating + * virtual machines in the cluster. */ @JsonProperty(value = "clusterOperatorAccount") private String clusterOperatorAccount; /* - * Account name under which SQL service will run on all participating SQL - * virtual machines in the cluster. + * Account name under which SQL service will run on all participating SQL virtual machines in the cluster. */ @JsonProperty(value = "sqlServiceAccount") private String sqlServiceAccount; @@ -66,6 +59,12 @@ public final class WsfcDomainProfile { @JsonProperty(value = "storageAccountPrimaryKey") private String storageAccountPrimaryKey; + /* + * Cluster subnet type. + */ + @JsonProperty(value = "clusterSubnetType") + private ClusterSubnetType clusterSubnetType; + /** * Get the domainFqdn property: Fully qualified name of the domain. * @@ -232,6 +231,26 @@ public WsfcDomainProfile withStorageAccountPrimaryKey(String storageAccountPrima return this; } + /** + * Get the clusterSubnetType property: Cluster subnet type. + * + * @return the clusterSubnetType value. + */ + public ClusterSubnetType clusterSubnetType() { + return this.clusterSubnetType; + } + + /** + * Set the clusterSubnetType property: Cluster subnet type. + * + * @param clusterSubnetType the clusterSubnetType value to set. + * @return the WsfcDomainProfile object itself. + */ + public WsfcDomainProfile withClusterSubnetType(ClusterSubnetType clusterSubnetType) { + this.clusterSubnetType = clusterSubnetType; + return this; + } + /** * Validates the instance. * 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 ae4023cd6850f..208abec24ca04 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 @@ -5,21 +5,24 @@ package com.azure.resourcemanager.sqlvirtualmachine.generated; import com.azure.resourcemanager.sqlvirtualmachine.models.LoadBalancerConfiguration; +import com.azure.resourcemanager.sqlvirtualmachine.models.MultiSubnetIpConfiguration; import com.azure.resourcemanager.sqlvirtualmachine.models.PrivateIpAddress; import java.util.Arrays; /** Samples for AvailabilityGroupListeners CreateOrUpdate. */ public final class AvailabilityGroupListenersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateAvailabilityGroupListener.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateAvailabilityGroupListener.json */ /** - * Sample code: Creates or updates an availability group listener. + * Sample code: Creates or updates an availability group listener using load balancer. This is used for VMs present + * in single subnet. * * @param manager Entry point to SqlVirtualMachineManager. */ - public static void createsOrUpdatesAnAvailabilityGroupListener( - com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) { + public static void + createsOrUpdatesAnAvailabilityGroupListenerUsingLoadBalancerThisIsUsedForVMsPresentInSingleSubnet( + com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) { manager .availabilityGroupListeners() .define("agl-test") @@ -45,4 +48,42 @@ public static void createsOrUpdatesAnAvailabilityGroupListener( .withPort(1433) .create(); } + + /* + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json + */ + /** + * Sample code: Creates or updates an availability group listener. This is used for VMs present in multi subnet. + * + * @param manager Entry point to SqlVirtualMachineManager. + */ + public static void createsOrUpdatesAnAvailabilityGroupListenerThisIsUsedForVMsPresentInMultiSubnet( + com.azure.resourcemanager.sqlvirtualmachine.SqlVirtualMachineManager manager) { + manager + .availabilityGroupListeners() + .define("agl-test") + .withExistingSqlVirtualMachineGroup("testrg", "testvmgroup") + .withAvailabilityGroupName("ag-test") + .withMultiSubnetIpConfigurations( + Arrays + .asList( + new MultiSubnetIpConfiguration() + .withPrivateIpAddress( + new PrivateIpAddress() + .withIpAddress("10.0.0.112") + .withSubnetResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default")) + .withSqlVirtualMachineInstance( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2"), + new MultiSubnetIpConfiguration() + .withPrivateIpAddress( + new PrivateIpAddress() + .withIpAddress("10.0.1.112") + .withSubnetResourceId( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate")) + .withSqlVirtualMachineInstance( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1"))) + .withPort(1433) + .create(); + } } 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 f7868881fea7c..0b4f3d2d0aa1c 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 @@ -9,7 +9,7 @@ /** Samples for AvailabilityGroupListeners Delete. */ public final class AvailabilityGroupListenersDeleteSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteAvailabilityGroupListener.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 97859838acaef..37b4285a107b4 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 @@ -9,7 +9,7 @@ /** Samples for AvailabilityGroupListeners Get. */ public final class AvailabilityGroupListenersGetSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetAvailabilityGroupListener.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 66526c41785e9..32d4231906644 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 @@ -9,7 +9,7 @@ /** Samples for AvailabilityGroupListeners ListByGroup. */ public final class AvailabilityGroupListenersListByGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByGroupAvailabilityGroupListener.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 e717c37fe20e2..feea9ff092a66 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 @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListOperation.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 ad406fe7d0dcd..360a922d64883 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 @@ -4,6 +4,7 @@ package com.azure.resourcemanager.sqlvirtualmachine.generated; +import com.azure.resourcemanager.sqlvirtualmachine.models.ClusterSubnetType; import com.azure.resourcemanager.sqlvirtualmachine.models.SqlVmGroupImageSku; import com.azure.resourcemanager.sqlvirtualmachine.models.WsfcDomainProfile; import java.util.HashMap; @@ -12,7 +13,7 @@ /** Samples for SqlVirtualMachineGroups CreateOrUpdate. */ public final class SqlVirtualMachineGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineGroup.json */ /** * Sample code: Creates or updates a SQL virtual machine group. @@ -37,7 +38,8 @@ public static void createsOrUpdatesASQLVirtualMachineGroup( .withClusterOperatorAccount("testrp@testdomain.com") .withSqlServiceAccount("sqlservice@testdomain.com") .withStorageAccountUrl("https://storgact.blob.core.windows.net/") - .withStorageAccountPrimaryKey("")) + .withStorageAccountPrimaryKey("") + .withClusterSubnetType(ClusterSubnetType.MULTI_SUBNET)) .create(); } 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 020d66afa47a6..fdec4eeddecbf 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachineGroups Delete. */ public final class SqlVirtualMachineGroupsDeleteSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 998c2d9c51a05..feca4d1b851b1 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachineGroups GetByResourceGroup. */ public final class SqlVirtualMachineGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 1734486b607a0..cd47b83d93fe7 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachineGroups ListByResourceGroup. */ public final class SqlVirtualMachineGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByResourceGroupSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 02d051c062555..926c4b5593023 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachineGroups List. */ public final class SqlVirtualMachineGroupsListSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListSubscriptionSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 04b46d25c435a..1b706b9193476 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 @@ -12,7 +12,7 @@ /** Samples for SqlVirtualMachineGroups Update. */ public final class SqlVirtualMachineGroupsUpdateSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/UpdateSqlVirtualMachineGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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/SqlVirtualMachinesCreateOrUpdateSamples.java b/sdk/sqlvirtualmachine/azure-resourcemanager-sqlvirtualmachine/src/samples/java/com/azure/resourcemanager/sqlvirtualmachine/generated/SqlVirtualMachinesCreateOrUpdateSamples.java index a749546098b1e..4384610a7c859 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 @@ -5,13 +5,14 @@ package com.azure.resourcemanager.sqlvirtualmachine.generated; import com.azure.resourcemanager.sqlvirtualmachine.models.AdditionalFeaturesServerConfigurations; +import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentDayOfWeek; import com.azure.resourcemanager.sqlvirtualmachine.models.AssessmentSettings; +import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupDaysOfWeek; import com.azure.resourcemanager.sqlvirtualmachine.models.AutoBackupSettings; import com.azure.resourcemanager.sqlvirtualmachine.models.AutoPatchingSettings; import com.azure.resourcemanager.sqlvirtualmachine.models.BackupScheduleType; import com.azure.resourcemanager.sqlvirtualmachine.models.ConnectivityType; import com.azure.resourcemanager.sqlvirtualmachine.models.DayOfWeek; -import com.azure.resourcemanager.sqlvirtualmachine.models.DaysOfWeek; import com.azure.resourcemanager.sqlvirtualmachine.models.DiskConfigurationType; import com.azure.resourcemanager.sqlvirtualmachine.models.FullBackupFrequencyType; import com.azure.resourcemanager.sqlvirtualmachine.models.KeyVaultCredentialSettings; @@ -35,7 +36,7 @@ /** Samples for SqlVirtualMachines CreateOrUpdate. */ public final class SqlVirtualMachinesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json */ /** * Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or @@ -61,7 +62,7 @@ public final class SqlVirtualMachinesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateVirtualMachineWithVMGroup.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateVirtualMachineWithVMGroup.json */ /** * Sample code: Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group. @@ -82,11 +83,12 @@ public static void createsOrUpdatesASQLVirtualMachineAndJoinsItToASQLVirtualMach .withClusterBootstrapAccountPassword("") .withClusterOperatorAccountPassword("") .withSqlServiceAccountPassword("")) + .withWsfcStaticIp("10.0.0.7") .create(); } /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json */ /** * Sample code: Creates or updates a SQL virtual machine for Automated Back up Settings with Weekly and Days of the @@ -125,7 +127,7 @@ public static void createsOrUpdatesASQLVirtualMachineAndJoinsItToASQLVirtualMach .withBackupSystemDbs(true) .withBackupScheduleType(BackupScheduleType.MANUAL) .withFullBackupFrequency(FullBackupFrequencyType.WEEKLY) - .withDaysOfWeek(Arrays.asList(DaysOfWeek.MONDAY, DaysOfWeek.FRIDAY)) + .withDaysOfWeek(Arrays.asList(AutoBackupDaysOfWeek.MONDAY, AutoBackupDaysOfWeek.FRIDAY)) .withFullBackupStartTime(6) .withFullBackupWindowHours(11) .withLogBackupFrequency(10)) @@ -151,7 +153,7 @@ public static void createsOrUpdatesASQLVirtualMachineAndJoinsItToASQLVirtualMach } /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json */ /** * Sample code: Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and @@ -190,7 +192,7 @@ public static void createsOrUpdatesASQLVirtualMachineAndJoinsItToASQLVirtualMach } /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineMAX.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateSqlVirtualMachineMAX.json */ /** * Sample code: Creates or updates a SQL virtual machine with max parameters. @@ -254,7 +256,9 @@ public static void createsOrUpdatesASQLVirtualMachineWithMaxParameters( .withMaxDop(8) .withIsOptimizeForAdHocWorkloadsEnabled(true) .withMinServerMemoryMB(0) - .withMaxServerMemoryMB(128))) + .withMaxServerMemoryMB(128) + .withIsLpimEnabled(true) + .withIsIfiEnabled(true))) .withAssessmentSettings( new AssessmentSettings() .withEnable(true) @@ -263,13 +267,13 @@ public static void createsOrUpdatesASQLVirtualMachineWithMaxParameters( new Schedule() .withEnable(true) .withWeeklyInterval(1) - .withDayOfWeek(DayOfWeek.SUNDAY) + .withDayOfWeek(AssessmentDayOfWeek.SUNDAY) .withStartTime("23:17"))) .create(); } /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/CreateOrUpdateSqlVirtualMachineMIN.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 ee14a3bc94dd8..220169c6f4f09 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachines Delete. */ public final class SqlVirtualMachinesDeleteSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/DeleteSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 92ec65adcdf81..9937b6d44c631 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachines GetByResourceGroup. */ public final class SqlVirtualMachinesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/GetSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 2ef0962bb0f81..8d00206b96d63 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachines ListByResourceGroup. */ public final class SqlVirtualMachinesListByResourceGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListByResourceGroupSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 c4d25a7196cd3..d640d9ec007be 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachines ListBySqlVmGroup. */ public final class SqlVirtualMachinesListBySqlVmGroupSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListBySqlVirtualMachineGroupSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 8cedf72e3c6c6..3c2b0f03812e4 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachines List. */ public final class SqlVirtualMachinesListSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/ListSubscriptionSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 6092e5269504c..2bf1b98b57a51 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachines Redeploy. */ public final class SqlVirtualMachinesRedeploySamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/RedeploySqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/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 f10c0b4bef5d5..1869a7f8d01c0 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 @@ -9,7 +9,7 @@ /** Samples for SqlVirtualMachines StartAssessment. */ public final class SqlVirtualMachinesStartAssessmentSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/StartAssessmentOnSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/StartAssessmentOnSqlVirtualMachine.json */ /** * Sample code: Starts 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 301d8dcef25b3..ba8df301fa553 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 @@ -12,7 +12,7 @@ /** Samples for SqlVirtualMachines Update. */ public final class SqlVirtualMachinesUpdateSamples { /* - * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/preview/2021-11-01-preview/examples/UpdateSqlVirtualMachine.json + * x-ms-original-file: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/UpdateSqlVirtualMachine.json */ /** * Sample code: Updates a SQL virtual machine tags.