From 0cf7cb8fa6d85eff8635401a4d56b4f911a24cbf Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Thu, 29 Jan 2026 15:47:59 +0800 Subject: [PATCH 1/7] Use the new code generator to generate SDK code from TSP --- .../Configuration.json | 12 + .../metadata.json | 3 + ...e.ResourceManager.SqlVirtualMachine.csproj | 1 - .../ArmSqlVirtualMachineModelFactory.cs | 353 +- .../AvailabilityGroupListenerCollection.cs | 392 +- ...labilityGroupListenerData.Serialization.cs | 249 +- .../AvailabilityGroupListenerData.cs | 169 +- ...lityGroupListenerResource.Serialization.cs | 18 +- .../AvailabilityGroupListenerResource.cs | 253 +- ...enersGetByGroupAsyncCollectionResultOfT.cs | 84 + ...pListenersGetByGroupCollectionResultOfT.cs | 83 + ...perationsGetAllAsyncCollectionResultOfT.cs | 75 + .../OperationsGetAllCollectionResultOfT.cs | 74 + ...ineGroupsGetAllAsyncCollectionResultOfT.cs | 78 + ...lMachineGroupsGetAllCollectionResultOfT.cs | 77 + ...ByResourceGroupAsyncCollectionResultOfT.cs | 81 + ...psGetByResourceGroupCollectionResultOfT.cs | 80 + ...lMachinesGetAllAsyncCollectionResultOfT.cs | 78 + ...irtualMachinesGetAllCollectionResultOfT.cs | 77 + ...ByResourceGroupAsyncCollectionResultOfT.cs | 81 + ...esGetByResourceGroupCollectionResultOfT.cs | 80 + ...VmsBySqlVmGroupAsyncCollectionResultOfT.cs | 84 + ...etSqlVmsBySqlVmGroupCollectionResultOfT.cs | 83 + .../MockableSqlVirtualMachineArmClient.cs | 49 +- ...eSqlVirtualMachineResourceGroupResource.cs | 156 +- ...leSqlVirtualMachineSubscriptionResource.cs | 154 +- ...MockableSqlVirtualMachineTenantResource.cs | 97 + .../Extensions/SqlVirtualMachineExtensions.cs | 385 +- .../src/Generated/Internal/Argument.cs | 75 +- .../Internal/AsyncPageableWrapper.cs | 48 + .../Internal/ChangeTrackingDictionary.cs | 24 +- .../Generated/Internal/ChangeTrackingList.cs | 17 +- .../Internal/ClientPipelineExtensions.cs | 72 + .../Internal/CodeGenMemberAttribute.cs | 20 + .../Internal/CodeGenSerializationAttribute.cs | 48 + .../Internal/CodeGenSuppressAttribute.cs | 29 + .../Internal/CodeGenTypeAttribute.cs | 24 + .../src/Generated/Internal/ErrorResult.cs | 32 + .../Internal/ModelSerializationExtensions.cs | 177 +- .../src/Generated/Internal/Optional.cs | 12 +- .../src/Generated/Internal/PageableWrapper.cs | 47 + .../RawRequestUriBuilderExtensions.cs | 60 + .../Internal/RequestContextExtensions.cs | 26 + .../Generated/Internal/SerializationFormat.cs | 49 + .../src/Generated/Internal/TypeFormatters.cs | 181 + .../Internal/Utf8JsonRequestContent.cs | 8 +- ...vailabilityGroupListenerOperationSource.cs | 23 +- .../SqlVirtualMachineArmOperation.cs | 70 +- .../SqlVirtualMachineArmOperationOfT.cs | 79 +- .../SqlVmGroupOperationSource.cs | 23 +- .../SqlVmOperationSource.cs | 23 +- .../SqlVmTroubleshootingOperationSource.cs | 45 + ...AADAuthenticationSettings.Serialization.cs | 141 + .../Models/AADAuthenticationSettings.cs | 36 + ...turesServerConfigurations.Serialization.cs | 76 +- .../AdditionalFeaturesServerConfigurations.cs | 39 +- .../src/Generated/Models/AdditionalOsPatch.cs | 73 + .../src/Generated/Models/AdditionalVmPatch.cs | 69 + ...abilityGroupConfiguration.Serialization.cs | 78 +- .../Models/AvailabilityGroupConfiguration.cs | 40 +- ...tyGroupListenerListResult.Serialization.cs | 102 +- .../AvailabilityGroupListenerListResult.cs | 53 +- ...LoadBalancerConfiguration.Serialization.cs | 101 +- ...yGroupListenerLoadBalancerConfiguration.cs | 44 +- ...pListenerPrivateIPAddress.Serialization.cs | 81 +- ...ailabilityGroupListenerPrivateIPAddress.cs | 40 +- ...tyGroupListenerProperties.Serialization.cs | 255 + .../AvailabilityGroupListenerProperties.cs | 82 + .../AvailabilityGroupReplica.Serialization.cs | 99 +- .../Models/AvailabilityGroupReplica.cs | 43 +- .../AvailabilityGroupReplicaCommitMode.cs | 40 +- .../AvailabilityGroupReplicaFailoverMode.cs | 40 +- .../Models/AvailabilityGroupReplicaRole.cs | 40 +- ...ResourceManagerSqlVirtualMachineContext.cs | 23 +- .../Generated/Models/Info.Serialization.cs | 197 + .../src/Generated/Models/Info.cs | 53 + .../Generated/Models/LeastPrivilegeMode.cs | 69 + ...ultiSubnetIPConfiguration.Serialization.cs | 81 +- .../Models/MultiSubnetIPConfiguration.cs | 46 +- .../Models/OperationDisplay.Serialization.cs | 174 + .../src/Generated/Models/OperationDisplay.cs | 51 + .../OperationListResult.Serialization.cs | 174 + .../Generated/Models/OperationListResult.cs | 43 + .../src/Generated/Models/OperationOrigin.cs | 69 + .../Models/OperationProperty.Serialization.cs | 130 + .../src/Generated/Models/OperationProperty.cs | 31 + .../Generated/Models/OsType.Serialization.cs | 36 + .../src/Generated/Models/OsType.cs | 18 + .../Generated/Models/ReadableSecondaryMode.cs | 45 +- .../Models/SqVmBackupScheduleType.cs | 40 +- ...onnectivityUpdateSettings.Serialization.cs | 90 +- .../Models/SqlConnectivityUpdateSettings.cs | 42 +- .../src/Generated/Models/SqlImageSku.cs | 55 +- .../SqlInstanceSettings.Serialization.cs | 118 +- .../Generated/Models/SqlInstanceSettings.cs | 45 +- .../src/Generated/Models/SqlManagementMode.cs | 47 +- ...rationsManagementSettings.Serialization.cs | 116 +- ...lServerConfigurationsManagementSettings.cs | 91 +- .../Models/SqlServerConnectivityType.cs | 45 +- .../Generated/Models/SqlServerLicenseType.cs | 45 +- .../SqlStorageSettings.Serialization.cs | 97 +- .../Generated/Models/SqlStorageSettings.cs | 46 +- .../SqlStorageUpdateSettings.Serialization.cs | 88 +- .../Models/SqlStorageUpdateSettings.cs | 41 +- .../Models/SqlTempDBSettings.Serialization.cs | 144 +- .../src/Generated/Models/SqlTempDBSettings.cs | 55 +- ...ualMachineGroupListResult.Serialization.cs | 174 + .../SqlVirtualMachineGroupListResult.cs | 43 + ...ualMachineGroupProperties.Serialization.cs | 235 + .../SqlVirtualMachineGroupProperties.cs | 66 + ...lVirtualMachineListResult.Serialization.cs | 174 + .../Models/SqlVirtualMachineListResult.cs | 43 + ...lVirtualMachineProperties.Serialization.cs | 461 + .../Models/SqlVirtualMachineProperties.cs | 138 + .../SqlVmAssessmentDayOfWeek.Serialization.cs | 37 +- .../SqlVmAssessmentSchedule.Serialization.cs | 102 +- .../Models/SqlVmAssessmentSchedule.cs | 45 +- .../SqlVmAssessmentSettings.Serialization.cs | 90 +- .../Models/SqlVmAssessmentSettings.cs | 55 +- .../Models/SqlVmAutoBackupDayOfWeek.cs | 65 +- .../SqlVmAutoBackupSettings.Serialization.cs | 174 +- .../Models/SqlVmAutoBackupSettings.cs | 53 +- ...qlVmAutoPatchingDayOfWeek.Serialization.cs | 42 +- ...SqlVmAutoPatchingSettings.Serialization.cs | 119 +- .../Models/SqlVmAutoPatchingSettings.cs | 47 +- .../Models/SqlVmClusterConfiguration.cs | 35 +- .../Models/SqlVmClusterManagerType.cs | 35 +- .../Models/SqlVmClusterSubnetType.cs | 40 +- ...skConfigAssessmentContent.Serialization.cs | 158 + .../SqlVmDiskConfigAssessmentContent.cs | 36 + .../Models/SqlVmDiskConfigurationType.cs | 45 +- .../Models/SqlVmFullBackupFrequency.cs | 40 +- .../Generated/Models/SqlVmGroupImageSku.cs | 40 +- .../SqlVmGroupListResult.Serialization.cs | 154 - .../Generated/Models/SqlVmGroupListResult.cs | 70 - .../Models/SqlVmGroupPatch.Serialization.cs | 101 +- .../src/Generated/Models/SqlVmGroupPatch.cs | 40 +- .../Generated/Models/SqlVmGroupScaleType.cs | 35 +- ...eyVaultCredentialSettings.Serialization.cs | 102 +- .../Models/SqlVmKeyVaultCredentialSettings.cs | 43 +- .../Models/SqlVmListResult.Serialization.cs | 154 - .../src/Generated/Models/SqlVmListResult.cs | 70 - .../Models/SqlVmPatch.Serialization.cs | 101 +- .../src/Generated/Models/SqlVmPatch.cs | 40 +- ...rageConfigurationSettings.Serialization.cs | 126 +- .../SqlVmStorageConfigurationSettings.cs | 49 +- .../Models/SqlVmStorageWorkloadType.cs | 45 +- .../SqlVmTroubleshooting.Serialization.cs | 228 + .../Generated/Models/SqlVmTroubleshooting.cs | 73 + .../src/Generated/Models/SqlWorkloadType.cs | 45 +- ...orkloadTypeUpdateSettings.Serialization.cs | 76 +- .../Models/SqlWorkloadTypeUpdateSettings.cs | 39 +- ...otingAdditionalProperties.Serialization.cs | 145 + .../TroubleshootingAdditionalProperties.cs | 53 + .../Models/TroubleshootingScenario.cs | 65 + .../TroubleshootingStatus.Serialization.cs | 223 + .../Generated/Models/TroubleshootingStatus.cs | 70 + .../UnhealthyReplicaInfo.Serialization.cs | 141 + .../Generated/Models/UnhealthyReplicaInfo.cs | 36 + .../VirtualMachineIdentity.Serialization.cs | 161 + .../Models/VirtualMachineIdentity.cs | 42 + .../src/Generated/Models/VmIdentityType.cs | 73 + ...rClusterDomainCredentials.Serialization.cs | 82 +- ...sServerFailoverClusterDomainCredentials.cs | 41 +- ...loverClusterDomainProfile.Serialization.cs | 134 +- ...ndowsServerFailoverClusterDomainProfile.cs | 52 +- .../src/Generated/ProviderConstants.cs | 3 +- ...vailabilityGroupListenersRestOperations.cs | 492 +- .../OperationsRestOperations.cs | 70 + .../SqlVirtualMachineGroupsRestOperations.cs | 695 +- ...irtualMachineTroubleshootRestOperations.cs | 66 + .../SqlVirtualMachinesRestOperations.cs | 1048 +- .../src/Generated/SqlVmCollection.cs | 448 +- .../src/Generated/SqlVmData.Serialization.cs | 412 +- .../src/Generated/SqlVmData.cs | 435 +- .../src/Generated/SqlVmGroupCollection.cs | 448 +- .../Generated/SqlVmGroupData.Serialization.cs | 263 +- .../src/Generated/SqlVmGroupData.cs | 164 +- .../SqlVmGroupResource.Serialization.cs | 18 +- .../src/Generated/SqlVmGroupResource.cs | 741 +- .../Generated/SqlVmResource.Serialization.cs | 18 +- .../src/Generated/SqlVmResource.cs | 893 +- .../src/{autorest.md => autorest.md.bak} | 0 .../tsp-location.yaml | 4 + .../tspCodeModel.json | 27279 ++++++++++++++++ 185 files changed, 40069 insertions(+), 7564 deletions(-) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/Configuration.json create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/metadata.json create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllAsyncCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetAllAsyncCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetAllCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetByResourceGroupAsyncCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetByResourceGroupCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetAllAsyncCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetAllCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetByResourceGroupAsyncCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetByResourceGroupCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineTenantResource.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/AsyncPageableWrapper.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ClientPipelineExtensions.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenMemberAttribute.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenSerializationAttribute.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenSuppressAttribute.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenTypeAttribute.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ErrorResult.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/PageableWrapper.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/RawRequestUriBuilderExtensions.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/RequestContextExtensions.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/SerializationFormat.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/TypeFormatters.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmTroubleshootingOperationSource.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalOsPatch.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalVmPatch.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerProperties.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerProperties.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LeastPrivilegeMode.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationOrigin.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupListResult.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupListResult.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupProperties.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupProperties.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigAssessmentContent.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigAssessmentContent.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.Serialization.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.Serialization.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingScenario.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/UnhealthyReplicaInfo.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/UnhealthyReplicaInfo.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VmIdentityType.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/OperationsRestOperations.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineTroubleshootRestOperations.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/{autorest.md => autorest.md.bak} (100%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tspCodeModel.json diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/Configuration.json b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/Configuration.json new file mode 100644 index 000000000000..9a3f6f90d72a --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/Configuration.json @@ -0,0 +1,12 @@ +{ + "package-name": "Azure.ResourceManager.SqlVirtualMachine", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "model-namespace": true, + "license": { + "name": "MIT License", + "company": "Microsoft Corporation", + "link": "https://mit-license.org", + "header": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.", + "description": "Copyright (c) Microsoft Corporation\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE." + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/metadata.json b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/metadata.json new file mode 100644 index 000000000000..84cd0ba22dcb --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/metadata.json @@ -0,0 +1,3 @@ +{ + "apiVersion": "2023-10-01" +} \ No newline at end of file diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Azure.ResourceManager.SqlVirtualMachine.csproj b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Azure.ResourceManager.SqlVirtualMachine.csproj index 63a97ddf605f..38c4f7132c56 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Azure.ResourceManager.SqlVirtualMachine.csproj +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Azure.ResourceManager.SqlVirtualMachine.csproj @@ -6,6 +6,5 @@ Azure.ResourceManager.SqlVirtualMachine Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.SqlVirtualMachine azure;management;arm;resource manager;sqlvirtualmachine - true diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs index 98798137a3b4..5e37407d160c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs @@ -7,57 +7,277 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Net; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// Model factory for models. + /// A factory class for creating instances of the models for mocking. public static partial class ArmSqlVirtualMachineModelFactory { - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. + + /// Result of the request to list SQL operations. + /// The name of the operation being performed on this particular object.". + /// he localized display information for this particular operation / action. + /// The intended executor of the operation.". + /// Additional descriptions for the operation. + /// A new instance for mocking. + public static Info Info(string name = default, OperationDisplay display = default, OperationOrigin? origin = default, IReadOnlyDictionary properties = default) + { + properties ??= new ChangeTrackingDictionary(); + + return new Info(name, display, origin, properties, additionalBinaryDataProperties: null); + } + + /// Display metadata associated with the operation. + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// A new instance for mocking. + public static OperationDisplay OperationDisplay(string provider = default, string resource = default, string operation = default, string description = default) + { + return new OperationDisplay(provider, resource, operation, description, additionalBinaryDataProperties: null); + } + + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. /// Provisioning state to track the async operation status. /// Name of the availability group. /// List of load balancer configurations for an availability group listener. /// List of multi subnet IP configurations for an AG listener. /// Create a default availability group if it does not exist. /// Listener port. - /// Availability Group configuration. + /// Replica configurations. /// A new instance for mocking. - public static AvailabilityGroupListenerData AvailabilityGroupListenerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string provisioningState = null, string availabilityGroupName = null, IEnumerable loadBalancerConfigurations = null, IEnumerable multiSubnetIPConfigurations = null, bool? createDefaultAvailabilityGroupIfNotExist = null, int? port = null, IEnumerable availabilityGroupReplicas = null) + public static AvailabilityGroupListenerData AvailabilityGroupListenerData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, string provisioningState = default, string availabilityGroupName = default, IEnumerable loadBalancerConfigurations = default, IEnumerable multiSubnetIPConfigurations = default, bool? createDefaultAvailabilityGroupIfNotExist = default, int? port = default, IEnumerable availabilityGroupReplicas = default) { - loadBalancerConfigurations ??= new List(); - multiSubnetIPConfigurations ??= new List(); - availabilityGroupReplicas ??= new List(); - return new AvailabilityGroupListenerData( id, name, resourceType, systemData, - provisioningState, - availabilityGroupName, - loadBalancerConfigurations?.ToList(), - multiSubnetIPConfigurations?.ToList(), - createDefaultAvailabilityGroupIfNotExist, - port, - availabilityGroupReplicas != null ? new AvailabilityGroupConfiguration(availabilityGroupReplicas?.ToList(), serializedAdditionalRawData: null) : null, - serializedAdditionalRawData: null); + additionalBinaryDataProperties: null, + provisioningState is null && availabilityGroupName is null && loadBalancerConfigurations is null && multiSubnetIPConfigurations is null && createDefaultAvailabilityGroupIfNotExist is null && port is null && availabilityGroupReplicas is null ? default : new AvailabilityGroupListenerProperties( + provisioningState, + availabilityGroupName, + (loadBalancerConfigurations ?? new ChangeTrackingList()).ToList(), + (multiSubnetIPConfigurations ?? new ChangeTrackingList()).ToList(), + createDefaultAvailabilityGroupIfNotExist, + port, + new AvailabilityGroupConfiguration((availabilityGroupReplicas ?? new ChangeTrackingList()).ToList(), null), + null)); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. + /// A load balancer configuration for an availability group listener. + /// Private IP address. + /// Resource id of the public IP. + /// Resource id of the load balancer. + /// Probe port. + /// List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener. + /// A new instance for mocking. + public static AvailabilityGroupListenerLoadBalancerConfiguration AvailabilityGroupListenerLoadBalancerConfiguration(AvailabilityGroupListenerPrivateIPAddress privateIPAddress = default, ResourceIdentifier publicIPAddressResourceId = default, ResourceIdentifier loadBalancerResourceId = default, int? probePort = default, IEnumerable sqlVmInstances = default) + { + sqlVmInstances ??= new ChangeTrackingList(); + + return new AvailabilityGroupListenerLoadBalancerConfiguration( + privateIPAddress, + publicIPAddressResourceId, + loadBalancerResourceId, + probePort, + sqlVmInstances.ToList(), + additionalBinaryDataProperties: null); + } + + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Resource tags. + /// The geo-location where the resource lives. + /// ARM Resource id of underlying virtual machine created from SQL marketplace image. + /// Provisioning state to track the async operation status. + /// SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016. + /// SQL Server license type. + /// SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it. + /// SQL IaaS Agent least privilege mode. + /// SQL Server edition type. + /// ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of. + /// 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. + /// Auto patching settings for applying critical security updates to SQL virtual machine. + /// Auto backup settings for SQL Server. + /// Key vault credential settings. + /// SQL Server configuration management settings. + /// Storage Configuration Settings. + /// Troubleshooting status. + /// SQL best practices Assessment Settings. + /// Enable automatic upgrade of Sql IaaS extension Agent. + /// Additional VM Patching solution enabled on the Virtual Machine. + /// Virtual Machine Identity details used for Sql IaaS extension configurations. + /// Operating System of the current SQL Virtual Machine. + /// DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server. + /// A new instance for mocking. + public static SqlVmData SqlVmData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, ResourceIdentifier virtualMachineResourceId = default, string provisioningState = default, string sqlImageOffer = default, SqlServerLicenseType? sqlServerLicenseType = default, SqlManagementMode? sqlManagement = default, LeastPrivilegeMode? leastPrivilegeMode = default, SqlImageSku? sqlImageSku = default, ResourceIdentifier sqlVmGroupResourceId = default, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = default, IPAddress windowsServerFailoverClusterStaticIP = default, SqlVmAutoPatchingSettings autoPatchingSettings = default, SqlVmAutoBackupSettings autoBackupSettings = default, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = default, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default, SqlVmStorageConfigurationSettings storageConfigurationSettings = default, TroubleshootingStatus troubleshootingStatus = default, SqlVmAssessmentSettings assessmentSettings = default, bool? enableAutomaticUpgrade = default, AdditionalOsPatch? additionalVmPatch = default, VirtualMachineIdentity virtualMachineIdentitySettings = default, OsType? osType = default, ManagedServiceIdentity identity = default) + { + tags ??= new ChangeTrackingDictionary(); + + return new SqlVmData( + id, + name, + resourceType, + systemData, + additionalBinaryDataProperties: null, + tags, + location, + virtualMachineResourceId is null && provisioningState is null && sqlImageOffer is null && sqlServerLicenseType is null && sqlManagement is null && leastPrivilegeMode is null && sqlImageSku is null && sqlVmGroupResourceId is null && windowsServerFailoverClusterDomainCredentials is null && windowsServerFailoverClusterStaticIP is null && autoPatchingSettings is null && autoBackupSettings is null && keyVaultCredentialSettings is null && serverConfigurationsManagementSettings is null && storageConfigurationSettings is null && troubleshootingStatus is null && assessmentSettings is null && enableAutomaticUpgrade is null && additionalVmPatch is null && virtualMachineIdentitySettings is null && osType is null ? default : new SqlVirtualMachineProperties( + virtualMachineResourceId, + provisioningState, + sqlImageOffer, + sqlServerLicenseType, + sqlManagement, + leastPrivilegeMode, + sqlImageSku, + sqlVmGroupResourceId, + windowsServerFailoverClusterDomainCredentials, + windowsServerFailoverClusterStaticIP, + autoPatchingSettings, + autoBackupSettings, + keyVaultCredentialSettings, + serverConfigurationsManagementSettings, + storageConfigurationSettings, + troubleshootingStatus, + assessmentSettings, + enableAutomaticUpgrade, + additionalVmPatch, + virtualMachineIdentitySettings, + osType, + null), + identity); + } + + /// Configure backups for databases in your SQL virtual machine. + /// Enable or disable autobackup on SQL virtual machine. + /// Enable or disable encryption for backup on SQL virtual machine. + /// Retention period of backup: 1-90 days. + /// Storage account url where backup will be taken to. + /// Storage container name where backup will be taken to. + /// Storage account key where backup will be taken to. + /// Password for encryption on backup. + /// Include or exclude system databases from auto backup. + /// Backup schedule type. + /// Frequency of full backups. In both cases, full backups begin during the next scheduled time window. + /// Days of the week for the backups when FullBackupFrequency is set to Weekly. + /// Start time of a given day during which full backups can take place. 0-23 hours. + /// Duration of the time window of a given day during which full backups can take place. 1-23 hours. + /// Frequency of log backups. 5-60 minutes. + /// A new instance for mocking. + public static SqlVmAutoBackupSettings SqlVmAutoBackupSettings(bool? isEnabled = default, bool? isEncryptionEnabled = default, int? retentionPeriodInDays = default, Uri storageAccountUri = default, string storageContainerName = default, string storageAccessKey = default, string password = default, bool? areSystemDbsIncludedInBackup = default, SqVmBackupScheduleType? backupScheduleType = default, SqlVmFullBackupFrequency? fullBackupFrequency = default, IEnumerable daysOfWeek = default, int? fullBackupStartHour = default, int? fullBackupWindowHours = default, int? logBackupFrequency = default) + { + daysOfWeek ??= new ChangeTrackingList(); + + return new SqlVmAutoBackupSettings( + isEnabled, + isEncryptionEnabled, + retentionPeriodInDays, + storageAccountUri, + storageContainerName, + storageAccessKey, + password, + areSystemDbsIncludedInBackup, + backupScheduleType, + fullBackupFrequency, + daysOfWeek.ToList(), + fullBackupStartHour, + fullBackupWindowHours, + logBackupFrequency, + additionalBinaryDataProperties: null); + } + + /// Set disk storage settings for SQL Server. + /// Logical Unit Numbers for the disks. + /// SQL Server default file path. + /// Use storage pool to build a drive if true or not provided. + /// A new instance for mocking. + public static SqlStorageSettings SqlStorageSettings(IEnumerable luns = default, string defaultFilePath = default, bool? useStoragePool = default) + { + luns ??= new ChangeTrackingList(); + + return new SqlStorageSettings(luns.ToList(), defaultFilePath, useStoragePool, additionalBinaryDataProperties: null); + } + + /// Set tempDb storage settings for SQL Server. + /// SQL Server tempdb data file size. + /// SQL Server tempdb data file autoGrowth size. + /// SQL Server tempdb log file size. + /// SQL Server tempdb log file autoGrowth size. + /// SQL Server tempdb data file count. + /// SQL Server tempdb persist folder choice. + /// SQL Server tempdb persist folder location. + /// Logical Unit Numbers for the disks. + /// SQL Server default file path. + /// Use storage pool to build a drive if true or not provided. + /// A new instance for mocking. + public static SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default, int? dataGrowth = default, int? logFileSize = default, int? logGrowth = default, int? dataFileCount = default, bool? persistFolder = default, string persistFolderPath = default, IEnumerable logicalUnitNumbers = default, string defaultFilePath = default, bool? useStoragePool = default) + { + logicalUnitNumbers ??= new ChangeTrackingList(); + + return new SqlTempDBSettings( + dataFileSize, + dataGrowth, + logFileSize, + logGrowth, + dataFileCount, + persistFolder, + persistFolderPath, + logicalUnitNumbers.ToList(), + defaultFilePath, + useStoragePool, + additionalBinaryDataProperties: null); + } + + /// Root cause of the issue. + /// Last troubleshooting trigger time in UTC timezone. + /// Start time in UTC timezone. + /// End time in UTC timezone. + /// SQL VM troubleshooting scenario. + /// The name of the availability group. + /// A new instance for mocking. + public static TroubleshootingStatus TroubleshootingStatus(string rootCause = default, DateTimeOffset? lastTriggerTimeUtc = default, DateTimeOffset? startTimeUtc = default, DateTimeOffset? endTimeUtc = default, TroubleshootingScenario? troubleshootingScenario = default, string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = default) + { + return new TroubleshootingStatus( + rootCause, + lastTriggerTimeUtc, + startTimeUtc, + endTimeUtc, + troubleshootingScenario, + troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName is null ? default : new TroubleshootingAdditionalProperties(new UnhealthyReplicaInfo(troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName, null), null), + additionalBinaryDataProperties: null); + } + + /// An update to a SQL virtual machine. + /// Resource tags. + /// A new instance for mocking. + public static SqlVmPatch SqlVmPatch(IDictionary tags = default) + { + tags ??= new ChangeTrackingDictionary(); + + return new SqlVmPatch(tags, additionalBinaryDataProperties: null); + } + + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Resource tags. + /// The geo-location where the resource lives. /// Provisioning state to track the async operation status. /// SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016. /// SQL image sku. @@ -66,25 +286,54 @@ public static AvailabilityGroupListenerData AvailabilityGroupListenerData(Resour /// Cluster type. /// Cluster Active Directory domain profile. /// A new instance for mocking. - public static SqlVmGroupData SqlVmGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null, string sqlImageOffer = null, SqlVmGroupImageSku? sqlImageSku = null, SqlVmGroupScaleType? scaleType = null, SqlVmClusterManagerType? clusterManagerType = null, SqlVmClusterConfiguration? clusterConfiguration = null, WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null) + public static SqlVmGroupData SqlVmGroupData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, string provisioningState = default, string sqlImageOffer = default, SqlVmGroupImageSku? sqlImageSku = default, SqlVmGroupScaleType? scaleType = default, SqlVmClusterManagerType? clusterManagerType = default, SqlVmClusterConfiguration? clusterConfiguration = default, WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = default) { - tags ??= new Dictionary(); + tags ??= new ChangeTrackingDictionary(); return new SqlVmGroupData( id, name, resourceType, systemData, + additionalBinaryDataProperties: null, tags, location, - provisioningState, - sqlImageOffer, - sqlImageSku, - scaleType, - clusterManagerType, - clusterConfiguration, - windowsServerFailoverClusterDomainProfile, - serializedAdditionalRawData: null); + provisioningState is null && sqlImageOffer is null && sqlImageSku is null && scaleType is null && clusterManagerType is null && clusterConfiguration is null && windowsServerFailoverClusterDomainProfile is null ? default : new SqlVirtualMachineGroupProperties( + provisioningState, + sqlImageOffer, + sqlImageSku, + scaleType, + clusterManagerType, + clusterConfiguration, + windowsServerFailoverClusterDomainProfile, + null)); + } + + /// An update to a SQL virtual machine group. + /// Resource tags. + /// A new instance for mocking. + public static SqlVmGroupPatch SqlVmGroupPatch(IDictionary tags = default) + { + tags ??= new ChangeTrackingDictionary(); + + return new SqlVmGroupPatch(tags, additionalBinaryDataProperties: null); + } + + /// Start time in UTC timezone. + /// End time in UTC timezone. + /// SQL VM troubleshooting scenario. + /// The name of the availability group. + /// Virtual machine resource id for response. + /// A new instance for mocking. + public static SqlVmTroubleshooting SqlVmTroubleshooting(DateTimeOffset? startTimeUtc = default, DateTimeOffset? endTimeUtc = default, TroubleshootingScenario? troubleshootingScenario = default, string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = default, string virtualMachineResourceId = default) + { + return new SqlVmTroubleshooting( + startTimeUtc, + endTimeUtc, + troubleshootingScenario, + troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName is null ? default : new TroubleshootingAdditionalProperties(new UnhealthyReplicaInfo(troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName, null), null), + virtualMachineResourceId, + additionalBinaryDataProperties: null); } /// Initializes a new instance of . @@ -111,34 +360,10 @@ public static SqlVmGroupData SqlVmGroupData(ResourceIdentifier id = null, string /// Storage Configuration Settings. /// Assessment Settings. /// A new instance for mocking. - public static SqlVmData SqlVmData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, SqlServerLicenseType? sqlServerLicenseType = null, SqlManagementMode? sqlManagement = null, SqlImageSku? sqlImageSku = null, ResourceIdentifier sqlVmGroupResourceId = null, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, IPAddress windowsServerFailoverClusterStaticIP = null, SqlVmAutoPatchingSettings autoPatchingSettings = null, SqlVmAutoBackupSettings autoBackupSettings = null, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, SqlVmStorageConfigurationSettings storageConfigurationSettings = null, SqlVmAssessmentSettings assessmentSettings = null) + [EditorBrowsable(EditorBrowsableState.Never)] + public static SqlVmData SqlVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, SqlServerLicenseType? sqlServerLicenseType, SqlManagementMode? sqlManagement, SqlImageSku? sqlImageSku, ResourceIdentifier sqlVmGroupResourceId, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, IPAddress windowsServerFailoverClusterStaticIP, SqlVmAutoPatchingSettings autoPatchingSettings, SqlVmAutoBackupSettings autoBackupSettings, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, SqlVmStorageConfigurationSettings storageConfigurationSettings, SqlVmAssessmentSettings assessmentSettings) { - tags ??= new Dictionary(); - - return new SqlVmData( - id, - name, - resourceType, - systemData, - tags, - location, - identity, - virtualMachineResourceId, - provisioningState, - sqlImageOffer, - sqlServerLicenseType, - sqlManagement, - sqlImageSku, - sqlVmGroupResourceId, - windowsServerFailoverClusterDomainCredentials, - windowsServerFailoverClusterStaticIP, - autoPatchingSettings, - autoBackupSettings, - keyVaultCredentialSettings, - serverConfigurationsManagementSettings, - storageConfigurationSettings, - assessmentSettings, - serializedAdditionalRawData: null); + return SqlVmData(id, name, resourceType, systemData, tags, location, virtualMachineResourceId, provisioningState, sqlImageOffer, sqlServerLicenseType, sqlManagement, leastPrivilegeMode: default, sqlImageSku, sqlVmGroupResourceId, windowsServerFailoverClusterDomainCredentials, windowsServerFailoverClusterStaticIP, autoPatchingSettings, autoBackupSettings, keyVaultCredentialSettings, serverConfigurationsManagementSettings, storageConfigurationSettings, troubleshootingStatus: default, assessmentSettings, enableAutomaticUpgrade: default, additionalVmPatch: default, virtualMachineIdentitySettings: default, osType: default, identity); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerCollection.cs index 8d28a017a242..1a13fc26537c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerCollection.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerCollection.cs @@ -8,67 +8,66 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using Autorest.CSharp.Core; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; namespace Azure.ResourceManager.SqlVirtualMachine { /// /// A class representing a collection of and their operations. /// Each in the collection will belong to the same instance of . - /// To get an instance call the GetAvailabilityGroupListeners method from an instance of . + /// To get a instance call the GetAvailabilityGroupListeners method from an instance of . /// public partial class AvailabilityGroupListenerCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _availabilityGroupListenerClientDiagnostics; - private readonly AvailabilityGroupListenersRestOperations _availabilityGroupListenerRestClient; + private readonly ClientDiagnostics _availabilityGroupListenersClientDiagnostics; + private readonly AvailabilityGroupListeners _availabilityGroupListenersRestClient; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of AvailabilityGroupListenerCollection for mocking. protected AvailabilityGroupListenerCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. + /// The identifier of the resource that is the target of operations. internal AvailabilityGroupListenerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _availabilityGroupListenerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", AvailabilityGroupListenerResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(AvailabilityGroupListenerResource.ResourceType, out string availabilityGroupListenerApiVersion); - _availabilityGroupListenerRestClient = new AvailabilityGroupListenersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, availabilityGroupListenerApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif + _availabilityGroupListenersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", AvailabilityGroupListenerResource.ResourceType.Namespace, Diagnostics); + _availabilityGroupListenersRestClient = new AvailabilityGroupListeners(_availabilityGroupListenersClientDiagnostics, Pipeline, Endpoint, availabilityGroupListenerApiVersion ?? "2023-10-01"); + ValidateResourceId(id); } + /// + [Conditional("DEBUG")] internal static void ValidateResourceId(ResourceIdentifier id) { if (id.ResourceType != SqlVmGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SqlVmGroupResource.ResourceType), nameof(id)); + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, SqlVmGroupResource.ResourceType), id); + } } /// /// Creates or updates an availability group listener. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} - /// - /// - /// Operation Id - /// AvailabilityGroupListeners_CreateOrUpdate + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// AvailabilityGroupListeners_CreateOrUpdate. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// @@ -76,21 +75,34 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// Name of the availability group listener. /// The availability group listener. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// or is null. + /// is an empty string, and was expected to be non-empty. public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string availabilityGroupListenerName, AvailabilityGroupListenerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.CreateOrUpdate"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _availabilityGroupListenerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, data, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(new AvailabilityGroupListenerOperationSource(Client), _availabilityGroupListenerClientDiagnostics, Pipeline, _availabilityGroupListenerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, data).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, AvailabilityGroupListenerData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new AvailabilityGroupListenerOperationSource(Client), + _availabilityGroupListenersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -104,20 +116,16 @@ public virtual async Task> Creat /// Creates or updates an availability group listener. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Operation Id - /// AvailabilityGroupListeners_CreateOrUpdate + /// Operation Id. + /// AvailabilityGroupListeners_CreateOrUpdate. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// @@ -125,21 +133,34 @@ public virtual async Task> Creat /// Name of the availability group listener. /// The availability group listener. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// or is null. + /// is an empty string, and was expected to be non-empty. public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string availabilityGroupListenerName, AvailabilityGroupListenerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.CreateOrUpdate"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.CreateOrUpdate"); scope.Start(); try { - var response = _availabilityGroupListenerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, data, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(new AvailabilityGroupListenerOperationSource(Client), _availabilityGroupListenerClientDiagnostics, Pipeline, _availabilityGroupListenerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, data).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, AvailabilityGroupListenerData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new AvailabilityGroupListenerOperationSource(Client), + _availabilityGroupListenersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletion(cancellationToken); + } return operation; } catch (Exception e) @@ -153,39 +174,43 @@ public virtual ArmOperation CreateOrUpdate(Wa /// Gets an availability group listener. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Operation Id - /// AvailabilityGroupListeners_Get + /// Operation Id. + /// AvailabilityGroupListeners_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// Name of the availability group listener. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetAsync(string availabilityGroupListenerName, string expand = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetAsync(string availabilityGroupListenerName, string expand = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.Get"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.Get"); scope.Start(); try { - var response = await _availabilityGroupListenerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(AvailabilityGroupListenerData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new AvailabilityGroupListenerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -199,39 +224,43 @@ public virtual async Task> GetAsync( /// Gets an availability group listener. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} - /// - /// - /// Operation Id - /// AvailabilityGroupListeners_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// AvailabilityGroupListeners_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// Name of the availability group listener. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Get(string availabilityGroupListenerName, string expand = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + public virtual Response Get(string availabilityGroupListenerName, string expand = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.Get"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.Get"); scope.Start(); try { - var response = _availabilityGroupListenerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(AvailabilityGroupListenerData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new AvailabilityGroupListenerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -245,50 +274,44 @@ public virtual Response Get(string availabili /// Lists all availability group listeners in a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners. /// /// - /// Operation Id - /// AvailabilityGroupListeners_ListByGroup + /// Operation Id. + /// AvailabilityGroupListeners_ListByGroup. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. + /// A collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _availabilityGroupListenerRestClient.CreateListByGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _availabilityGroupListenerRestClient.CreateListByGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AvailabilityGroupListenerResource(Client, AvailabilityGroupListenerData.DeserializeAvailabilityGroupListenerData(e)), _availabilityGroupListenerClientDiagnostics, Pipeline, "AvailabilityGroupListenerCollection.GetAll", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT(_availabilityGroupListenersRestClient, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context), data => new AvailabilityGroupListenerResource(Client, data)); } /// /// Lists all availability group listeners in a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners - /// - /// - /// Operation Id - /// AvailabilityGroupListeners_ListByGroup + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// AvailabilityGroupListeners_ListByGroup. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// @@ -296,46 +319,62 @@ public virtual AsyncPageable GetAllAsync(Canc /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _availabilityGroupListenerRestClient.CreateListByGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _availabilityGroupListenerRestClient.CreateListByGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AvailabilityGroupListenerResource(Client, AvailabilityGroupListenerData.DeserializeAvailabilityGroupListenerData(e)), _availabilityGroupListenerClientDiagnostics, Pipeline, "AvailabilityGroupListenerCollection.GetAll", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new AvailabilityGroupListenersGetByGroupCollectionResultOfT(_availabilityGroupListenersRestClient, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context), data => new AvailabilityGroupListenerResource(Client, data)); } /// /// Checks to see if the resource exists in azure. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} - /// - /// - /// Operation Id - /// AvailabilityGroupListeners_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// AvailabilityGroupListeners_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// Name of the availability group listener. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> ExistsAsync(string availabilityGroupListenerName, string expand = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + public virtual async Task> ExistsAsync(string availabilityGroupListenerName, string expand = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.Exists"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.Exists"); scope.Start(); try { - var response = await _availabilityGroupListenerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(AvailabilityGroupListenerData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((AvailabilityGroupListenerData)null, result); + break; + default: + throw new RequestFailedException(result); + } return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -349,37 +388,51 @@ public virtual async Task> ExistsAsync(string availabilityGroupLi /// Checks to see if the resource exists in azure. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Operation Id - /// AvailabilityGroupListeners_Get + /// Operation Id. + /// AvailabilityGroupListeners_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// Name of the availability group listener. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. - public virtual Response Exists(string availabilityGroupListenerName, string expand = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + public virtual Response Exists(string availabilityGroupListenerName, string expand = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.Exists"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.Exists"); scope.Start(); try { - var response = _availabilityGroupListenerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, cancellationToken: cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(AvailabilityGroupListenerData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((AvailabilityGroupListenerData)null, result); + break; + default: + throw new RequestFailedException(result); + } return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -393,39 +446,55 @@ public virtual Response Exists(string availabilityGroupListenerName, strin /// Tries to get details for this resource from the service. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} - /// - /// - /// Operation Id - /// AvailabilityGroupListeners_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// AvailabilityGroupListeners_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// Name of the availability group listener. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. - public virtual async Task> GetIfExistsAsync(string availabilityGroupListenerName, string expand = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetIfExistsAsync(string availabilityGroupListenerName, string expand = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.GetIfExists"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.GetIfExists"); scope.Start(); try { - var response = await _availabilityGroupListenerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(AvailabilityGroupListenerData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((AvailabilityGroupListenerData)null, result); + break; + default: + throw new RequestFailedException(result); + } if (response.Value == null) + { return new NoValueResponse(response.GetRawResponse()); + } return Response.FromValue(new AvailabilityGroupListenerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -439,39 +508,55 @@ public virtual async Task> G /// Tries to get details for this resource from the service. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Operation Id - /// AvailabilityGroupListeners_Get + /// Operation Id. + /// AvailabilityGroupListeners_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// Name of the availability group listener. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. /// is null. - public virtual NullableResponse GetIfExists(string availabilityGroupListenerName, string expand = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + public virtual NullableResponse GetIfExists(string availabilityGroupListenerName, string expand = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.GetIfExists"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.GetIfExists"); scope.Start(); try { - var response = _availabilityGroupListenerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, cancellationToken: cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, expand, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(AvailabilityGroupListenerData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((AvailabilityGroupListenerData)null, result); + break; + default: + throw new RequestFailedException(result); + } if (response.Value == null) + { return new NoValueResponse(response.GetRawResponse()); + } return Response.FromValue(new AvailabilityGroupListenerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -491,6 +576,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } + /// The cancellation token to use. IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.Serialization.cs index b7a8bba6bd30..01b7592e1e75 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.Serialization.cs @@ -10,16 +10,18 @@ using System.Collections.Generic; using System.Text; using System.Text.Json; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { - public partial class AvailabilityGroupListenerData : IUtf8JsonSerializable, IJsonModel + /// A SQL Server availability group listener. + public partial class AvailabilityGroupListenerData : ResourceData, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -31,224 +33,114 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupListenerData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); - } - if (Optional.IsDefined(AvailabilityGroupName)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("availabilityGroupName"u8); - writer.WriteStringValue(AvailabilityGroupName); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); } - if (Optional.IsCollectionDefined(LoadBalancerConfigurations)) - { - writer.WritePropertyName("loadBalancerConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in LoadBalancerConfigurations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(MultiSubnetIPConfigurations)) - { - writer.WritePropertyName("multiSubnetIpConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in MultiSubnetIPConfigurations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(CreateDefaultAvailabilityGroupIfNotExist)) - { - writer.WritePropertyName("createDefaultAvailabilityGroupIfNotExist"u8); - writer.WriteBooleanValue(CreateDefaultAvailabilityGroupIfNotExist.Value); - } - if (Optional.IsDefined(Port)) - { - writer.WritePropertyName("port"u8); - writer.WriteNumberValue(Port.Value); - } - if (Optional.IsDefined(AvailabilityGroupConfiguration)) - { - writer.WritePropertyName("availabilityGroupConfiguration"u8); - writer.WriteObjectValue(AvailabilityGroupConfiguration, options); - } - writer.WriteEndObject(); } - AvailabilityGroupListenerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + AvailabilityGroupListenerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (AvailabilityGroupListenerData)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupListenerData)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAvailabilityGroupListenerData(document.RootElement, options); } - internal static AvailabilityGroupListenerData DeserializeAvailabilityGroupListenerData(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AvailabilityGroupListenerData DeserializeAvailabilityGroupListenerData(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } ResourceIdentifier id = default; string name = default; - ResourceType type = default; + ResourceType resourceType = default; SystemData systemData = default; - string provisioningState = default; - string availabilityGroupName = default; - IList loadBalancerConfigurations = default; - IList multiSubnetIPConfigurations = default; - bool? createDefaultAvailabilityGroupIfNotExist = default; - int? port = default; - AvailabilityGroupConfiguration availabilityGroupConfiguration = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + AvailabilityGroupListenerProperties properties = default; + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("id"u8)) + if (prop.NameEquals("id"u8)) { - id = new ResourceIdentifier(property.Value.GetString()); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("name"u8)) { - name = property.Value.GetString(); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("type"u8)) { - type = new ResourceType(property.Value.GetString()); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ResourceType(prop.Value.GetString()); continue; } - if (property.NameEquals("systemData"u8)) + if (prop.NameEquals("systemData"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerSqlVirtualMachineContext.Default); + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerSqlVirtualMachineContext.Default); continue; } - if (property.NameEquals("properties"u8)) + if (prop.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - property.ThrowNonNullablePropertyIsNull(); continue; } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("provisioningState"u8)) - { - provisioningState = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("availabilityGroupName"u8)) - { - availabilityGroupName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("loadBalancerConfigurations"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(AvailabilityGroupListenerLoadBalancerConfiguration.DeserializeAvailabilityGroupListenerLoadBalancerConfiguration(item, options)); - } - loadBalancerConfigurations = array; - continue; - } - if (property0.NameEquals("multiSubnetIpConfigurations"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property0.Value.EnumerateArray()) - { - array.Add(MultiSubnetIPConfiguration.DeserializeMultiSubnetIPConfiguration(item, options)); - } - multiSubnetIPConfigurations = array; - continue; - } - if (property0.NameEquals("createDefaultAvailabilityGroupIfNotExist"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createDefaultAvailabilityGroupIfNotExist = property0.Value.GetBoolean(); - continue; - } - if (property0.NameEquals("port"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - port = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("availabilityGroupConfiguration"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - availabilityGroupConfiguration = AvailabilityGroupConfiguration.DeserializeAvailabilityGroupConfiguration(property0.Value, options); - continue; - } - } + properties = AvailabilityGroupListenerProperties.DeserializeAvailabilityGroupListenerProperties(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AvailabilityGroupListenerData( id, name, - type, + resourceType, systemData, - provisioningState, - availabilityGroupName, - loadBalancerConfigurations ?? new ChangeTrackingList(), - multiSubnetIPConfigurations ?? new ChangeTrackingList(), - createDefaultAvailabilityGroupIfNotExist, - port, - availabilityGroupConfiguration, - serializedAdditionalRawData); + additionalBinaryDataProperties, + properties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -258,15 +150,20 @@ BinaryData IPersistableModel.Write(ModelReaderWri } } - AvailabilityGroupListenerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + AvailabilityGroupListenerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (AvailabilityGroupListenerData)PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAvailabilityGroupListenerData(document.RootElement, options); } default: @@ -274,6 +171,26 @@ AvailabilityGroupListenerData IPersistableModel.C } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(AvailabilityGroupListenerData availabilityGroupListenerData) + { + if (availabilityGroupListenerData == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(availabilityGroupListenerData, ModelSerializationExtensions.WireOptions); + return content; + } + + /// The to deserialize the from. + internal static AvailabilityGroupListenerData FromResponse(Response response) + { + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAvailabilityGroupListenerData(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.cs index 67fafa5ab268..a94ee0776198 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.cs @@ -13,98 +13,129 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - /// - /// A class representing the AvailabilityGroupListener data model. - /// A SQL Server availability group listener. - /// + /// A SQL Server availability group listener. public partial class AvailabilityGroupListenerData : ResourceData { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public AvailabilityGroupListenerData() { - LoadBalancerConfigurations = new ChangeTrackingList(); - MultiSubnetIPConfigurations = new ChangeTrackingList(); } /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Provisioning state to track the async operation status. - /// Name of the availability group. - /// List of load balancer configurations for an availability group listener. - /// List of multi subnet IP configurations for an AG listener. - /// Create a default availability group if it does not exist. - /// Listener port. - /// Availability Group configuration. - /// Keeps track of any properties unknown to the library. - internal AvailabilityGroupListenerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string provisioningState, string availabilityGroupName, IList loadBalancerConfigurations, IList multiSubnetIPConfigurations, bool? createDefaultAvailabilityGroupIfNotExist, int? port, AvailabilityGroupConfiguration availabilityGroupConfiguration, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Keeps track of any properties unknown to the library. + /// Resource properties. + internal AvailabilityGroupListenerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, AvailabilityGroupListenerProperties properties) : base(id, name, resourceType, systemData) { - ProvisioningState = provisioningState; - AvailabilityGroupName = availabilityGroupName; - LoadBalancerConfigurations = loadBalancerConfigurations; - MultiSubnetIPConfigurations = multiSubnetIPConfigurations; - CreateDefaultAvailabilityGroupIfNotExist = createDefaultAvailabilityGroupIfNotExist; - Port = port; - AvailabilityGroupConfiguration = availabilityGroupConfiguration; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + Properties = properties; } + /// Resource properties. + internal AvailabilityGroupListenerProperties Properties { get; set; } + /// Provisioning state to track the async operation status. - public string ProvisioningState { get; } + public string ProvisioningState + { + get + { + return Properties is null ? default : Properties.ProvisioningState; + } + } + /// Name of the availability group. - public string AvailabilityGroupName { get; set; } + public string AvailabilityGroupName + { + get + { + return Properties is null ? default : Properties.AvailabilityGroupName; + } + set + { + if (Properties is null) + { + Properties = new AvailabilityGroupListenerProperties(); + } + Properties.AvailabilityGroupName = value; + } + } + /// List of load balancer configurations for an availability group listener. - public IList LoadBalancerConfigurations { get; } + public IList LoadBalancerConfigurations + { + get + { + if (Properties is null) + { + Properties = new AvailabilityGroupListenerProperties(); + } + return Properties.LoadBalancerConfigurations; + } + } + /// List of multi subnet IP configurations for an AG listener. - public IList MultiSubnetIPConfigurations { get; } + public IList MultiSubnetIPConfigurations + { + get + { + if (Properties is null) + { + Properties = new AvailabilityGroupListenerProperties(); + } + return Properties.MultiSubnetIPConfigurations; + } + } + /// Create a default availability group if it does not exist. - public bool? CreateDefaultAvailabilityGroupIfNotExist { get; set; } + public bool? CreateDefaultAvailabilityGroupIfNotExist + { + get + { + return Properties is null ? default : Properties.CreateDefaultAvailabilityGroupIfNotExist; + } + set + { + if (Properties is null) + { + Properties = new AvailabilityGroupListenerProperties(); + } + Properties.CreateDefaultAvailabilityGroupIfNotExist = value.Value; + } + } + /// Listener port. - public int? Port { get; set; } - /// Availability Group configuration. - internal AvailabilityGroupConfiguration AvailabilityGroupConfiguration { get; set; } + public int? Port + { + get + { + return Properties is null ? default : Properties.Port; + } + set + { + if (Properties is null) + { + Properties = new AvailabilityGroupListenerProperties(); + } + Properties.Port = value.Value; + } + } + /// Replica configurations. public IList AvailabilityGroupReplicas { get { - if (AvailabilityGroupConfiguration is null) - AvailabilityGroupConfiguration = new AvailabilityGroupConfiguration(); - return AvailabilityGroupConfiguration.Replicas; + if (Properties is null) + { + Properties = new AvailabilityGroupListenerProperties(); + } + return Properties.AvailabilityGroupReplicas; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.Serialization.cs index 6f510459b756..ffe3051bebca 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.Serialization.cs @@ -11,19 +11,29 @@ namespace Azure.ResourceManager.SqlVirtualMachine { + /// public partial class AvailabilityGroupListenerResource : IJsonModel { - private static AvailabilityGroupListenerData s_dataDeserializationInstance; - private static AvailabilityGroupListenerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + private static IJsonModel s_dataDeserializationInstance; + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new AvailabilityGroupListenerData(); + + /// The writer to serialize the model to. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AvailabilityGroupListenerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + /// The reader for deserializing the model. + /// The client options for reading and writing models. + AvailabilityGroupListenerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options); + /// The client options for reading and writing models. BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlVirtualMachineContext.Default); + /// The binary data to be processed. + /// The client options for reading and writing models. AvailabilityGroupListenerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlVirtualMachineContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.cs index 3df1f999398b..a426263a6735 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.cs @@ -6,46 +6,35 @@ #nullable disable using System; -using System.Globalization; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; namespace Azure.ResourceManager.SqlVirtualMachine { /// - /// A Class representing an AvailabilityGroupListener along with the instance operations that can be performed on it. - /// If you have a you can construct an - /// from an instance of using the GetAvailabilityGroupListenerResource method. - /// Otherwise you can get one from its parent resource using the GetAvailabilityGroupListener method. + /// A class representing a AvailabilityGroupListener along with the instance operations that can be performed on it. + /// If you have a you can construct a from an instance of using the GetResource method. + /// Otherwise you can get one from its parent resource using the GetAvailabilityGroupListeners method. /// public partial class AvailabilityGroupListenerResource : ArmResource { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The sqlVmGroupName. - /// The availabilityGroupListenerName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVmGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _availabilityGroupListenerClientDiagnostics; - private readonly AvailabilityGroupListenersRestOperations _availabilityGroupListenerRestClient; + private readonly ClientDiagnostics _availabilityGroupListenersClientDiagnostics; + private readonly AvailabilityGroupListeners _availabilityGroupListenersRestClient; private readonly AvailabilityGroupListenerData _data; - /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners"; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of AvailabilityGroupListenerResource for mocking. protected AvailabilityGroupListenerResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The resource that is the target of operations. internal AvailabilityGroupListenerResource(ArmClient client, AvailabilityGroupListenerData data) : this(client, data.Id) @@ -54,72 +43,94 @@ internal AvailabilityGroupListenerResource(ArmClient client, AvailabilityGroupLi _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal AvailabilityGroupListenerResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _availabilityGroupListenerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string availabilityGroupListenerApiVersion); - _availabilityGroupListenerRestClient = new AvailabilityGroupListenersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, availabilityGroupListenerApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif + _availabilityGroupListenersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", ResourceType.Namespace, Diagnostics); + _availabilityGroupListenersRestClient = new AvailabilityGroupListeners(_availabilityGroupListenersClientDiagnostics, Pipeline, Endpoint, availabilityGroupListenerApiVersion ?? "2023-10-01"); + ValidateResourceId(id); } /// Gets whether or not the current instance has data. public virtual bool HasData { get; } /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. public virtual AvailabilityGroupListenerData Data { get { if (!HasData) + { throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + } return _data; } } + /// Generate the resource identifier for this resource. + /// The subscriptionId. + /// The resourceGroupName. + /// The sqlVirtualMachineGroupName. + /// The availabilityGroupListenerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName) + { + string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}"; + return new ResourceIdentifier(resourceId); + } + + /// + [Conditional("DEBUG")] internal static void ValidateResourceId(ResourceIdentifier id) { if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), id); + } } /// /// Gets an availability group listener. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Operation Id - /// AvailabilityGroupListeners_Get + /// Operation Id. + /// AvailabilityGroupListeners_Get. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The child resources to include in the response. /// The cancellation token to use. - public virtual async Task> GetAsync(string expand = null, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string expand = default, CancellationToken cancellationToken = default) { - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Get"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Get"); scope.Start(); try { - var response = await _availabilityGroupListenerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, expand, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, expand, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(AvailabilityGroupListenerData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new AvailabilityGroupListenerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -133,34 +144,42 @@ public virtual async Task> GetAsync( /// Gets an availability group listener. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Operation Id - /// AvailabilityGroupListeners_Get + /// Operation Id. + /// AvailabilityGroupListeners_Get. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The child resources to include in the response. /// The cancellation token to use. - public virtual Response Get(string expand = null, CancellationToken cancellationToken = default) + public virtual Response Get(string expand = default, CancellationToken cancellationToken = default) { - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Get"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Get"); scope.Start(); try { - var response = _availabilityGroupListenerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, expand, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, expand, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(AvailabilityGroupListenerData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new AvailabilityGroupListenerResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -174,20 +193,20 @@ public virtual Response Get(string expand = n /// Deletes an availability group listener. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Operation Id - /// AvailabilityGroupListeners_Delete + /// Operation Id. + /// AvailabilityGroupListeners_Delete. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -195,14 +214,21 @@ public virtual Response Get(string expand = n /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Delete"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Delete"); scope.Start(); try { - var response = await _availabilityGroupListenerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(_availabilityGroupListenerClientDiagnostics, Pipeline, _availabilityGroupListenerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_availabilityGroupListenersClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -216,20 +242,20 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// Deletes an availability group listener. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Operation Id - /// AvailabilityGroupListeners_Delete + /// Operation Id. + /// AvailabilityGroupListeners_Delete. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -237,14 +263,21 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Delete"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Delete"); scope.Start(); try { - var response = _availabilityGroupListenerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(_availabilityGroupListenerClientDiagnostics, Pipeline, _availabilityGroupListenerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_availabilityGroupListenersClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -255,23 +288,23 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Creates or updates an availability group listener. + /// Update a AvailabilityGroupListener. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Operation Id - /// AvailabilityGroupListeners_CreateOrUpdate + /// Operation Id. + /// AvailabilityGroupListeners_CreateOrUpdate. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -283,14 +316,27 @@ public virtual async Task> Updat { Argument.AssertNotNull(data, nameof(data)); - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Update"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Update"); scope.Start(); try { - var response = await _availabilityGroupListenerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(new AvailabilityGroupListenerOperationSource(Client), _availabilityGroupListenerClientDiagnostics, Pipeline, _availabilityGroupListenerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, AvailabilityGroupListenerData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new AvailabilityGroupListenerOperationSource(Client), + _availabilityGroupListenersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -301,23 +347,23 @@ public virtual async Task> Updat } /// - /// Creates or updates an availability group listener. + /// Update a AvailabilityGroupListener. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}. /// /// - /// Operation Id - /// AvailabilityGroupListeners_CreateOrUpdate + /// Operation Id. + /// AvailabilityGroupListeners_CreateOrUpdate. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -329,14 +375,27 @@ public virtual ArmOperation Update(WaitUntil { Argument.AssertNotNull(data, nameof(data)); - using var scope = _availabilityGroupListenerClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Update"); + using DiagnosticScope scope = _availabilityGroupListenersClientDiagnostics.CreateScope("AvailabilityGroupListenerResource.Update"); scope.Start(); try { - var response = _availabilityGroupListenerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(new AvailabilityGroupListenerOperationSource(Client), _availabilityGroupListenerClientDiagnostics, Pipeline, _availabilityGroupListenerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _availabilityGroupListenersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, AvailabilityGroupListenerData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new AvailabilityGroupListenerOperationSource(Client), + _availabilityGroupListenersClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletion(cancellationToken); + } return operation; } catch (Exception e) diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..0428fe600eed --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT : AsyncPageable + { + private readonly AvailabilityGroupListeners _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _sqlVirtualMachineGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The AvailabilityGroupListeners client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the SQL virtual machine group. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT(AvailabilityGroupListeners client, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _sqlVirtualMachineGroupName = sqlVirtualMachineGroupName; + _context = context; + } + + /// Gets the pages of AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + AvailabilityGroupListenerListResult result = AvailabilityGroupListenerListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context) : _client.CreateGetByGroupRequest(_subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.GetAll"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupCollectionResultOfT.cs new file mode 100644 index 000000000000..3d99b3015052 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupCollectionResultOfT.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class AvailabilityGroupListenersGetByGroupCollectionResultOfT : Pageable + { + private readonly AvailabilityGroupListeners _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _sqlVirtualMachineGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of AvailabilityGroupListenersGetByGroupCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The AvailabilityGroupListeners client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the SQL virtual machine group. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public AvailabilityGroupListenersGetByGroupCollectionResultOfT(AvailabilityGroupListeners client, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _sqlVirtualMachineGroupName = sqlVirtualMachineGroupName; + _context = context; + } + + /// Gets the pages of AvailabilityGroupListenersGetByGroupCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of AvailabilityGroupListenersGetByGroupCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + AvailabilityGroupListenerListResult result = AvailabilityGroupListenerListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context) : _client.CreateGetByGroupRequest(_subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.GetAll"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllAsyncCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..73610057e025 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllAsyncCollectionResultOfT.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class OperationsGetAllAsyncCollectionResultOfT : AsyncPageable + { + private readonly Operations _client; + private readonly RequestContext _context; + + /// Initializes a new instance of OperationsGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The Operations client used to send requests. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public OperationsGetAllAsyncCollectionResultOfT(Operations client, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _context = context; + } + + /// Gets the pages of OperationsGetAllAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of OperationsGetAllAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + OperationListResult result = OperationListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _context) : _client.CreateGetAllRequest(_context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableSqlVirtualMachineTenantResource.GetAll"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllCollectionResultOfT.cs new file mode 100644 index 000000000000..4af1aa279058 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllCollectionResultOfT.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class OperationsGetAllCollectionResultOfT : Pageable + { + private readonly Operations _client; + private readonly RequestContext _context; + + /// Initializes a new instance of OperationsGetAllCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The Operations client used to send requests. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public OperationsGetAllCollectionResultOfT(Operations client, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _context = context; + } + + /// Gets the pages of OperationsGetAllCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of OperationsGetAllCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + OperationListResult result = OperationListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _context) : _client.CreateGetAllRequest(_context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableSqlVirtualMachineTenantResource.GetAll"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetAllAsyncCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetAllAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..fd20b9f1728d --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetAllAsyncCollectionResultOfT.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachineGroupsGetAllAsyncCollectionResultOfT : AsyncPageable + { + private readonly SqlVirtualMachineGroups _client; + private readonly string _subscriptionId; + private readonly RequestContext _context; + + /// Initializes a new instance of SqlVirtualMachineGroupsGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The SqlVirtualMachineGroups client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SqlVirtualMachineGroupsGetAllAsyncCollectionResultOfT(SqlVirtualMachineGroups client, string subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _context = context; + } + + /// Gets the pages of SqlVirtualMachineGroupsGetAllAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SqlVirtualMachineGroupsGetAllAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + SqlVirtualMachineGroupListResult result = SqlVirtualMachineGroupListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _context) : _client.CreateGetAllRequest(_subscriptionId, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableSqlVirtualMachineSubscriptionResource.GetSqlVmGroups"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetAllCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetAllCollectionResultOfT.cs new file mode 100644 index 000000000000..7a665789cef1 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetAllCollectionResultOfT.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachineGroupsGetAllCollectionResultOfT : Pageable + { + private readonly SqlVirtualMachineGroups _client; + private readonly string _subscriptionId; + private readonly RequestContext _context; + + /// Initializes a new instance of SqlVirtualMachineGroupsGetAllCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The SqlVirtualMachineGroups client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SqlVirtualMachineGroupsGetAllCollectionResultOfT(SqlVirtualMachineGroups client, string subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _context = context; + } + + /// Gets the pages of SqlVirtualMachineGroupsGetAllCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SqlVirtualMachineGroupsGetAllCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + SqlVirtualMachineGroupListResult result = SqlVirtualMachineGroupListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _context) : _client.CreateGetAllRequest(_subscriptionId, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableSqlVirtualMachineSubscriptionResource.GetSqlVmGroups"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetByResourceGroupAsyncCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetByResourceGroupAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..bf70fc409f23 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetByResourceGroupAsyncCollectionResultOfT.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachineGroupsGetByResourceGroupAsyncCollectionResultOfT : AsyncPageable + { + private readonly SqlVirtualMachineGroups _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of SqlVirtualMachineGroupsGetByResourceGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The SqlVirtualMachineGroups client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SqlVirtualMachineGroupsGetByResourceGroupAsyncCollectionResultOfT(SqlVirtualMachineGroups client, string subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _context = context; + } + + /// Gets the pages of SqlVirtualMachineGroupsGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SqlVirtualMachineGroupsGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + SqlVirtualMachineGroupListResult result = SqlVirtualMachineGroupListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("SqlVmGroupCollection.GetAll"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetByResourceGroupCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetByResourceGroupCollectionResultOfT.cs new file mode 100644 index 000000000000..bef47951efbe --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachineGroupsGetByResourceGroupCollectionResultOfT.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachineGroupsGetByResourceGroupCollectionResultOfT : Pageable + { + private readonly SqlVirtualMachineGroups _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of SqlVirtualMachineGroupsGetByResourceGroupCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The SqlVirtualMachineGroups client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SqlVirtualMachineGroupsGetByResourceGroupCollectionResultOfT(SqlVirtualMachineGroups client, string subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _context = context; + } + + /// Gets the pages of SqlVirtualMachineGroupsGetByResourceGroupCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SqlVirtualMachineGroupsGetByResourceGroupCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + SqlVirtualMachineGroupListResult result = SqlVirtualMachineGroupListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("SqlVmGroupCollection.GetAll"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetAllAsyncCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetAllAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..e6475a5b4605 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetAllAsyncCollectionResultOfT.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachinesGetAllAsyncCollectionResultOfT : AsyncPageable + { + private readonly SqlVirtualMachines _client; + private readonly string _subscriptionId; + private readonly RequestContext _context; + + /// Initializes a new instance of SqlVirtualMachinesGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The SqlVirtualMachines client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SqlVirtualMachinesGetAllAsyncCollectionResultOfT(SqlVirtualMachines client, string subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _context = context; + } + + /// Gets the pages of SqlVirtualMachinesGetAllAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SqlVirtualMachinesGetAllAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + SqlVirtualMachineListResult result = SqlVirtualMachineListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _context) : _client.CreateGetAllRequest(_subscriptionId, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableSqlVirtualMachineSubscriptionResource.GetSqlVms"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetAllCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetAllCollectionResultOfT.cs new file mode 100644 index 000000000000..179a0b678508 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetAllCollectionResultOfT.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachinesGetAllCollectionResultOfT : Pageable + { + private readonly SqlVirtualMachines _client; + private readonly string _subscriptionId; + private readonly RequestContext _context; + + /// Initializes a new instance of SqlVirtualMachinesGetAllCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The SqlVirtualMachines client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SqlVirtualMachinesGetAllCollectionResultOfT(SqlVirtualMachines client, string subscriptionId, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _context = context; + } + + /// Gets the pages of SqlVirtualMachinesGetAllCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SqlVirtualMachinesGetAllCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + SqlVirtualMachineListResult result = SqlVirtualMachineListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _subscriptionId, _context) : _client.CreateGetAllRequest(_subscriptionId, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableSqlVirtualMachineSubscriptionResource.GetSqlVms"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetByResourceGroupAsyncCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetByResourceGroupAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..f01b87e64457 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetByResourceGroupAsyncCollectionResultOfT.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachinesGetByResourceGroupAsyncCollectionResultOfT : AsyncPageable + { + private readonly SqlVirtualMachines _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of SqlVirtualMachinesGetByResourceGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The SqlVirtualMachines client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SqlVirtualMachinesGetByResourceGroupAsyncCollectionResultOfT(SqlVirtualMachines client, string subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _context = context; + } + + /// Gets the pages of SqlVirtualMachinesGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SqlVirtualMachinesGetByResourceGroupAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + SqlVirtualMachineListResult result = SqlVirtualMachineListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("SqlVmCollection.GetAll"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetByResourceGroupCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetByResourceGroupCollectionResultOfT.cs new file mode 100644 index 000000000000..179f3fb3717c --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetByResourceGroupCollectionResultOfT.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachinesGetByResourceGroupCollectionResultOfT : Pageable + { + private readonly SqlVirtualMachines _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of SqlVirtualMachinesGetByResourceGroupCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The SqlVirtualMachines client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SqlVirtualMachinesGetByResourceGroupCollectionResultOfT(SqlVirtualMachines client, string subscriptionId, string resourceGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _context = context; + } + + /// Gets the pages of SqlVirtualMachinesGetByResourceGroupCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SqlVirtualMachinesGetByResourceGroupCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + SqlVirtualMachineListResult result = SqlVirtualMachineListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetByResourceGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _context) : _client.CreateGetByResourceGroupRequest(_subscriptionId, _resourceGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("SqlVmCollection.GetAll"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..8b2dd05e7724 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT : AsyncPageable + { + private readonly SqlVirtualMachines _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _sqlVirtualMachineGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The SqlVirtualMachines client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the SQL virtual machine group. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT(SqlVirtualMachines client, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _sqlVirtualMachineGroupName = sqlVirtualMachineGroupName; + _context = context; + } + + /// Gets the pages of SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT as an enumerable collection. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); + if (response is null) + { + yield break; + } + SqlVirtualMachineListResult result = SqlVirtualMachineListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetSqlVmsBySqlVmGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context) : _client.CreateGetSqlVmsBySqlVmGroupRequest(_subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("SqlVmGroupResource.GetSqlVmsBySqlVmGroup"); + scope.Start(); + try + { + return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT.cs new file mode 100644 index 000000000000..2d64dd25a53a --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT : Pageable + { + private readonly SqlVirtualMachines _client; + private readonly string _subscriptionId; + private readonly string _resourceGroupName; + private readonly string _sqlVirtualMachineGroupName; + private readonly RequestContext _context; + + /// Initializes a new instance of SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The SqlVirtualMachines client used to send requests. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of the SQL virtual machine group. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + public SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT(SqlVirtualMachines client, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + { + _client = client; + _subscriptionId = subscriptionId; + _resourceGroupName = resourceGroupName; + _sqlVirtualMachineGroupName = sqlVirtualMachineGroupName; + _context = context; + } + + /// Gets the pages of SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT as an enumerable collection. + /// A continuation token indicating where to resume paging. + /// The number of items per page. + /// The pages of SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT as an enumerable collection. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; + while (true) + { + Response response = GetNextResponse(pageSizeHint, nextPage); + if (response is null) + { + yield break; + } + SqlVirtualMachineListResult result = SqlVirtualMachineListResult.FromResponse(response); + yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); + nextPage = result.NextLink; + if (nextPage == null) + { + yield break; + } + } + } + + /// Get next page. + /// The number of items per page. + /// The next link to use for the next page of results. + private Response GetNextResponse(int? pageSizeHint, Uri nextLink) + { + HttpMessage message = nextLink != null ? _client.CreateNextGetSqlVmsBySqlVmGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context) : _client.CreateGetSqlVmsBySqlVmGroupRequest(_subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context); + using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("SqlVmGroupResource.GetSqlVmsBySqlVmGroup"); + scope.Start(); + try + { + return _client.Pipeline.ProcessMessage(message, _context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineArmClient.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineArmClient.cs index d56152386401..dd1bc31934ca 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineArmClient.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineArmClient.cs @@ -6,38 +6,27 @@ #nullable disable using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Mocking { - /// A class to add extension methods to ArmClient. + /// A class to add extension methods to . public partial class MockableSqlVirtualMachineArmClient : ArmResource { - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of MockableSqlVirtualMachineArmClient for mocking. protected MockableSqlVirtualMachineArmClient() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal MockableSqlVirtualMachineArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) { } - internal MockableSqlVirtualMachineArmClient(ArmClient client) : this(client, ResourceIdentifier.Root) - { - } - - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. - /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// The resource ID of the resource to get. /// Returns a object. public virtual AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(ResourceIdentifier id) @@ -46,22 +35,7 @@ public virtual AvailabilityGroupListenerResource GetAvailabilityGroupListenerRes return new AvailabilityGroupListenerResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual SqlVmGroupResource GetSqlVmGroupResource(ResourceIdentifier id) - { - SqlVmGroupResource.ValidateResourceId(id); - return new SqlVmGroupResource(Client, id); - } - - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// The resource ID of the resource to get. /// Returns a object. public virtual SqlVmResource GetSqlVmResource(ResourceIdentifier id) @@ -69,5 +43,14 @@ public virtual SqlVmResource GetSqlVmResource(ResourceIdentifier id) SqlVmResource.ValidateResourceId(id); return new SqlVmResource(Client, id); } + + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// The resource ID of the resource to get. + /// Returns a object. + public virtual SqlVmGroupResource GetSqlVmGroupResource(ResourceIdentifier id) + { + SqlVmGroupResource.ValidateResourceId(id); + return new SqlVmGroupResource(Client, id); + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineResourceGroupResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineResourceGroupResource.cs index 17b28f434ea8..0f497bf99b1f 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineResourceGroupResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineResourceGroupResource.cs @@ -8,169 +8,159 @@ using System; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Mocking { - /// A class to add extension methods to ResourceGroupResource. + /// A class to add extension methods to . public partial class MockableSqlVirtualMachineResourceGroupResource : ArmResource { - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of MockableSqlVirtualMachineResourceGroupResource for mocking. protected MockableSqlVirtualMachineResourceGroupResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal MockableSqlVirtualMachineResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) { } - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } - - /// Gets a collection of SqlVmGroupResources in the ResourceGroupResource. - /// An object representing collection of SqlVmGroupResources and their operations over a SqlVmGroupResource. - public virtual SqlVmGroupCollection GetSqlVmGroups() + /// Gets a collection of SqlVms in the . + /// An object representing collection of SqlVms and their operations over a SqlVmResource. + public virtual SqlVmCollection GetSqlVms() { - return GetCachedClient(client => new SqlVmGroupCollection(client, Id)); + return GetCachedClient(client => new SqlVmCollection(client, Id)); } /// - /// Gets a SQL virtual machine group. + /// Gets a SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Get + /// Operation Id. + /// SqlVirtualMachines_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine. + /// The child resources to include in the response. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetSqlVmGroupAsync(string sqlVmGroupName, CancellationToken cancellationToken = default) + public virtual async Task> GetSqlVmAsync(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) { - return await GetSqlVmGroups().GetAsync(sqlVmGroupName, cancellationToken).ConfigureAwait(false); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + + return await GetSqlVms().GetAsync(sqlVirtualMachineName, expand, cancellationToken).ConfigureAwait(false); } /// - /// Gets a SQL virtual machine group. + /// Gets a SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachines_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine. + /// The child resources to include in the response. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetSqlVmGroup(string sqlVmGroupName, CancellationToken cancellationToken = default) + public virtual Response GetSqlVm(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) { - return GetSqlVmGroups().Get(sqlVmGroupName, cancellationToken); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + + return GetSqlVms().Get(sqlVirtualMachineName, expand, cancellationToken); } - /// Gets a collection of SqlVmResources in the ResourceGroupResource. - /// An object representing collection of SqlVmResources and their operations over a SqlVmResource. - public virtual SqlVmCollection GetSqlVms() + /// Gets a collection of SqlVmGroups in the . + /// An object representing collection of SqlVmGroups and their operations over a SqlVmGroupResource. + public virtual SqlVmGroupCollection GetSqlVmGroups() { - return GetCachedClient(client => new SqlVmCollection(client, Id)); + return GetCachedClient(client => new SqlVmGroupCollection(client, Id)); } /// - /// Gets a SQL virtual machine. + /// Gets a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachineGroups_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine. - /// The child resources to include in the response. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetSqlVmAsync(string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + public virtual async Task> GetSqlVmGroupAsync(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { - return await GetSqlVms().GetAsync(sqlVmName, expand, cancellationToken).ConfigureAwait(false); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + + return await GetSqlVmGroups().GetAsync(sqlVirtualMachineGroupName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a SQL virtual machine. + /// Gets a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Operation Id. + /// SqlVirtualMachineGroups_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine. - /// The child resources to include in the response. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetSqlVm(string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + public virtual Response GetSqlVmGroup(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { - return GetSqlVms().Get(sqlVmName, expand, cancellationToken); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + + return GetSqlVmGroups().Get(sqlVirtualMachineGroupName, cancellationToken); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineSubscriptionResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineSubscriptionResource.cs index 3f335f440c9e..892216afa8ba 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineSubscriptionResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineSubscriptionResource.cs @@ -6,161 +6,153 @@ #nullable disable using System.Threading; -using Autorest.CSharp.Core; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Mocking { - /// A class to add extension methods to SubscriptionResource. + /// A class to add extension methods to . public partial class MockableSqlVirtualMachineSubscriptionResource : ArmResource { - private ClientDiagnostics _sqlVmGroupSqlVmGroupsClientDiagnostics; - private SqlVirtualMachineGroupsRestOperations _sqlVmGroupSqlVmGroupsRestClient; - private ClientDiagnostics _sqlVmSqlVirtualMachinesClientDiagnostics; - private SqlVirtualMachinesRestOperations _sqlVmSqlVirtualMachinesRestClient; + private ClientDiagnostics _sqlVirtualMachinesClientDiagnostics; + private SqlVirtualMachines _sqlVirtualMachinesRestClient; + private ClientDiagnostics _sqlVirtualMachineGroupsClientDiagnostics; + private SqlVirtualMachineGroups _sqlVirtualMachineGroupsRestClient; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of MockableSqlVirtualMachineSubscriptionResource for mocking. protected MockableSqlVirtualMachineSubscriptionResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal MockableSqlVirtualMachineSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) { } - private ClientDiagnostics SqlVmGroupSqlVirtualMachineGroupsClientDiagnostics => _sqlVmGroupSqlVmGroupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVmGroupResource.ResourceType.Namespace, Diagnostics); - private SqlVirtualMachineGroupsRestOperations SqlVmGroupSqlVirtualMachineGroupsRestClient => _sqlVmGroupSqlVmGroupsRestClient ??= new SqlVirtualMachineGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SqlVmGroupResource.ResourceType)); - private ClientDiagnostics SqlVmSqlVirtualMachinesClientDiagnostics => _sqlVmSqlVirtualMachinesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVmResource.ResourceType.Namespace, Diagnostics); - private SqlVirtualMachinesRestOperations SqlVmSqlVirtualMachinesRestClient => _sqlVmSqlVirtualMachinesRestClient ??= new SqlVirtualMachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SqlVmResource.ResourceType)); + private ClientDiagnostics SqlVirtualMachinesClientDiagnostics => _sqlVirtualMachinesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private string GetApiVersionOrNull(ResourceType resourceType) - { - TryGetApiVersion(resourceType, out string apiVersion); - return apiVersion; - } + private SqlVirtualMachines SqlVirtualMachinesRestClient => _sqlVirtualMachinesRestClient ??= new SqlVirtualMachines(SqlVirtualMachinesClientDiagnostics, Pipeline, Endpoint, "2023-10-01"); + + private ClientDiagnostics SqlVirtualMachineGroupsClientDiagnostics => _sqlVirtualMachineGroupsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics); + + private SqlVirtualMachineGroups SqlVirtualMachineGroupsRestClient => _sqlVirtualMachineGroupsRestClient ??= new SqlVirtualMachineGroups(SqlVirtualMachineGroupsClientDiagnostics, Pipeline, Endpoint, "2023-10-01"); /// - /// Gets all SQL virtual machine groups in a subscription. + /// Gets all SQL virtual machines in a subscription. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_List + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachines_List. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSqlVmGroupsAsync(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSqlVmsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => SqlVmGroupSqlVirtualMachineGroupsRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlVmGroupSqlVirtualMachineGroupsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlVmGroupResource(Client, SqlVmGroupData.DeserializeSqlVmGroupData(e)), SqlVmGroupSqlVirtualMachineGroupsClientDiagnostics, Pipeline, "MockableSqlVirtualMachineSubscriptionResource.GetSqlVmGroups", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new SqlVirtualMachinesGetAllAsyncCollectionResultOfT(SqlVirtualMachinesRestClient, Id.SubscriptionId, context), data => new SqlVmResource(Client, data)); } /// - /// Gets all SQL virtual machine groups in a subscription. + /// Gets all SQL virtual machines in a subscription. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_List + /// Operation Id. + /// SqlVirtualMachines_List. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSqlVmGroups(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSqlVms(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => SqlVmGroupSqlVirtualMachineGroupsRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlVmGroupSqlVirtualMachineGroupsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlVmGroupResource(Client, SqlVmGroupData.DeserializeSqlVmGroupData(e)), SqlVmGroupSqlVirtualMachineGroupsClientDiagnostics, Pipeline, "MockableSqlVirtualMachineSubscriptionResource.GetSqlVmGroups", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new SqlVirtualMachinesGetAllCollectionResultOfT(SqlVirtualMachinesRestClient, Id.SubscriptionId, context), data => new SqlVmResource(Client, data)); } /// - /// Gets all SQL virtual machines in a subscription. + /// Gets all SQL virtual machine groups in a subscription. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups. /// /// - /// Operation Id - /// SqlVirtualMachines_List + /// Operation Id. + /// SqlVirtualMachineGroups_List. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSqlVmsAsync(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSqlVmGroupsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => SqlVmSqlVirtualMachinesRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlVmSqlVirtualMachinesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlVmResource(Client, SqlVmData.DeserializeSqlVmData(e)), SqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, "MockableSqlVirtualMachineSubscriptionResource.GetSqlVms", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new SqlVirtualMachineGroupsGetAllAsyncCollectionResultOfT(SqlVirtualMachineGroupsRestClient, Id.SubscriptionId, context), data => new SqlVmGroupResource(Client, data)); } /// - /// Gets all SQL virtual machines in a subscription. + /// Gets all SQL virtual machine groups in a subscription. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines - /// - /// - /// Operation Id - /// SqlVirtualMachines_List + /// Request Path. + /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachineGroups_List. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSqlVms(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSqlVmGroups(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => SqlVmSqlVirtualMachinesRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlVmSqlVirtualMachinesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlVmResource(Client, SqlVmData.DeserializeSqlVmData(e)), SqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, "MockableSqlVirtualMachineSubscriptionResource.GetSqlVms", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new SqlVirtualMachineGroupsGetAllCollectionResultOfT(SqlVirtualMachineGroupsRestClient, Id.SubscriptionId, context), data => new SqlVmGroupResource(Client, data)); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineTenantResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineTenantResource.cs new file mode 100644 index 000000000000..1c29a67bb5be --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineTenantResource.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SqlVirtualMachine; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine.Mocking +{ + /// A class to add extension methods to . + public partial class MockableSqlVirtualMachineTenantResource : ArmResource + { + private ClientDiagnostics _operationsClientDiagnostics; + private Operations _operationsRestClient; + + /// Initializes a new instance of MockableSqlVirtualMachineTenantResource for mocking. + protected MockableSqlVirtualMachineTenantResource() + { + } + + /// Initializes a new instance of class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal MockableSqlVirtualMachineTenantResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics OperationsClientDiagnostics => _operationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics); + + private Operations OperationsRestClient => _operationsRestClient ??= new Operations(OperationsClientDiagnostics, Pipeline, Endpoint, "2023-10-01"); + + /// + /// Lists all of the available SQL Virtual Machine Rest API operations. + /// + /// + /// Request Path. + /// /providers/Microsoft.SqlVirtualMachine/operations. + /// + /// + /// Operation Id. + /// Operations_List. + /// + /// + /// Default Api Version. + /// 2023-10-01. + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new OperationsGetAllAsyncCollectionResultOfT(OperationsRestClient, context); + } + + /// + /// Lists all of the available SQL Virtual Machine Rest API operations. + /// + /// + /// Request Path. + /// /providers/Microsoft.SqlVirtualMachine/operations. + /// + /// + /// Operation Id. + /// Operations_List. + /// + /// + /// Default Api Version. + /// 2023-10-01. + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new OperationsGetAllCollectionResultOfT(OperationsRestClient, context); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs index d1eb21b936ef..7c954ed1ef9a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs @@ -8,39 +8,50 @@ using System; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; using Azure.ResourceManager.Resources; using Azure.ResourceManager.SqlVirtualMachine.Mocking; +using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { /// A class to add extension methods to Azure.ResourceManager.SqlVirtualMachine. public static partial class SqlVirtualMachineExtensions { + /// private static MockableSqlVirtualMachineArmClient GetMockableSqlVirtualMachineArmClient(ArmClient client) { - return client.GetCachedClient(client0 => new MockableSqlVirtualMachineArmClient(client0)); + return client.GetCachedClient(client0 => new MockableSqlVirtualMachineArmClient(client0, ResourceIdentifier.Root)); } - private static MockableSqlVirtualMachineResourceGroupResource GetMockableSqlVirtualMachineResourceGroupResource(ArmResource resource) + /// + private static MockableSqlVirtualMachineResourceGroupResource GetMockableSqlVirtualMachineResourceGroupResource(ResourceGroupResource resourceGroupResource) { - return resource.GetCachedClient(client => new MockableSqlVirtualMachineResourceGroupResource(client, resource.Id)); + return resourceGroupResource.GetCachedClient(client => new MockableSqlVirtualMachineResourceGroupResource(client, resourceGroupResource.Id)); } - private static MockableSqlVirtualMachineSubscriptionResource GetMockableSqlVirtualMachineSubscriptionResource(ArmResource resource) + /// + private static MockableSqlVirtualMachineSubscriptionResource GetMockableSqlVirtualMachineSubscriptionResource(SubscriptionResource subscriptionResource) { - return resource.GetCachedClient(client => new MockableSqlVirtualMachineSubscriptionResource(client, resource.Id)); + return subscriptionResource.GetCachedClient(client => new MockableSqlVirtualMachineSubscriptionResource(client, subscriptionResource.Id)); + } + + /// + private static MockableSqlVirtualMachineTenantResource GetMockableSqlVirtualMachineTenantResource(TenantResource tenantResource) + { + return tenantResource.GetCachedClient(client => new MockableSqlVirtualMachineTenantResource(client, tenantResource.Id)); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. + /// The the method will execute against. /// The resource ID of the resource to get. /// is null. /// Returns a object. @@ -52,260 +63,200 @@ public static AvailabilityGroupListenerResource GetAvailabilityGroupListenerReso } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. + /// The the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static SqlVmGroupResource GetSqlVmGroupResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SqlVmResource GetSqlVmResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableSqlVirtualMachineArmClient(client).GetSqlVmGroupResource(id); + return GetMockableSqlVirtualMachineArmClient(client).GetSqlVmResource(id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. + /// The the method will execute against. /// The resource ID of the resource to get. /// is null. - /// Returns a object. - public static SqlVmResource GetSqlVmResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SqlVmGroupResource GetSqlVmGroupResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableSqlVirtualMachineArmClient(client).GetSqlVmResource(id); + return GetMockableSqlVirtualMachineArmClient(client).GetSqlVmGroupResource(id); } /// - /// Gets a collection of SqlVmGroupResources in the ResourceGroupResource. + /// Gets a collection of SqlVms in the /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. + /// The the method will execute against. /// is null. - /// An object representing collection of SqlVmGroupResources and their operations over a SqlVmGroupResource. - public static SqlVmGroupCollection GetSqlVmGroups(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of SqlVms and their operations over a SqlVmResource. + public static SqlVmCollection GetSqlVms(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroups(); + return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVms(); } /// - /// Gets a SQL virtual machine group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// + /// Gets a SQL virtual machine. /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// Name of the SQL virtual machine group. + /// The the method will execute against. + /// Name of the SQL virtual machine. + /// The child resources to include in the response. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static async Task> GetSqlVmGroupAsync(this ResourceGroupResource resourceGroupResource, string sqlVmGroupName, CancellationToken cancellationToken = default) + public static async Task> GetSqlVmAsync(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroupAsync(sqlVmGroupName, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmAsync(sqlVirtualMachineName, expand, cancellationToken).ConfigureAwait(false); } /// - /// Gets a SQL virtual machine group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// + /// Gets a SQL virtual machine. /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// Name of the SQL virtual machine group. + /// The the method will execute against. + /// Name of the SQL virtual machine. + /// The child resources to include in the response. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static Response GetSqlVmGroup(this ResourceGroupResource resourceGroupResource, string sqlVmGroupName, CancellationToken cancellationToken = default) + public static Response GetSqlVm(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroup(sqlVmGroupName, cancellationToken); + return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVm(sqlVirtualMachineName, expand, cancellationToken); } /// - /// Gets a collection of SqlVmResources in the ResourceGroupResource. + /// Gets a collection of SqlVmGroups in the /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. + /// The the method will execute against. /// is null. - /// An object representing collection of SqlVmResources and their operations over a SqlVmResource. - public static SqlVmCollection GetSqlVms(this ResourceGroupResource resourceGroupResource) + /// An object representing collection of SqlVmGroups and their operations over a SqlVmGroupResource. + public static SqlVmGroupCollection GetSqlVmGroups(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVms(); + return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroups(); } /// - /// Gets a SQL virtual machine. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// + /// Gets a SQL virtual machine group. /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// Name of the SQL virtual machine. - /// The child resources to include in the response. + /// The the method will execute against. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static async Task> GetSqlVmAsync(this ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + public static async Task> GetSqlVmGroupAsync(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmAsync(sqlVmName, expand, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroupAsync(sqlVirtualMachineGroupName, cancellationToken).ConfigureAwait(false); } /// - /// Gets a SQL virtual machine. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// + /// Gets a SQL virtual machine group. /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. - /// Name of the SQL virtual machine. - /// The child resources to include in the response. + /// The the method will execute against. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public static Response GetSqlVm(this ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + public static Response GetSqlVmGroup(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVm(sqlVmName, expand, cancellationToken); + return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroup(sqlVirtualMachineGroupName, cancellationToken); } /// - /// Gets all SQL virtual machine groups in a subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_List - /// + /// Gets all SQL virtual machines in a subscription. /// - /// Default Api Version - /// 2022-02-01 + /// Mocking. + /// To mock this method, please mock instead. /// + /// + /// The the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSqlVmsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVmsAsync(cancellationToken); + } + + /// + /// Gets all SQL virtual machines in a subscription. /// - /// Resource - /// + /// Mocking. + /// To mock this method, please mock instead. /// - /// + /// + /// The the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSqlVms(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVms(cancellationToken); + } + + /// + /// Gets all SQL virtual machine groups in a subscription. /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. + /// The the method will execute against. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. + /// A collection of that may take multiple service requests to iterate over. public static AsyncPageable GetSqlVmGroupsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -315,30 +266,12 @@ public static AsyncPageable GetSqlVmGroupsAsync(this Subscri /// /// Gets all SQL virtual machine groups in a subscription. - /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_List - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. + /// The the method will execute against. /// The cancellation token to use. /// is null. /// A collection of that may take multiple service requests to iterate over. @@ -350,75 +283,39 @@ public static Pageable GetSqlVmGroups(this SubscriptionResou } /// - /// Gets all SQL virtual machines in a subscription. - /// + /// Lists all of the available SQL Virtual Machine Rest API operations. /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines - /// - /// - /// Operation Id - /// SqlVirtualMachines_List - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. + /// The the method will execute against. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetSqlVmsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAllAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVmsAsync(cancellationToken); + return GetMockableSqlVirtualMachineTenantResource(tenantResource).GetAllAsync(cancellationToken); } /// - /// Gets all SQL virtual machines in a subscription. - /// + /// Lists all of the available SQL Virtual Machine Rest API operations. /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines - /// - /// - /// Operation Id - /// SqlVirtualMachines_List - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. + /// Mocking. + /// To mock this method, please mock instead. /// /// - /// The instance the method will execute against. + /// The the method will execute against. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetSqlVms(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAll(this TenantResource tenantResource, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVms(cancellationToken); + return GetMockableSqlVirtualMachineTenantResource(tenantResource).GetAll(cancellationToken); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Argument.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Argument.cs index aa7e63f41fbd..ceb3a204a067 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Argument.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Argument.cs @@ -11,8 +11,10 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - internal static class Argument + internal static partial class Argument { + /// The value. + /// The name. public static void AssertNotNull(T value, string name) { if (value is null) @@ -21,8 +23,10 @@ public static void AssertNotNull(T value, string name) } } + /// The value. + /// The name. public static void AssertNotNull(T? value, string name) - where T : struct + where T : struct { if (!value.HasValue) { @@ -30,6 +34,8 @@ public static void AssertNotNull(T? value, string name) } } + /// The value. + /// The name. public static void AssertNotNullOrEmpty(IEnumerable value, string name) { if (value is null) @@ -51,6 +57,8 @@ public static void AssertNotNullOrEmpty(IEnumerable value, string name) } } + /// The value. + /// The name. public static void AssertNotNullOrEmpty(string value, string name) { if (value is null) @@ -62,68 +70,5 @@ public static void AssertNotNullOrEmpty(string value, string name) throw new ArgumentException("Value cannot be an empty string.", name); } } - - public static void AssertNotNullOrWhiteSpace(string value, string name) - { - if (value is null) - { - throw new ArgumentNullException(name); - } - if (string.IsNullOrWhiteSpace(value)) - { - throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name); - } - } - - public static void AssertNotDefault(ref T value, string name) - where T : struct, IEquatable - { - if (value.Equals(default)) - { - throw new ArgumentException("Value cannot be empty.", name); - } - } - - public static void AssertInRange(T value, T minimum, T maximum, string name) - where T : notnull, IComparable - { - if (minimum.CompareTo(value) > 0) - { - throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed."); - } - if (maximum.CompareTo(value) < 0) - { - throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed."); - } - } - - public static void AssertEnumDefined(Type enumType, object value, string name) - { - if (!Enum.IsDefined(enumType, value)) - { - throw new ArgumentException($"Value not defined for {enumType.FullName}.", name); - } - } - - public static T CheckNotNull(T value, string name) - where T : class - { - AssertNotNull(value, name); - return value; - } - - public static string CheckNotNullOrEmpty(string value, string name) - { - AssertNotNullOrEmpty(value, name); - return value; - } - - public static void AssertNull(T value, string name, string message = null) - { - if (value != null) - { - throw new ArgumentException(message ?? "Value must be null.", name); - } - } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/AsyncPageableWrapper.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/AsyncPageableWrapper.cs new file mode 100644 index 000000000000..f07858609a82 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/AsyncPageableWrapper.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class AsyncPageableWrapper : AsyncPageable + { + /// The source async pageable value of type AsyncPageable<T>. + private AsyncPageable _source; + /// The converter function from T to U. + private Func _converter; + + /// Initializes a new instance of the AsyncPageableWrapper class. + /// The source async pageable value of type AsyncPageable<T>. + /// The converter function from T to U. + public AsyncPageableWrapper(AsyncPageable source, Func converter) + { + _source = source; + _converter = converter; + } + + /// Converts the pages from AsyncPageable to Page. + /// A continuation token from a previous response. + /// An optional hint to specify the desired size of each page. + /// An enumerable of pages containing converted items of type U. + public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + await foreach (Page page in _source.AsPages(continuationToken, pageSizeHint).ConfigureAwait(false)) + { + List convertedItems = new List(); + foreach (T item in page.Values) + { + convertedItems.Add(_converter.Invoke(item)); + } + yield return Page.FromValues(convertedItems, page.ContinuationToken, page.GetRawResponse()); + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ChangeTrackingDictionary.cs index b251075b92cd..203f7515dd92 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ChangeTrackingDictionary.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ChangeTrackingDictionary.cs @@ -11,7 +11,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull + internal partial class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary + where TKey : notnull { private IDictionary _innerDictionary; @@ -19,6 +20,7 @@ public ChangeTrackingDictionary() { } + /// The inner dictionary. public ChangeTrackingDictionary(IDictionary dictionary) { if (dictionary == null) @@ -28,6 +30,7 @@ public ChangeTrackingDictionary(IDictionary dictionary) _innerDictionary = new Dictionary(dictionary); } + /// The inner dictionary. public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) { if (dictionary == null) @@ -41,16 +44,22 @@ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary) } } + /// Gets the IsUndefined. public bool IsUndefined => _innerDictionary == null; + /// Gets the Count. public int Count => IsUndefined ? 0 : EnsureDictionary().Count; + /// Gets the IsReadOnly. public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly; + /// Gets the Keys. public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys; + /// Gets the Values. public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values; + /// Gets or sets the value associated with the specified key. public TValue this[TKey key] { get @@ -67,8 +76,10 @@ public TValue this[TKey key] } } + /// Gets the Keys. IEnumerable IReadOnlyDictionary.Keys => Keys; + /// Gets the Values. IEnumerable IReadOnlyDictionary.Values => Values; public IEnumerator> GetEnumerator() @@ -89,6 +100,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } + /// The item to add. public void Add(KeyValuePair item) { EnsureDictionary().Add(item); @@ -99,6 +111,7 @@ public void Clear() EnsureDictionary().Clear(); } + /// The item to search for. public bool Contains(KeyValuePair item) { if (IsUndefined) @@ -108,6 +121,8 @@ public bool Contains(KeyValuePair item) return EnsureDictionary().Contains(item); } + /// The array to copy. + /// The index. public void CopyTo(KeyValuePair[] array, int index) { if (IsUndefined) @@ -117,6 +132,7 @@ public void CopyTo(KeyValuePair[] array, int index) EnsureDictionary().CopyTo(array, index); } + /// The item to remove. public bool Remove(KeyValuePair item) { if (IsUndefined) @@ -126,11 +142,14 @@ public bool Remove(KeyValuePair item) return EnsureDictionary().Remove(item); } + /// The key. + /// The value to add. public void Add(TKey key, TValue value) { EnsureDictionary().Add(key, value); } + /// The key to search for. public bool ContainsKey(TKey key) { if (IsUndefined) @@ -140,6 +159,7 @@ public bool ContainsKey(TKey key) return EnsureDictionary().ContainsKey(key); } + /// The key. public bool Remove(TKey key) { if (IsUndefined) @@ -149,6 +169,8 @@ public bool Remove(TKey key) return EnsureDictionary().Remove(key); } + /// The key to search for. + /// The value. public bool TryGetValue(TKey key, out TValue value) { if (IsUndefined) diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ChangeTrackingList.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ChangeTrackingList.cs index 4fc507db04ee..c4d5ffb2ece3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ChangeTrackingList.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ChangeTrackingList.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - internal class ChangeTrackingList : IList, IReadOnlyList + internal partial class ChangeTrackingList : IList, IReadOnlyList { private IList _innerList; @@ -20,6 +20,7 @@ public ChangeTrackingList() { } + /// The inner list. public ChangeTrackingList(IList innerList) { if (innerList != null) @@ -28,6 +29,7 @@ public ChangeTrackingList(IList innerList) } } + /// The inner list. public ChangeTrackingList(IReadOnlyList innerList) { if (innerList != null) @@ -36,12 +38,16 @@ public ChangeTrackingList(IReadOnlyList innerList) } } + /// Gets the IsUndefined. public bool IsUndefined => _innerList == null; + /// Gets the Count. public int Count => IsUndefined ? 0 : EnsureList().Count; + /// Gets the IsReadOnly. public bool IsReadOnly => IsUndefined ? false : EnsureList().IsReadOnly; + /// Gets or sets the value associated with the specified key. public T this[int index] { get @@ -85,6 +91,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetEnumerator(); } + /// The item to add. public void Add(T item) { EnsureList().Add(item); @@ -95,6 +102,7 @@ public void Clear() EnsureList().Clear(); } + /// The item. public bool Contains(T item) { if (IsUndefined) @@ -104,6 +112,8 @@ public bool Contains(T item) return EnsureList().Contains(item); } + /// The array to copy to. + /// The array index. public void CopyTo(T[] array, int arrayIndex) { if (IsUndefined) @@ -113,6 +123,7 @@ public void CopyTo(T[] array, int arrayIndex) EnsureList().CopyTo(array, arrayIndex); } + /// The item. public bool Remove(T item) { if (IsUndefined) @@ -122,6 +133,7 @@ public bool Remove(T item) return EnsureList().Remove(item); } + /// The item. public int IndexOf(T item) { if (IsUndefined) @@ -131,11 +143,14 @@ public int IndexOf(T item) return EnsureList().IndexOf(item); } + /// The inner list. + /// The item. public void Insert(int index, T item) { EnsureList().Insert(index, item); } + /// The inner list. public void RemoveAt(int index) { if (IsUndefined) diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ClientPipelineExtensions.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ClientPipelineExtensions.cs new file mode 100644 index 000000000000..5a2badfb6126 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ClientPipelineExtensions.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal static partial class ClientPipelineExtensions + { + public static async ValueTask ProcessMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + (CancellationToken userCancellationToken, ErrorOptions statusOption) = context.Parse(); + await pipeline.SendAsync(message, userCancellationToken).ConfigureAwait(false); + + if (message.Response.IsError && (context?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow) + { + throw new RequestFailedException(message.Response); + } + + return message.Response; + } + + public static Response ProcessMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + (CancellationToken userCancellationToken, ErrorOptions statusOption) = context.Parse(); + pipeline.Send(message, userCancellationToken); + + if (message.Response.IsError && (context?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow) + { + throw new RequestFailedException(message.Response); + } + + return message.Response; + } + + public static async ValueTask> ProcessHeadAsBoolMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + Response response = await pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + switch (response.Status) + { + case >= 200 and < 300: + return Response.FromValue(true, response); + case >= 400 and < 500: + return Response.FromValue(false, response); + default: + return new ErrorResult(response, new RequestFailedException(response)); + } + } + + public static Response ProcessHeadAsBoolMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext context) + { + Response response = pipeline.ProcessMessage(message, context); + switch (response.Status) + { + case >= 200 and < 300: + return Response.FromValue(true, response); + case >= 400 and < 500: + return Response.FromValue(false, response); + default: + return new ErrorResult(response, new RequestFailedException(response)); + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenMemberAttribute.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenMemberAttribute.cs new file mode 100644 index 000000000000..72778edeb7e4 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenMemberAttribute.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Microsoft.TypeSpec.Generator.Customizations +{ + [AttributeUsage((AttributeTargets.Property | AttributeTargets.Field))] + internal partial class CodeGenMemberAttribute : CodeGenTypeAttribute + { + /// The original name of the member. + public CodeGenMemberAttribute(string originalName) : base(originalName) + { + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenSerializationAttribute.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenSerializationAttribute.cs new file mode 100644 index 000000000000..dfcabf517497 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenSerializationAttribute.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Microsoft.TypeSpec.Generator.Customizations +{ + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Struct), AllowMultiple = true, Inherited = true)] + internal partial class CodeGenSerializationAttribute : Attribute + { + /// The property name which these hooks apply to. + public CodeGenSerializationAttribute(string propertyName) + { + PropertyName = propertyName; + } + + /// The property name which these hooks apply to. + /// The serialization name of the property. + public CodeGenSerializationAttribute(string propertyName, string serializationName) + { + PropertyName = propertyName; + SerializationName = serializationName; + } + + /// Gets or sets the property name which these hooks should apply to. + public string PropertyName { get; } + + /// Gets or sets the serialization name of the property. + public string SerializationName { get; set; } + + /// + /// Gets or sets the method name to use when serializing the property value (property name excluded). + /// The signature of the serialization hook method must be or compatible with when invoking: private void SerializeHook(Utf8JsonWriter writer); + /// + public string SerializationValueHook { get; set; } + + /// + /// Gets or sets the method name to use when deserializing the property value from the JSON. + /// private static void DeserializationHook(JsonProperty property, ref TypeOfTheProperty propertyValue); // if the property is required + /// private static void DeserializationHook(JsonProperty property, ref Optional<TypeOfTheProperty> propertyValue); // if the property is optional + /// + public string DeserializationValueHook { get; set; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenSuppressAttribute.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenSuppressAttribute.cs new file mode 100644 index 000000000000..38d536e69173 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenSuppressAttribute.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Microsoft.TypeSpec.Generator.Customizations +{ + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct), AllowMultiple = true)] + internal partial class CodeGenSuppressAttribute : Attribute + { + /// The member to suppress. + /// The types of the parameters of the member. + public CodeGenSuppressAttribute(string member, params Type[] parameters) + { + Member = member; + Parameters = parameters; + } + + /// Gets the Member. + public string Member { get; } + + /// Gets the Parameters. + public Type[] Parameters { get; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenTypeAttribute.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenTypeAttribute.cs new file mode 100644 index 000000000000..f36b5f513173 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/CodeGenTypeAttribute.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Microsoft.TypeSpec.Generator.Customizations +{ + [AttributeUsage((AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct))] + internal partial class CodeGenTypeAttribute : Attribute + { + /// The original name of the type. + public CodeGenTypeAttribute(string originalName) + { + OriginalName = originalName; + } + + /// Gets the OriginalName. + public string OriginalName { get; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ErrorResult.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ErrorResult.cs new file mode 100644 index 000000000000..6d2ae418cfb0 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ErrorResult.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class ErrorResult : Response + { + private readonly Response _response; + private readonly RequestFailedException _exception; + + public ErrorResult(Response response, RequestFailedException exception) + { + _response = response; + _exception = exception; + } + + /// Gets the Value. + public override T Value => throw _exception; + + /// + public override Response GetRawResponse() + { + return _response; + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ModelSerializationExtensions.cs index ce1c820fd40d..34f8b8ef229e 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ModelSerializationExtensions.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/ModelSerializationExtensions.cs @@ -10,19 +10,18 @@ using System.Collections.Generic; using System.Diagnostics; using System.Globalization; +using System.Runtime.InteropServices; using System.Text.Json; -using System.Xml; -using Azure.Core; namespace Azure.ResourceManager.SqlVirtualMachine { - internal static class ModelSerializationExtensions + internal static partial class ModelSerializationExtensions { - internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); - internal static readonly ModelReaderWriterOptions WireV3Options = new ModelReaderWriterOptions("W|v3"); - internal static readonly ModelReaderWriterOptions JsonV3Options = new ModelReaderWriterOptions("J|v3"); - internal static readonly BinaryData SentinelValue = BinaryData.FromBytes("\"__EMPTY__\""u8.ToArray()); + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions + { + MaxDepth = 256 + }; public static object GetObject(this JsonElement element) { @@ -48,14 +47,14 @@ public static object GetObject(this JsonElement element) case JsonValueKind.Null: return null; case JsonValueKind.Object: - var dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var jsonProperty in element.EnumerateObject()) { dictionary.Add(jsonProperty.Name, jsonProperty.Value.GetObject()); } return dictionary; case JsonValueKind.Array: - var list = new List(); + List list = new List(); foreach (var item in element.EnumerateArray()) { list.Add(item.GetObject()); @@ -93,7 +92,7 @@ public static char GetChar(this JsonElement element) { if (element.ValueKind == JsonValueKind.String) { - var text = element.GetString(); + string text = element.GetString(); if (text == null || text.Length != 1) { throw new NotSupportedException($"Cannot convert \"{text}\" to a char"); @@ -107,14 +106,14 @@ public static char GetChar(this JsonElement element) } [Conditional("DEBUG")] - public static void ThrowNonNullablePropertyIsNull(this JsonProperty property) + public static void ThrowNonNullablePropertyIsNull(this JsonProperty @property) { - throw new JsonException($"A property '{property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); + throw new JsonException($"A property '{@property.Name}' defined as non-nullable but received as null from the service. This exception only happens in DEBUG builds of the library and would be ignored in the release build"); } public static string GetRequiredString(this JsonElement element) { - var value = element.GetString(); + string value = element.GetString(); if (value == null) { throw new InvalidOperationException($"The requested operation requires an element of type 'String', but the target element has type '{element.ValueKind}'."); @@ -181,9 +180,6 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, T value, Mode case IJsonModel jsonModel: jsonModel.Write(writer, options ?? WireOptions); break; - case IUtf8JsonSerializable serializable: - serializable.Write(writer); - break; case byte[] bytes: writer.WriteBase64StringValue(bytes); break; @@ -260,150 +256,13 @@ public static void WriteObjectValue(this Utf8JsonWriter writer, object value, Mo writer.WriteObjectValue(value, options); } - internal static bool IsSentinelValue(BinaryData value) - { - ReadOnlySpan sentinelSpan = SentinelValue.ToMemory().Span; - ReadOnlySpan valueSpan = value.ToMemory().Span; - return sentinelSpan.SequenceEqual(valueSpan); - } - - internal static class TypeFormatters + public static BinaryData GetUtf8Bytes(this JsonElement element) { - private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; - public const string DefaultNumberFormat = "G"; - - public static string ToString(bool value) => value ? "true" : "false"; - - public static string ToString(DateTime value, string format) => value.Kind switch - { - DateTimeKind.Utc => ToString((DateTimeOffset)value, format), - _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Azure SDK requires it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") - }; - - public static string ToString(DateTimeOffset value, string format) => format switch - { - "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), - "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), - "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), - "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), - "R" => value.ToString("r", CultureInfo.InvariantCulture), - _ => value.ToString(format, CultureInfo.InvariantCulture) - }; - - public static string ToString(TimeSpan value, string format) => format switch - { - "P" => XmlConvert.ToString(value), - _ => value.ToString(format, CultureInfo.InvariantCulture) - }; - - public static string ToString(byte[] value, string format) => format switch - { - "U" => ToBase64UrlString(value), - "D" => Convert.ToBase64String(value), - _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) - }; - - public static string ToBase64UrlString(byte[] value) - { - int numWholeOrPartialInputBlocks = checked(value.Length + 2) / 3; - int size = checked(numWholeOrPartialInputBlocks * 4); - char[] output = new char[size]; - - int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); - - int i = 0; - for (; i < numBase64Chars; i++) - { - char ch = output[i]; - if (ch == '+') - { - output[i] = '-'; - } - else - { - if (ch == '/') - { - output[i] = '_'; - } - else - { - if (ch == '=') - { - break; - } - } - } - } - - return new string(output, 0, i); - } - - public static byte[] FromBase64UrlString(string value) - { - int paddingCharsToAdd = (value.Length % 4) switch - { - 0 => 0, - 2 => 2, - 3 => 1, - _ => throw new InvalidOperationException("Malformed input") - }; - char[] output = new char[(value.Length + paddingCharsToAdd)]; - int i = 0; - for (; i < value.Length; i++) - { - char ch = value[i]; - if (ch == '-') - { - output[i] = '+'; - } - else - { - if (ch == '_') - { - output[i] = '/'; - } - else - { - output[i] = ch; - } - } - } - - for (; i < output.Length; i++) - { - output[i] = '='; - } - - return Convert.FromBase64CharArray(output, 0, output.Length); - } - - public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch - { - "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), - _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) - }; - - public static TimeSpan ParseTimeSpan(string value, string format) => format switch - { - "P" => XmlConvert.ToTimeSpan(value), - _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) - }; - - public static string ConvertToString(object value, string format = null) => value switch - { - null => "null", - string s => s, - bool b => ToString(b), - int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), - byte[] b0 when format != null => ToString(b0, format), - IEnumerable s0 => string.Join(",", s0), - DateTimeOffset dateTime when format != null => ToString(dateTime, format), - TimeSpan timeSpan when format != null => ToString(timeSpan, format), - TimeSpan timeSpan0 => XmlConvert.ToString(timeSpan0), - Guid guid => guid.ToString(), - BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), - _ => value.ToString() - }; +#if NET9_0_OR_GREATER + return new global::System.BinaryData(global::System.Runtime.InteropServices.JsonMarshal.GetRawUtf8Value(element).ToArray()); +#else + return BinaryData.FromString(element.GetRawText()); +#endif } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Optional.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Optional.cs index d94c93faa572..cd495b8f7a13 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Optional.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Optional.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - internal static class Optional + internal static partial class Optional { public static bool IsCollectionDefined(IEnumerable collection) { @@ -28,7 +28,7 @@ public static bool IsCollectionDefined(IReadOnlyDictionary(T? value) - where T : struct + where T : struct { return value.HasValue; } @@ -38,14 +38,14 @@ public static bool IsDefined(object value) return value != null; } - public static bool IsDefined(JsonElement value) + public static bool IsDefined(string value) { - return value.ValueKind != JsonValueKind.Undefined; + return value != null; } - public static bool IsDefined(string value) + public static bool IsDefined(JsonElement value) { - return value != null; + return value.ValueKind != JsonValueKind.Undefined; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/PageableWrapper.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/PageableWrapper.cs new file mode 100644 index 000000000000..312a80ac94f2 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/PageableWrapper.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class PageableWrapper : Pageable + { + /// The source pageable value of type Pageable<T>. + private Pageable _source; + /// The converter function from T to U. + private Func _converter; + + /// Initializes a new instance of the PageableWrapper class. + /// The source pageable value of type Pageable<T>. + /// The converter function from T to U. + public PageableWrapper(Pageable source, Func converter) + { + _source = source; + _converter = converter; + } + + /// Converts the pages from Pageable to Page. + /// A continuation token from a previous response. + /// An optional hint to specify the desired size of each page. + /// An enumerable of pages containing converted items of type U. + public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) + { + foreach (Page page in _source.AsPages(continuationToken, pageSizeHint)) + { + List convertedItems = new List(); + foreach (T item in page.Values) + { + convertedItems.Add(_converter.Invoke(item)); + } + yield return Page.FromValues(convertedItems, page.ContinuationToken, page.GetRawResponse()); + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/RawRequestUriBuilderExtensions.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/RawRequestUriBuilderExtensions.cs new file mode 100644 index 000000000000..dacb77bd223e --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/RawRequestUriBuilderExtensions.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal static partial class RawRequestUriBuilderExtensions + { + public static void AppendQueryDelimited(this RawRequestUriBuilder builder, string name, IEnumerable value, string delimiter, SerializationFormat format = SerializationFormat.Default, bool escape = true) + { + delimiter ??= ","; + IEnumerable stringValues = value.Select(v => TypeFormatters.ConvertToString(v, format)); + builder.AppendQuery(name, string.Join(delimiter, stringValues), escape); + } + + public static void UpdateQuery(this RawRequestUriBuilder builder, string name, string value) + { + string currentQuery = builder.Query; + string searchPattern = string.Concat(name, "="); + int paramStartIndex = -1; + if (currentQuery.StartsWith(string.Concat("?", searchPattern))) + { + paramStartIndex = 1; + } + if (paramStartIndex == -1) + { + string prefixedPattern = string.Concat("&", searchPattern); + int prefixedIndex = currentQuery.IndexOf(prefixedPattern); + if (prefixedIndex >= 0) + { + paramStartIndex = prefixedIndex + 1; + } + } + if (paramStartIndex >= 0) + { + int valueStartIndex = paramStartIndex + searchPattern.Length; + int valueEndIndex = currentQuery.IndexOf('&', valueStartIndex); + if (valueEndIndex == -1) + { + valueEndIndex = currentQuery.Length; + } + string beforeParam = currentQuery.Substring(0, valueStartIndex); + string afterParam = currentQuery.Substring(valueEndIndex); + string newQuery = string.Concat(beforeParam, value, afterParam); + builder.Query = newQuery; + } + else + { + builder.AppendQuery(name, value, true); + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/RequestContextExtensions.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/RequestContextExtensions.cs new file mode 100644 index 000000000000..59bc826ecaa2 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/RequestContextExtensions.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using Azure; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal static partial class RequestContextExtensions + { + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + public static ValueTuple Parse(this RequestContext context) + { + if (context == null) + { + return (CancellationToken.None, ErrorOptions.Default); + } + return (context.CancellationToken, context.ErrorOptions); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/SerializationFormat.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/SerializationFormat.cs new file mode 100644 index 000000000000..cff17a529153 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/SerializationFormat.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal enum SerializationFormat + { + /// The default serialization format. + Default = 0, + /// The RFC1123 date time format. + DateTime_RFC1123 = 1, + /// The RFC3339 date time format. + DateTime_RFC3339 = 2, + /// The RFC7231 date time format. + DateTime_RFC7231 = 3, + /// The ISO8601 date time format. + DateTime_ISO8601 = 4, + /// The Unix date time format. + DateTime_Unix = 5, + /// The ISO8601 date format. + Date_ISO8601 = 6, + /// The ISO8601 duration format. + Duration_ISO8601 = 7, + /// The constant duration format. + Duration_Constant = 8, + /// The seconds duration format. + Duration_Seconds = 9, + /// The seconds duration format with float precision. + Duration_Seconds_Float = 10, + /// The seconds duration format with double precision. + Duration_Seconds_Double = 11, + /// The milliseconds duration format. + Duration_Milliseconds = 12, + /// The milliseconds duration format with float precision. + Duration_Milliseconds_Float = 13, + /// The milliseconds duration format with double precision. + Duration_Milliseconds_Double = 14, + /// The ISO8601 time format. + Time_ISO8601 = 15, + /// The Base64Url bytes format. + Bytes_Base64Url = 16, + /// The Base64 bytes format. + Bytes_Base64 = 17 + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/TypeFormatters.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/TypeFormatters.cs new file mode 100644 index 000000000000..42b9e77c10f0 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/TypeFormatters.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Xml; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal static partial class TypeFormatters + { + private const string RoundtripZFormat = "yyyy-MM-ddTHH:mm:ss.fffffffZ"; + public const string DefaultNumberFormat = "G"; + + public static string ToString(bool value) => value ? "true" : "false"; + + public static string ToString(DateTime value, string format) => value.Kind switch + { + DateTimeKind.Utc => ToString((DateTimeOffset)value, format), + _ => throw new NotSupportedException($"DateTime {value} has a Kind of {value.Kind}. Generated clients require it to be UTC. You can call DateTime.SpecifyKind to change Kind property value to DateTimeKind.Utc.") + }; + + public static string ToString(DateTimeOffset value, string format) => format switch + { + "D" => value.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture), + "U" => value.ToUnixTimeSeconds().ToString(CultureInfo.InvariantCulture), + "O" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "o" => value.ToUniversalTime().ToString(RoundtripZFormat, CultureInfo.InvariantCulture), + "R" => value.ToString("r", CultureInfo.InvariantCulture), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(TimeSpan value, string format) => format switch + { + "P" => XmlConvert.ToString(value), + _ => value.ToString(format, CultureInfo.InvariantCulture) + }; + + public static string ToString(byte[] value, string format) => format switch + { + "U" => ToBase64UrlString(value), + "D" => Convert.ToBase64String(value), + _ => throw new ArgumentException($"Format is not supported: '{format}'", nameof(format)) + }; + + public static string ToBase64UrlString(byte[] value) + { + int numWholeOrPartialInputBlocks = checked (value.Length + 2) / 3; + int size = checked (numWholeOrPartialInputBlocks * 4); + char[] output = new char[size]; + + int numBase64Chars = Convert.ToBase64CharArray(value, 0, value.Length, output, 0); + + int i = 0; + for (; i < numBase64Chars; i++) + { + char ch = output[i]; + if (ch == '+') + { + output[i] = '-'; + } + else + { + if (ch == '/') + { + output[i] = '_'; + } + else + { + if (ch == '=') + { + break; + } + } + } + } + + return new string(output, 0, i); + } + + public static byte[] FromBase64UrlString(string value) + { + int paddingCharsToAdd = (value.Length % 4) switch + { + 0 => 0, + 2 => 2, + 3 => 1, + _ => throw new InvalidOperationException("Malformed input") + }; + char[] output = new char[(value.Length + paddingCharsToAdd)]; + int i = 0; + for (; i < value.Length; i++) + { + char ch = value[i]; + if (ch == '-') + { + output[i] = '+'; + } + else + { + if (ch == '_') + { + output[i] = '/'; + } + else + { + output[i] = ch; + } + } + } + + for (; i < output.Length; i++) + { + output[i] = '='; + } + + return Convert.FromBase64CharArray(output, 0, output.Length); + } + + public static DateTimeOffset ParseDateTimeOffset(string value, string format) => format switch + { + "U" => DateTimeOffset.FromUnixTimeSeconds(long.Parse(value, CultureInfo.InvariantCulture)), + _ => DateTimeOffset.Parse(value, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) + }; + + public static TimeSpan ParseTimeSpan(string value, string format) => format switch + { + "P" => XmlConvert.ToTimeSpan(value), + _ => TimeSpan.ParseExact(value, format, CultureInfo.InvariantCulture) + }; + + public static string ToFormatSpecifier(SerializationFormat format) => format switch + { + SerializationFormat.DateTime_RFC1123 => "R", + SerializationFormat.DateTime_RFC3339 => "O", + SerializationFormat.DateTime_RFC7231 => "R", + SerializationFormat.DateTime_ISO8601 => "O", + SerializationFormat.Date_ISO8601 => "D", + SerializationFormat.DateTime_Unix => "U", + SerializationFormat.Bytes_Base64Url => "U", + SerializationFormat.Bytes_Base64 => "D", + SerializationFormat.Duration_ISO8601 => "P", + SerializationFormat.Duration_Constant => "c", + SerializationFormat.Duration_Seconds => "%s", + SerializationFormat.Duration_Seconds_Float => "s\\.FFF", + SerializationFormat.Duration_Seconds_Double => "s\\.FFFFFF", + SerializationFormat.Time_ISO8601 => "T", + _ => null + }; + + public static string ConvertToString(object value, SerializationFormat format = SerializationFormat.Default) + { + string formatSpecifier = ToFormatSpecifier(format); + + return value switch + { + null => "null", + string s => s, + bool b => ToString(b), + int or float or double or long or decimal => ((IFormattable)value).ToString(DefaultNumberFormat, CultureInfo.InvariantCulture), + byte[] b0 when formatSpecifier != null => ToString(b0, formatSpecifier), + IEnumerable s0 => string.Join(",", s0), + DateTimeOffset dateTime when formatSpecifier != null => ToString(dateTime, formatSpecifier), + TimeSpan timeSpan when format == SerializationFormat.Duration_Seconds => Convert.ToInt32(timeSpan.TotalSeconds).ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan0 when format == SerializationFormat.Duration_Seconds_Float || format == SerializationFormat.Duration_Seconds_Double => timeSpan0.TotalSeconds.ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan1 when format == SerializationFormat.Duration_Milliseconds => Convert.ToInt32(timeSpan1.TotalMilliseconds).ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan2 when format == SerializationFormat.Duration_Milliseconds_Float || format == SerializationFormat.Duration_Milliseconds_Double => timeSpan2.TotalMilliseconds.ToString(CultureInfo.InvariantCulture), + TimeSpan timeSpan3 when formatSpecifier != null => ToString(timeSpan3, formatSpecifier), + TimeSpan timeSpan4 => XmlConvert.ToString(timeSpan4), + Guid guid => guid.ToString(), + BinaryData binaryData => ConvertToString(binaryData.ToArray(), format), + _ => value.ToString() + }; + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Utf8JsonRequestContent.cs index b7aac3839c99..07af63554709 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Utf8JsonRequestContent.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Internal/Utf8JsonRequestContent.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - internal class Utf8JsonRequestContent : RequestContent + internal partial class Utf8JsonRequestContent : RequestContent { private readonly MemoryStream _stream; private readonly RequestContent _content; @@ -25,20 +25,26 @@ public Utf8JsonRequestContent() JsonWriter = new Utf8JsonWriter(_stream); } + /// Gets the JsonWriter. public Utf8JsonWriter JsonWriter { get; } + /// The stream containing the data to be written. + /// The cancellation token to use. public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) { await JsonWriter.FlushAsync().ConfigureAwait(false); await _content.WriteToAsync(stream, cancellationToken).ConfigureAwait(false); } + /// The stream containing the data to be written. + /// The cancellation token to use. public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) { JsonWriter.Flush(); _content.WriteTo(stream, cancellationToken); } + /// public override bool TryComputeLength(out long length) { length = JsonWriter.BytesCommitted + JsonWriter.BytesPending; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/AvailabilityGroupListenerOperationSource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/AvailabilityGroupListenerOperationSource.cs index 6222b8472446..9f3d69600855 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/AvailabilityGroupListenerOperationSource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/AvailabilityGroupListenerOperationSource.cs @@ -5,32 +5,45 @@ #nullable disable -using System.ClientModel.Primitives; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; namespace Azure.ResourceManager.SqlVirtualMachine { - internal class AvailabilityGroupListenerOperationSource : IOperationSource + /// + internal partial class AvailabilityGroupListenerOperationSource : IOperationSource { private readonly ArmClient _client; + /// + /// internal AvailabilityGroupListenerOperationSource(ArmClient client) { _client = client; } + /// The response from the service. + /// The cancellation token to use. + /// AvailabilityGroupListenerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + AvailabilityGroupListenerData data = AvailabilityGroupListenerData.DeserializeAvailabilityGroupListenerData(document.RootElement, ModelSerializationExtensions.WireOptions); return new AvailabilityGroupListenerResource(_client, data); } + /// The response from the service. + /// The cancellation token to use. + /// async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); - return await Task.FromResult(new AvailabilityGroupListenerResource(_client, data)).ConfigureAwait(false); + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + AvailabilityGroupListenerData data = AvailabilityGroupListenerData.DeserializeAvailabilityGroupListenerData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new AvailabilityGroupListenerResource(_client, data); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineArmOperation.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineArmOperation.cs index 327bdf82ac67..ea7d55a53157 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineArmOperation.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineArmOperation.cs @@ -6,18 +6,16 @@ #nullable disable using System; -using System.ClientModel.Primitives; -using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; namespace Azure.ResourceManager.SqlVirtualMachine { -#pragma warning disable SA1649 // File name should match first type name - internal class SqlVirtualMachineArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name + internal partial class SqlVirtualMachineArmOperation : ArmOperation { private readonly OperationInternal _operation; private readonly RehydrationToken? _completeRehydrationToken; @@ -29,6 +27,9 @@ protected SqlVirtualMachineArmOperation() { } + /// + /// The operation response. + /// The token to rehydrate the operation. internal SqlVirtualMachineArmOperation(Response response, RehydrationToken? rehydrationToken = null) { _operation = OperationInternal.Succeeded(response); @@ -36,12 +37,20 @@ internal SqlVirtualMachineArmOperation(Response response, RehydrationToken? rehy _operationId = GetOperationId(rehydrationToken); } + /// + /// The instance of . + /// The instance of . + /// The operation request. + /// The operation response. + /// The finalStateVia of the operation. + /// If should skip Api version override. + /// The Api version override value. internal SqlVirtualMachineArmOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { - var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + IOperation nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationImplementation) { - _nextLinkOperation = nextLinkOperationValue; + _nextLinkOperation = nextLinkOperationImplementation; _operationId = _nextLinkOperation.OperationId; } else @@ -49,48 +58,49 @@ internal SqlVirtualMachineArmOperation(ClientDiagnostics clientDiagnostics, Http _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); _operationId = GetOperationId(_completeRehydrationToken); } - _operation = new OperationInternal(nextLinkOperation, clientDiagnostics, response, "SqlVirtualMachineArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + _operation = new OperationInternal( + nextLinkOperation, + clientDiagnostics, + response, + "SqlVirtualMachineArmOperation", + null, + new SequentialDelayStrategy()); } + /// Gets the Id. + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// Gets the HasCompleted. + public override bool HasCompleted => _operation.HasCompleted; + + /// The token to rehydrate a long-running operation. private string GetOperationId(RehydrationToken? rehydrationToken) { - if (rehydrationToken is null) - { - return null; - } - var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); - using var document = JsonDocument.Parse(data); - var lroDetails = document.RootElement; - return lroDetails.GetProperty("id").GetString(); + return rehydrationToken?.Id; } - /// - public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; - /// + /// public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// + /// public override Response GetRawResponse() => _operation.RawResponse; - /// + /// public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - /// + /// public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - /// + /// public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); - /// + /// public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); - /// + /// public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); - /// + /// public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineArmOperationOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineArmOperationOfT.cs index c14636788c5c..8193c1adf210 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineArmOperationOfT.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineArmOperationOfT.cs @@ -6,18 +6,16 @@ #nullable disable using System; -using System.ClientModel.Primitives; -using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; namespace Azure.ResourceManager.SqlVirtualMachine { -#pragma warning disable SA1649 // File name should match first type name - internal class SqlVirtualMachineArmOperation : ArmOperation -#pragma warning restore SA1649 // File name should match first type name + internal partial class SqlVirtualMachineArmOperation : ArmOperation { private readonly OperationInternal _operation; private readonly RehydrationToken? _completeRehydrationToken; @@ -29,6 +27,9 @@ protected SqlVirtualMachineArmOperation() { } + /// + /// The operation response. + /// The token to rehydrate the operation. internal SqlVirtualMachineArmOperation(Response response, RehydrationToken? rehydrationToken = null) { _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); @@ -36,12 +37,21 @@ internal SqlVirtualMachineArmOperation(Response response, RehydrationToken? r _operationId = GetOperationId(rehydrationToken); } + /// + /// The instance of . + /// The instance of . + /// The instance of . + /// The operation request. + /// The operation response. + /// The finalStateVia of the operation. + /// If should skip Api version override. + /// The Api version override value. internal SqlVirtualMachineArmOperation(IOperationSource source, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, bool skipApiVersionOverride = false, string apiVersionOverrideValue = null) { - var nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); - if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationValue) + IOperation nextLinkOperation = NextLinkOperationImplementation.Create(pipeline, request.Method, request.Uri.ToUri(), response, finalStateVia, skipApiVersionOverride, apiVersionOverrideValue); + if (nextLinkOperation is NextLinkOperationImplementation nextLinkOperationImplementation) { - _nextLinkOperation = nextLinkOperationValue; + _nextLinkOperation = nextLinkOperationImplementation; _operationId = _nextLinkOperation.OperationId; } else @@ -49,54 +59,55 @@ internal SqlVirtualMachineArmOperation(IOperationSource source, ClientDiagnos _completeRehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(request.Method, request.Uri.ToUri(), response, finalStateVia); _operationId = GetOperationId(_completeRehydrationToken); } - _operation = new OperationInternal(NextLinkOperationImplementation.Create(source, nextLinkOperation), clientDiagnostics, response, "SqlVirtualMachineArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + _operation = new OperationInternal( + NextLinkOperationImplementation.Create(source, nextLinkOperation), + clientDiagnostics, + response, + "SqlVirtualMachineArmOperation", + null, + new SequentialDelayStrategy()); } - private string GetOperationId(RehydrationToken? rehydrationToken) - { - if (rehydrationToken is null) - { - return null; - } - var data = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); - using var document = JsonDocument.Parse(data); - var lroDetails = document.RootElement; - return lroDetails.GetProperty("id").GetString(); - } - /// + /// Gets the Id. public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; - /// - public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; - - /// + /// Gets the Value. public override T Value => _operation.Value; - /// + /// Gets the HasValue. public override bool HasValue => _operation.HasValue; - /// + /// Gets the HasCompleted. public override bool HasCompleted => _operation.HasCompleted; - /// + /// The token to rehydrate a long-running operation. + private string GetOperationId(RehydrationToken? rehydrationToken) + { + return rehydrationToken?.Id; + } + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// public override Response GetRawResponse() => _operation.RawResponse; - /// + /// public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - /// + /// public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - /// + /// public override Response WaitForCompletion(CancellationToken cancellationToken = default) => _operation.WaitForCompletion(cancellationToken); - /// + /// public override Response WaitForCompletion(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletion(pollingInterval, cancellationToken); - /// + /// public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); - /// + /// public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmGroupOperationSource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmGroupOperationSource.cs index 589378bfac2b..b7a2528f11a8 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmGroupOperationSource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmGroupOperationSource.cs @@ -5,32 +5,45 @@ #nullable disable -using System.ClientModel.Primitives; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; namespace Azure.ResourceManager.SqlVirtualMachine { - internal class SqlVmGroupOperationSource : IOperationSource + /// + internal partial class SqlVmGroupOperationSource : IOperationSource { private readonly ArmClient _client; + /// + /// internal SqlVmGroupOperationSource(ArmClient client) { _client = client; } + /// The response from the service. + /// The cancellation token to use. + /// SqlVmGroupResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + SqlVmGroupData data = SqlVmGroupData.DeserializeSqlVmGroupData(document.RootElement, ModelSerializationExtensions.WireOptions); return new SqlVmGroupResource(_client, data); } + /// The response from the service. + /// The cancellation token to use. + /// async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); - return await Task.FromResult(new SqlVmGroupResource(_client, data)).ConfigureAwait(false); + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + SqlVmGroupData data = SqlVmGroupData.DeserializeSqlVmGroupData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new SqlVmGroupResource(_client, data); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmOperationSource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmOperationSource.cs index 4b15fb493f5e..513188d5d886 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmOperationSource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmOperationSource.cs @@ -5,32 +5,45 @@ #nullable disable -using System.ClientModel.Primitives; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; +using Azure.ResourceManager; namespace Azure.ResourceManager.SqlVirtualMachine { - internal class SqlVmOperationSource : IOperationSource + /// + internal partial class SqlVmOperationSource : IOperationSource { private readonly ArmClient _client; + /// + /// internal SqlVmOperationSource(ArmClient client) { _client = client; } + /// The response from the service. + /// The cancellation token to use. + /// SqlVmResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + SqlVmData data = SqlVmData.DeserializeSqlVmData(document.RootElement, ModelSerializationExtensions.WireOptions); return new SqlVmResource(_client, data); } + /// The response from the service. + /// The cancellation token to use. + /// async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); - return await Task.FromResult(new SqlVmResource(_client, data)).ConfigureAwait(false); + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + SqlVmData data = SqlVmData.DeserializeSqlVmData(document.RootElement, ModelSerializationExtensions.WireOptions); + return new SqlVmResource(_client, data); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmTroubleshootingOperationSource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmTroubleshootingOperationSource.cs new file mode 100644 index 000000000000..d41ec9212e0c --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmTroubleshootingOperationSource.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + /// + internal partial class SqlVmTroubleshootingOperationSource : IOperationSource + { + /// + internal SqlVmTroubleshootingOperationSource() + { + } + + /// The response from the service. + /// The cancellation token to use. + /// + SqlVmTroubleshooting IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = JsonDocument.Parse(response.ContentStream); + SqlVmTroubleshooting result = SqlVmTroubleshooting.DeserializeSqlVmTroubleshooting(document.RootElement, ModelSerializationExtensions.WireOptions); + return result; + } + + /// The response from the service. + /// The cancellation token to use. + /// + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using JsonDocument document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + SqlVmTroubleshooting result = SqlVmTroubleshooting.DeserializeSqlVmTroubleshooting(document.RootElement, ModelSerializationExtensions.WireOptions); + return result; + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.Serialization.cs new file mode 100644 index 000000000000..f4da5cfe876f --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Enable AAD authentication for SQL VM. + internal partial class AADAuthenticationSettings : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AADAuthenticationSettings)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + AADAuthenticationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AADAuthenticationSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AADAuthenticationSettings)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAADAuthenticationSettings(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AADAuthenticationSettings DeserializeAADAuthenticationSettings(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clientId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("clientId"u8)) + { + clientId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new AADAuthenticationSettings(clientId, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(AADAuthenticationSettings)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + AADAuthenticationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AADAuthenticationSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeAADAuthenticationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AADAuthenticationSettings)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.cs new file mode 100644 index 000000000000..a16661b9ed12 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Enable AAD authentication for SQL VM. + internal partial class AADAuthenticationSettings + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public AADAuthenticationSettings() + { + } + + /// Initializes a new instance of . + /// The client Id of the Managed Identity to query Microsoft Graph API. An empty string must be used for the system assigned Managed Identity. + /// Keeps track of any properties unknown to the library. + internal AADAuthenticationSettings(string clientId, IDictionary additionalBinaryDataProperties) + { + ClientId = clientId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The client Id of the Managed Identity to query Microsoft Graph API. An empty string must be used for the system assigned Managed Identity. + public string ClientId { get; set; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalFeaturesServerConfigurations.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalFeaturesServerConfigurations.Serialization.cs index 03159922e5e2..09247ae1d4cd 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalFeaturesServerConfigurations.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalFeaturesServerConfigurations.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - internal partial class AdditionalFeaturesServerConfigurations : IUtf8JsonSerializable, IJsonModel + /// Additional SQL Server feature settings. + internal partial class AdditionalFeaturesServerConfigurations : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,26 +29,25 @@ void IJsonModel.Write(Utf8JsonWriter wri /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AdditionalFeaturesServerConfigurations)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsRServicesEnabled)) { writer.WritePropertyName("isRServicesEnabled"u8); writer.WriteBooleanValue(IsRServicesEnabled.Value); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -56,53 +56,59 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AdditionalFeaturesServerConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + AdditionalFeaturesServerConfigurations IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AdditionalFeaturesServerConfigurations JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AdditionalFeaturesServerConfigurations)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAdditionalFeaturesServerConfigurations(document.RootElement, options); } - internal static AdditionalFeaturesServerConfigurations DeserializeAdditionalFeaturesServerConfigurations(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AdditionalFeaturesServerConfigurations DeserializeAdditionalFeaturesServerConfigurations(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } bool? isRServicesEnabled = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("isRServicesEnabled"u8)) + if (prop.NameEquals("isRServicesEnabled"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - isRServicesEnabled = property.Value.GetBoolean(); + isRServicesEnabled = prop.Value.GetBoolean(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new AdditionalFeaturesServerConfigurations(isRServicesEnabled, serializedAdditionalRawData); + return new AdditionalFeaturesServerConfigurations(isRServicesEnabled, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +118,20 @@ BinaryData IPersistableModel.Write(Model } } - AdditionalFeaturesServerConfigurations IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + AdditionalFeaturesServerConfigurations IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AdditionalFeaturesServerConfigurations PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAdditionalFeaturesServerConfigurations(document.RootElement, options); } default: @@ -128,6 +139,7 @@ AdditionalFeaturesServerConfigurations IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalFeaturesServerConfigurations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalFeaturesServerConfigurations.cs index 5f82841aae98..7f9e659b76a2 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalFeaturesServerConfigurations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalFeaturesServerConfigurations.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Additional SQL Server feature settings. internal partial class AdditionalFeaturesServerConfigurations { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public AdditionalFeaturesServerConfigurations() @@ -52,11 +23,11 @@ public AdditionalFeaturesServerConfigurations() /// Initializes a new instance of . /// Enable or disable R services (SQL 2016 onwards). - /// Keeps track of any properties unknown to the library. - internal AdditionalFeaturesServerConfigurations(bool? isRServicesEnabled, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal AdditionalFeaturesServerConfigurations(bool? isRServicesEnabled, IDictionary additionalBinaryDataProperties) { IsRServicesEnabled = isRServicesEnabled; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Enable or disable R services (SQL 2016 onwards). diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalOsPatch.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalOsPatch.cs new file mode 100644 index 000000000000..6aca37d234e8 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalOsPatch.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Additional VM Patching solution enabled on the Virtual Machine. + public readonly partial struct AdditionalOsPatch : IEquatable + { + private readonly string _value; + private const string WUValue = "WU"; + private const string WUMUValue = "WUMU"; + private const string WSUSValue = "WSUS"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public AdditionalOsPatch(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Gets the WU. + public static AdditionalOsPatch WU { get; } = new AdditionalOsPatch(WUValue); + + /// Gets the WUMU. + public static AdditionalOsPatch WUMU { get; } = new AdditionalOsPatch(WUMUValue); + + /// Gets the WSUS. + public static AdditionalOsPatch WSUS { get; } = new AdditionalOsPatch(WSUSValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(AdditionalOsPatch left, AdditionalOsPatch right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(AdditionalOsPatch left, AdditionalOsPatch right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator AdditionalOsPatch(string value) => new AdditionalOsPatch(value); + + /// Converts a string to a . + /// The value. + public static implicit operator AdditionalOsPatch?(string value) => value == null ? null : new AdditionalOsPatch(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AdditionalOsPatch other && Equals(other); + + /// + public bool Equals(AdditionalOsPatch other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalVmPatch.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalVmPatch.cs new file mode 100644 index 000000000000..0aa259a2d7a5 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalVmPatch.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Additional Patch to be enable or enabled on the SQL Virtual Machine. + public readonly partial struct AdditionalVmPatch : IEquatable + { + private readonly string _value; + private const string NotSetValue = "NotSet"; + private const string MicrosoftUpdateValue = "MicrosoftUpdate"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public AdditionalVmPatch(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Gets the NotSet. + public static AdditionalVmPatch NotSet { get; } = new AdditionalVmPatch(NotSetValue); + + /// Gets the MicrosoftUpdate. + public static AdditionalVmPatch MicrosoftUpdate { get; } = new AdditionalVmPatch(MicrosoftUpdateValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(AdditionalVmPatch left, AdditionalVmPatch right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(AdditionalVmPatch left, AdditionalVmPatch right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator AdditionalVmPatch(string value) => new AdditionalVmPatch(value); + + /// Converts a string to a . + /// The value. + public static implicit operator AdditionalVmPatch?(string value) => value == null ? null : new AdditionalVmPatch(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AdditionalVmPatch other && Equals(other); + + /// + public bool Equals(AdditionalVmPatch other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.Serialization.cs index 0de634c5f40e..334b76a94389 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - internal partial class AvailabilityGroupConfiguration : IUtf8JsonSerializable, IJsonModel + /// Availability group configuration. + internal partial class AvailabilityGroupConfiguration : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,31 +29,30 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupConfiguration)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Replicas)) { writer.WritePropertyName("replicas"u8); writer.WriteStartArray(); - foreach (var item in Replicas) + foreach (AvailabilityGroupReplica item in Replicas) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -61,39 +61,43 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AvailabilityGroupConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + AvailabilityGroupConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupConfiguration)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAvailabilityGroupConfiguration(document.RootElement, options); } - internal static AvailabilityGroupConfiguration DeserializeAvailabilityGroupConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AvailabilityGroupConfiguration DeserializeAvailabilityGroupConfiguration(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList replicas = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("replicas"u8)) + if (prop.NameEquals("replicas"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(AvailabilityGroupReplica.DeserializeAvailabilityGroupReplica(item, options)); } @@ -102,17 +106,19 @@ internal static AvailabilityGroupConfiguration DeserializeAvailabilityGroupConfi } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new AvailabilityGroupConfiguration(replicas ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new AvailabilityGroupConfiguration(replicas ?? new ChangeTrackingList(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -122,15 +128,20 @@ BinaryData IPersistableModel.Write(ModelReaderWr } } - AvailabilityGroupConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + AvailabilityGroupConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAvailabilityGroupConfiguration(document.RootElement, options); } default: @@ -138,6 +149,7 @@ AvailabilityGroupConfiguration IPersistableModel } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.cs index 78fde31660f8..6e9faf6a294c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.cs @@ -7,43 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Availability group configuration. internal partial class AvailabilityGroupConfiguration { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public AvailabilityGroupConfiguration() @@ -53,11 +25,11 @@ public AvailabilityGroupConfiguration() /// Initializes a new instance of . /// Replica configurations. - /// Keeps track of any properties unknown to the library. - internal AvailabilityGroupConfiguration(IList replicas, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal AvailabilityGroupConfiguration(IList replicas, IDictionary additionalBinaryDataProperties) { Replicas = replicas; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Replica configurations. diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.Serialization.cs index b76cb42558f3..02e1345e0f35 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.Serialization.cs @@ -9,14 +9,16 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - internal partial class AvailabilityGroupListenerListResult : IUtf8JsonSerializable, IJsonModel + /// The response of a AvailabilityGroupListener list operation. + internal partial class AvailabilityGroupListenerListResult : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,17 +30,16 @@ void IJsonModel.Write(Utf8JsonWriter writer /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupListenerListResult)} does not support writing '{format}' format."); } - - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); - foreach (var item in Value) + foreach (AvailabilityGroupListenerData item in Value) { writer.WriteObjectValue(item, options); } @@ -47,17 +48,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W" && Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -66,64 +67,70 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AvailabilityGroupListenerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + AvailabilityGroupListenerListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupListenerListResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupListenerListResult)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAvailabilityGroupListenerListResult(document.RootElement, options); } - internal static AvailabilityGroupListenerListResult DeserializeAvailabilityGroupListenerListResult(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AvailabilityGroupListenerListResult DeserializeAvailabilityGroupListenerListResult(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + Uri nextLink = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (prop.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(AvailabilityGroupListenerData.DeserializeAvailabilityGroupListenerData(item, options)); } value = array; continue; } - if (property.NameEquals("nextLink"u8)) + if (prop.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = string.IsNullOrEmpty(prop.Value.GetString()) ? null : new Uri(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new AvailabilityGroupListenerListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new AvailabilityGroupListenerListResult(value, nextLink, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -133,15 +140,20 @@ BinaryData IPersistableModel.Write(ModelRea } } - AvailabilityGroupListenerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + AvailabilityGroupListenerListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupListenerListResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAvailabilityGroupListenerListResult(document.RootElement, options); } default: @@ -149,6 +161,14 @@ AvailabilityGroupListenerListResult IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static AvailabilityGroupListenerListResult FromResponse(Response response) + { + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAvailabilityGroupListenerListResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.cs index db6437cb2ffa..20d9eebe4d02 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.cs @@ -7,43 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// A list of availability group listeners. + /// The response of a AvailabilityGroupListener list operation. internal partial class AvailabilityGroupListenerListResult { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . internal AvailabilityGroupListenerListResult() @@ -52,19 +24,20 @@ internal AvailabilityGroupListenerListResult() } /// Initializes a new instance of . - /// Array of results. - /// Link to retrieve next page of results. - /// Keeps track of any properties unknown to the library. - internal AvailabilityGroupListenerListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + /// The AvailabilityGroupListener items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AvailabilityGroupListenerListResult(IReadOnlyList value, Uri nextLink, IDictionary additionalBinaryDataProperties) { Value = value; NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - /// Array of results. + /// The AvailabilityGroupListener items on this page. public IReadOnlyList Value { get; } - /// Link to retrieve next page of results. - public string NextLink { get; } + + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.Serialization.cs index b1d6d4a5076b..7ff47a8dd24a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.Serialization.cs @@ -10,13 +10,15 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class AvailabilityGroupListenerLoadBalancerConfiguration : IUtf8JsonSerializable, IJsonModel + /// A load balancer configuration for an availability group listener. + public partial class AvailabilityGroupListenerLoadBalancerConfiguration : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +30,11 @@ void IJsonModel.Write(Utf8Js /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupListenerLoadBalancerConfiguration)} does not support writing '{format}' format."); } - if (Optional.IsDefined(PrivateIPAddress)) { writer.WritePropertyName("privateIpAddress"u8); @@ -58,7 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("sqlVirtualMachineInstances"u8); writer.WriteStartArray(); - foreach (var item in SqlVmInstances) + foreach (ResourceIdentifier item in SqlVmInstances) { if (item == null) { @@ -69,15 +70,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -86,22 +87,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AvailabilityGroupListenerLoadBalancerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + AvailabilityGroupListenerLoadBalancerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupListenerLoadBalancerConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupListenerLoadBalancerConfiguration)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAvailabilityGroupListenerLoadBalancerConfiguration(document.RootElement, options); } - internal static AvailabilityGroupListenerLoadBalancerConfiguration DeserializeAvailabilityGroupListenerLoadBalancerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AvailabilityGroupListenerLoadBalancerConfiguration DeserializeAvailabilityGroupListenerLoadBalancerConfiguration(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -111,54 +117,53 @@ internal static AvailabilityGroupListenerLoadBalancerConfiguration DeserializeAv ResourceIdentifier loadBalancerResourceId = default; int? probePort = default; IList sqlVmInstances = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("privateIpAddress"u8)) + if (prop.NameEquals("privateIpAddress"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - privateIPAddress = AvailabilityGroupListenerPrivateIPAddress.DeserializeAvailabilityGroupListenerPrivateIPAddress(property.Value, options); + privateIPAddress = AvailabilityGroupListenerPrivateIPAddress.DeserializeAvailabilityGroupListenerPrivateIPAddress(prop.Value, options); continue; } - if (property.NameEquals("publicIpAddressResourceId"u8)) + if (prop.NameEquals("publicIpAddressResourceId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - publicIPAddressResourceId = new ResourceIdentifier(property.Value.GetString()); + publicIPAddressResourceId = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("loadBalancerResourceId"u8)) + if (prop.NameEquals("loadBalancerResourceId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - loadBalancerResourceId = new ResourceIdentifier(property.Value.GetString()); + loadBalancerResourceId = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("probePort"u8)) + if (prop.NameEquals("probePort"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - probePort = property.Value.GetInt32(); + probePort = prop.Value.GetInt32(); continue; } - if (property.NameEquals("sqlVirtualMachineInstances"u8)) + if (prop.NameEquals("sqlVirtualMachineInstances"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { @@ -174,23 +179,25 @@ internal static AvailabilityGroupListenerLoadBalancerConfiguration DeserializeAv } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AvailabilityGroupListenerLoadBalancerConfiguration( privateIPAddress, publicIPAddressResourceId, loadBalancerResourceId, probePort, sqlVmInstances ?? new ChangeTrackingList(), - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -200,15 +207,20 @@ BinaryData IPersistableModel } } - AvailabilityGroupListenerLoadBalancerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + AvailabilityGroupListenerLoadBalancerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupListenerLoadBalancerConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAvailabilityGroupListenerLoadBalancerConfiguration(document.RootElement, options); } default: @@ -216,6 +228,7 @@ AvailabilityGroupListenerLoadBalancerConfiguration IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.cs index 4762cc167a4a..5181256369d9 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.cs @@ -8,43 +8,15 @@ using System; using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// A load balancer configuration for an availability group listener. public partial class AvailabilityGroupListenerLoadBalancerConfiguration { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public AvailabilityGroupListenerLoadBalancerConfiguration() @@ -58,25 +30,29 @@ public AvailabilityGroupListenerLoadBalancerConfiguration() /// Resource id of the load balancer. /// Probe port. /// List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener. - /// Keeps track of any properties unknown to the library. - internal AvailabilityGroupListenerLoadBalancerConfiguration(AvailabilityGroupListenerPrivateIPAddress privateIPAddress, ResourceIdentifier publicIPAddressResourceId, ResourceIdentifier loadBalancerResourceId, int? probePort, IList sqlVmInstances, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal AvailabilityGroupListenerLoadBalancerConfiguration(AvailabilityGroupListenerPrivateIPAddress privateIPAddress, ResourceIdentifier publicIPAddressResourceId, ResourceIdentifier loadBalancerResourceId, int? probePort, IList sqlVmInstances, IDictionary additionalBinaryDataProperties) { PrivateIPAddress = privateIPAddress; PublicIPAddressResourceId = publicIPAddressResourceId; LoadBalancerResourceId = loadBalancerResourceId; ProbePort = probePort; SqlVmInstances = sqlVmInstances; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Private IP address. public AvailabilityGroupListenerPrivateIPAddress PrivateIPAddress { get; set; } + /// Resource id of the public IP. public ResourceIdentifier PublicIPAddressResourceId { get; set; } + /// Resource id of the load balancer. public ResourceIdentifier LoadBalancerResourceId { get; set; } + /// Probe port. public int? ProbePort { get; set; } + /// List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener. public IList SqlVmInstances { get; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.Serialization.cs index e0a84db0f54c..7187d45d9c22 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.Serialization.cs @@ -11,13 +11,15 @@ using System.Net; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class AvailabilityGroupListenerPrivateIPAddress : IUtf8JsonSerializable, IJsonModel + /// A private IP address bound to the availability group listener. + public partial class AvailabilityGroupListenerPrivateIPAddress : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -29,12 +31,11 @@ void IJsonModel.Write(Utf8JsonWriter /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupListenerPrivateIPAddress)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IPAddress)) { writer.WritePropertyName("ipAddress"u8); @@ -45,15 +46,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("subnetResourceId"u8); writer.WriteStringValue(SubnetResourceId); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -62,63 +63,69 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AvailabilityGroupListenerPrivateIPAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + AvailabilityGroupListenerPrivateIPAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupListenerPrivateIPAddress JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupListenerPrivateIPAddress)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAvailabilityGroupListenerPrivateIPAddress(document.RootElement, options); } - internal static AvailabilityGroupListenerPrivateIPAddress DeserializeAvailabilityGroupListenerPrivateIPAddress(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AvailabilityGroupListenerPrivateIPAddress DeserializeAvailabilityGroupListenerPrivateIPAddress(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IPAddress ipAddress = default; ResourceIdentifier subnetResourceId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("ipAddress"u8)) + if (prop.NameEquals("ipAddress"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - ipAddress = IPAddress.Parse(property.Value.GetString()); + ipAddress = IPAddress.Parse(prop.Value.GetString()); continue; } - if (property.NameEquals("subnetResourceId"u8)) + if (prop.NameEquals("subnetResourceId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - subnetResourceId = new ResourceIdentifier(property.Value.GetString()); + subnetResourceId = new ResourceIdentifier(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new AvailabilityGroupListenerPrivateIPAddress(ipAddress, subnetResourceId, serializedAdditionalRawData); + return new AvailabilityGroupListenerPrivateIPAddress(ipAddress, subnetResourceId, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -128,15 +135,20 @@ BinaryData IPersistableModel.Write(Mo } } - AvailabilityGroupListenerPrivateIPAddress IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + AvailabilityGroupListenerPrivateIPAddress IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupListenerPrivateIPAddress PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAvailabilityGroupListenerPrivateIPAddress(document.RootElement, options); } default: @@ -144,6 +156,7 @@ AvailabilityGroupListenerPrivateIPAddress IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.cs index 260a426835c8..ec112ef5ec81 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.cs @@ -15,37 +15,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// A private IP address bound to the availability group listener. public partial class AvailabilityGroupListenerPrivateIPAddress { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public AvailabilityGroupListenerPrivateIPAddress() @@ -55,16 +26,17 @@ public AvailabilityGroupListenerPrivateIPAddress() /// Initializes a new instance of . /// Private IP address bound to the availability group listener. /// Subnet used to include private IP. - /// Keeps track of any properties unknown to the library. - internal AvailabilityGroupListenerPrivateIPAddress(IPAddress ipAddress, ResourceIdentifier subnetResourceId, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal AvailabilityGroupListenerPrivateIPAddress(IPAddress ipAddress, ResourceIdentifier subnetResourceId, IDictionary additionalBinaryDataProperties) { IPAddress = ipAddress; SubnetResourceId = subnetResourceId; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Private IP address bound to the availability group listener. public IPAddress IPAddress { get; set; } + /// Subnet used to include private IP. public ResourceIdentifier SubnetResourceId { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerProperties.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerProperties.Serialization.cs new file mode 100644 index 000000000000..b1132db75929 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerProperties.Serialization.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The properties of an availability group listener. + internal partial class AvailabilityGroupListenerProperties : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AvailabilityGroupListenerProperties)} does not support writing '{format}' format."); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (Optional.IsDefined(AvailabilityGroupName)) + { + writer.WritePropertyName("availabilityGroupName"u8); + writer.WriteStringValue(AvailabilityGroupName); + } + if (Optional.IsCollectionDefined(LoadBalancerConfigurations)) + { + writer.WritePropertyName("loadBalancerConfigurations"u8); + writer.WriteStartArray(); + foreach (AvailabilityGroupListenerLoadBalancerConfiguration item in LoadBalancerConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MultiSubnetIPConfigurations)) + { + writer.WritePropertyName("multiSubnetIpConfigurations"u8); + writer.WriteStartArray(); + foreach (MultiSubnetIPConfiguration item in MultiSubnetIPConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(CreateDefaultAvailabilityGroupIfNotExist)) + { + writer.WritePropertyName("createDefaultAvailabilityGroupIfNotExist"u8); + writer.WriteBooleanValue(CreateDefaultAvailabilityGroupIfNotExist.Value); + } + if (Optional.IsDefined(Port)) + { + writer.WritePropertyName("port"u8); + writer.WriteNumberValue(Port.Value); + } + if (Optional.IsDefined(AvailabilityGroupConfiguration)) + { + writer.WritePropertyName("availabilityGroupConfiguration"u8); + writer.WriteObjectValue(AvailabilityGroupConfiguration, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + AvailabilityGroupListenerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupListenerProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AvailabilityGroupListenerProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvailabilityGroupListenerProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AvailabilityGroupListenerProperties DeserializeAvailabilityGroupListenerProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string provisioningState = default; + string availabilityGroupName = default; + IList loadBalancerConfigurations = default; + IList multiSubnetIPConfigurations = default; + bool? createDefaultAvailabilityGroupIfNotExist = default; + int? port = default; + AvailabilityGroupConfiguration availabilityGroupConfiguration = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("provisioningState"u8)) + { + provisioningState = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("availabilityGroupName"u8)) + { + availabilityGroupName = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("loadBalancerConfigurations"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(AvailabilityGroupListenerLoadBalancerConfiguration.DeserializeAvailabilityGroupListenerLoadBalancerConfiguration(item, options)); + } + loadBalancerConfigurations = array; + continue; + } + if (prop.NameEquals("multiSubnetIpConfigurations"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(MultiSubnetIPConfiguration.DeserializeMultiSubnetIPConfiguration(item, options)); + } + multiSubnetIPConfigurations = array; + continue; + } + if (prop.NameEquals("createDefaultAvailabilityGroupIfNotExist"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createDefaultAvailabilityGroupIfNotExist = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("port"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + port = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("availabilityGroupConfiguration"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availabilityGroupConfiguration = AvailabilityGroupConfiguration.DeserializeAvailabilityGroupConfiguration(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new AvailabilityGroupListenerProperties( + provisioningState, + availabilityGroupName, + loadBalancerConfigurations ?? new ChangeTrackingList(), + multiSubnetIPConfigurations ?? new ChangeTrackingList(), + createDefaultAvailabilityGroupIfNotExist, + port, + availabilityGroupConfiguration, + additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(AvailabilityGroupListenerProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + AvailabilityGroupListenerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupListenerProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeAvailabilityGroupListenerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvailabilityGroupListenerProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerProperties.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerProperties.cs new file mode 100644 index 000000000000..8a3b03a2612c --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The properties of an availability group listener. + internal partial class AvailabilityGroupListenerProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public AvailabilityGroupListenerProperties() + { + LoadBalancerConfigurations = new ChangeTrackingList(); + MultiSubnetIPConfigurations = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Provisioning state to track the async operation status. + /// Name of the availability group. + /// List of load balancer configurations for an availability group listener. + /// List of multi subnet IP configurations for an AG listener. + /// Create a default availability group if it does not exist. + /// Listener port. + /// Availability Group configuration. + /// Keeps track of any properties unknown to the library. + internal AvailabilityGroupListenerProperties(string provisioningState, string availabilityGroupName, IList loadBalancerConfigurations, IList multiSubnetIPConfigurations, bool? createDefaultAvailabilityGroupIfNotExist, int? port, AvailabilityGroupConfiguration availabilityGroupConfiguration, IDictionary additionalBinaryDataProperties) + { + ProvisioningState = provisioningState; + AvailabilityGroupName = availabilityGroupName; + LoadBalancerConfigurations = loadBalancerConfigurations; + MultiSubnetIPConfigurations = multiSubnetIPConfigurations; + CreateDefaultAvailabilityGroupIfNotExist = createDefaultAvailabilityGroupIfNotExist; + Port = port; + AvailabilityGroupConfiguration = availabilityGroupConfiguration; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Provisioning state to track the async operation status. + public string ProvisioningState { get; } + + /// Name of the availability group. + public string AvailabilityGroupName { get; set; } + + /// List of load balancer configurations for an availability group listener. + public IList LoadBalancerConfigurations { get; } = new ChangeTrackingList(); + + /// List of multi subnet IP configurations for an AG listener. + public IList MultiSubnetIPConfigurations { get; } = new ChangeTrackingList(); + + /// Create a default availability group if it does not exist. + public bool? CreateDefaultAvailabilityGroupIfNotExist { get; set; } + + /// Listener port. + public int? Port { get; set; } + + /// Availability Group configuration. + internal AvailabilityGroupConfiguration AvailabilityGroupConfiguration { get; set; } + + /// Replica configurations. + public IList AvailabilityGroupReplicas + { + get + { + if (AvailabilityGroupConfiguration is null) + { + AvailabilityGroupConfiguration = new AvailabilityGroupConfiguration(); + } + return AvailabilityGroupConfiguration.Replicas; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.Serialization.cs index 2d480652ba8f..f7375f92fe22 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.Serialization.cs @@ -10,13 +10,15 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class AvailabilityGroupReplica : IUtf8JsonSerializable, IJsonModel + /// Availability group replica configuration. + public partial class AvailabilityGroupReplica : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +30,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupReplica)} does not support writing '{format}' format."); } - if (Optional.IsDefined(SqlVmInstanceId)) { writer.WritePropertyName("sqlVirtualMachineInstanceId"u8); @@ -59,15 +60,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("readableSecondary"u8); writer.WriteStringValue(ReadableSecondary.Value.ToString()); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -76,22 +77,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AvailabilityGroupReplica IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + AvailabilityGroupReplica IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupReplica JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(AvailabilityGroupReplica)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeAvailabilityGroupReplica(document.RootElement, options); } - internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -101,74 +107,75 @@ internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(Jso AvailabilityGroupReplicaCommitMode? commit = default; AvailabilityGroupReplicaFailoverMode? failover = default; ReadableSecondaryMode? readableSecondary = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("sqlVirtualMachineInstanceId"u8)) + if (prop.NameEquals("sqlVirtualMachineInstanceId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlVmInstanceId = new ResourceIdentifier(property.Value.GetString()); + sqlVmInstanceId = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("role"u8)) + if (prop.NameEquals("role"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - role = new AvailabilityGroupReplicaRole(property.Value.GetString()); + role = new AvailabilityGroupReplicaRole(prop.Value.GetString()); continue; } - if (property.NameEquals("commit"u8)) + if (prop.NameEquals("commit"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - commit = new AvailabilityGroupReplicaCommitMode(property.Value.GetString()); + commit = new AvailabilityGroupReplicaCommitMode(prop.Value.GetString()); continue; } - if (property.NameEquals("failover"u8)) + if (prop.NameEquals("failover"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - failover = new AvailabilityGroupReplicaFailoverMode(property.Value.GetString()); + failover = new AvailabilityGroupReplicaFailoverMode(prop.Value.GetString()); continue; } - if (property.NameEquals("readableSecondary"u8)) + if (prop.NameEquals("readableSecondary"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - readableSecondary = new ReadableSecondaryMode(property.Value.GetString()); + readableSecondary = new ReadableSecondaryMode(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new AvailabilityGroupReplica( sqlVmInstanceId, role, commit, failover, readableSecondary, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -178,15 +185,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp } } - AvailabilityGroupReplica IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + AvailabilityGroupReplica IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AvailabilityGroupReplica PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeAvailabilityGroupReplica(document.RootElement, options); } default: @@ -194,6 +206,7 @@ AvailabilityGroupReplica IPersistableModel.Create(Bina } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.cs index 6c9fb0124f8b..15bed2a43203 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.cs @@ -14,37 +14,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Availability group replica configuration. public partial class AvailabilityGroupReplica { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public AvailabilityGroupReplica() @@ -57,25 +28,29 @@ public AvailabilityGroupReplica() /// Replica commit mode in availability group. /// Replica failover mode in availability group. /// Replica readable secondary mode in availability group. - /// Keeps track of any properties unknown to the library. - internal AvailabilityGroupReplica(ResourceIdentifier sqlVmInstanceId, AvailabilityGroupReplicaRole? role, AvailabilityGroupReplicaCommitMode? commit, AvailabilityGroupReplicaFailoverMode? failover, ReadableSecondaryMode? readableSecondary, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal AvailabilityGroupReplica(ResourceIdentifier sqlVmInstanceId, AvailabilityGroupReplicaRole? role, AvailabilityGroupReplicaCommitMode? commit, AvailabilityGroupReplicaFailoverMode? failover, ReadableSecondaryMode? readableSecondary, IDictionary additionalBinaryDataProperties) { SqlVmInstanceId = sqlVmInstanceId; Role = role; Commit = commit; Failover = failover; ReadableSecondary = readableSecondary; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Sql VirtualMachine Instance Id. public ResourceIdentifier SqlVmInstanceId { get; set; } + /// Replica Role in availability group. public AvailabilityGroupReplicaRole? Role { get; set; } + /// Replica commit mode in availability group. public AvailabilityGroupReplicaCommitMode? Commit { get; set; } + /// Replica failover mode in availability group. public AvailabilityGroupReplicaFailoverMode? Failover { get; set; } + /// Replica readable secondary mode in availability group. public ReadableSecondaryMode? ReadableSecondary { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaCommitMode.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaCommitMode.cs index 6b9213ba64f1..fb028072056b 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaCommitMode.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaCommitMode.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,38 +15,55 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct AvailabilityGroupReplicaCommitMode : IEquatable { private readonly string _value; + private const string SynchronousCommitValue = "Synchronous_Commit"; + private const string AsynchronousCommitValue = "Asynchronous_Commit"; /// Initializes a new instance of . + /// The value. /// is null. public AvailabilityGroupReplicaCommitMode(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string SynchronousCommitValue = "SYNCHRONOUS_COMMIT"; - private const string AsynchronousCommitValue = "ASYNCHRONOUS_COMMIT"; + _value = value; + } - /// SYNCHRONOUS_COMMIT. + /// Gets the SynchronousCommit. public static AvailabilityGroupReplicaCommitMode SynchronousCommit { get; } = new AvailabilityGroupReplicaCommitMode(SynchronousCommitValue); - /// ASYNCHRONOUS_COMMIT. + + /// Gets the AsynchronousCommit. public static AvailabilityGroupReplicaCommitMode AsynchronousCommit { get; } = new AvailabilityGroupReplicaCommitMode(AsynchronousCommitValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(AvailabilityGroupReplicaCommitMode left, AvailabilityGroupReplicaCommitMode right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(AvailabilityGroupReplicaCommitMode left, AvailabilityGroupReplicaCommitMode right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator AvailabilityGroupReplicaCommitMode(string value) => new AvailabilityGroupReplicaCommitMode(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator AvailabilityGroupReplicaCommitMode?(string value) => value == null ? null : new AvailabilityGroupReplicaCommitMode(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is AvailabilityGroupReplicaCommitMode other && Equals(other); - /// + + /// public bool Equals(AvailabilityGroupReplicaCommitMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaFailoverMode.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaFailoverMode.cs index 0557b73bbca3..eea78818ceb3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaFailoverMode.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaFailoverMode.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,38 +15,55 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct AvailabilityGroupReplicaFailoverMode : IEquatable { private readonly string _value; + private const string AutomaticValue = "Automatic"; + private const string ManualValue = "Manual"; /// Initializes a new instance of . + /// The value. /// is null. public AvailabilityGroupReplicaFailoverMode(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string AutomaticValue = "AUTOMATIC"; - private const string ManualValue = "MANUAL"; + _value = value; + } - /// AUTOMATIC. + /// Gets the Automatic. public static AvailabilityGroupReplicaFailoverMode Automatic { get; } = new AvailabilityGroupReplicaFailoverMode(AutomaticValue); - /// MANUAL. + + /// Gets the Manual. public static AvailabilityGroupReplicaFailoverMode Manual { get; } = new AvailabilityGroupReplicaFailoverMode(ManualValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(AvailabilityGroupReplicaFailoverMode left, AvailabilityGroupReplicaFailoverMode right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(AvailabilityGroupReplicaFailoverMode left, AvailabilityGroupReplicaFailoverMode right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator AvailabilityGroupReplicaFailoverMode(string value) => new AvailabilityGroupReplicaFailoverMode(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator AvailabilityGroupReplicaFailoverMode?(string value) => value == null ? null : new AvailabilityGroupReplicaFailoverMode(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is AvailabilityGroupReplicaFailoverMode other && Equals(other); - /// + + /// public bool Equals(AvailabilityGroupReplicaFailoverMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaRole.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaRole.cs index 113a4795982a..9a1d9738bbc3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaRole.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaRole.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,38 +15,55 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct AvailabilityGroupReplicaRole : IEquatable { private readonly string _value; + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; /// Initializes a new instance of . + /// The value. /// is null. public AvailabilityGroupReplicaRole(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string PrimaryValue = "PRIMARY"; - private const string SecondaryValue = "SECONDARY"; + _value = value; + } - /// PRIMARY. + /// Gets the Primary. public static AvailabilityGroupReplicaRole Primary { get; } = new AvailabilityGroupReplicaRole(PrimaryValue); - /// SECONDARY. + + /// Gets the Secondary. public static AvailabilityGroupReplicaRole Secondary { get; } = new AvailabilityGroupReplicaRole(SecondaryValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(AvailabilityGroupReplicaRole left, AvailabilityGroupReplicaRole right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(AvailabilityGroupReplicaRole left, AvailabilityGroupReplicaRole right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator AvailabilityGroupReplicaRole(string value) => new AvailabilityGroupReplicaRole(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator AvailabilityGroupReplicaRole?(string value) => value == null ? null : new AvailabilityGroupReplicaRole(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is AvailabilityGroupReplicaRole other && Equals(other); - /// + + /// public bool Equals(AvailabilityGroupReplicaRole other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs index 0f970f0b495a..95ce4d88fb92 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs @@ -6,6 +6,7 @@ #nullable disable using System.ClientModel.Primitives; +using Azure; using Azure.ResourceManager.Models; using Azure.ResourceManager.SqlVirtualMachine.Models; @@ -13,40 +14,56 @@ namespace Azure.ResourceManager.SqlVirtualMachine { /// /// Context class which will be filled in by the System.ClientModel.SourceGeneration. - /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' + /// For more information /// + [ModelReaderWriterBuildable(typeof(AADAuthenticationSettings))] [ModelReaderWriterBuildable(typeof(AdditionalFeaturesServerConfigurations))] [ModelReaderWriterBuildable(typeof(AvailabilityGroupConfiguration))] [ModelReaderWriterBuildable(typeof(AvailabilityGroupListenerData))] [ModelReaderWriterBuildable(typeof(AvailabilityGroupListenerListResult))] [ModelReaderWriterBuildable(typeof(AvailabilityGroupListenerLoadBalancerConfiguration))] [ModelReaderWriterBuildable(typeof(AvailabilityGroupListenerPrivateIPAddress))] + [ModelReaderWriterBuildable(typeof(AvailabilityGroupListenerProperties))] [ModelReaderWriterBuildable(typeof(AvailabilityGroupListenerResource))] [ModelReaderWriterBuildable(typeof(AvailabilityGroupReplica))] + [ModelReaderWriterBuildable(typeof(Info))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(MultiSubnetIPConfiguration))] + [ModelReaderWriterBuildable(typeof(OperationDisplay))] + [ModelReaderWriterBuildable(typeof(OperationListResult))] + [ModelReaderWriterBuildable(typeof(OperationProperty))] + [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SqlConnectivityUpdateSettings))] [ModelReaderWriterBuildable(typeof(SqlInstanceSettings))] [ModelReaderWriterBuildable(typeof(SqlServerConfigurationsManagementSettings))] [ModelReaderWriterBuildable(typeof(SqlStorageSettings))] [ModelReaderWriterBuildable(typeof(SqlStorageUpdateSettings))] [ModelReaderWriterBuildable(typeof(SqlTempDBSettings))] + [ModelReaderWriterBuildable(typeof(SqlVirtualMachineGroupListResult))] + [ModelReaderWriterBuildable(typeof(SqlVirtualMachineGroupProperties))] + [ModelReaderWriterBuildable(typeof(SqlVirtualMachineListResult))] + [ModelReaderWriterBuildable(typeof(SqlVirtualMachineProperties))] [ModelReaderWriterBuildable(typeof(SqlVmAssessmentSchedule))] [ModelReaderWriterBuildable(typeof(SqlVmAssessmentSettings))] [ModelReaderWriterBuildable(typeof(SqlVmAutoBackupSettings))] [ModelReaderWriterBuildable(typeof(SqlVmAutoPatchingSettings))] [ModelReaderWriterBuildable(typeof(SqlVmData))] + [ModelReaderWriterBuildable(typeof(SqlVmDiskConfigAssessmentContent))] [ModelReaderWriterBuildable(typeof(SqlVmGroupData))] - [ModelReaderWriterBuildable(typeof(SqlVmGroupListResult))] [ModelReaderWriterBuildable(typeof(SqlVmGroupPatch))] [ModelReaderWriterBuildable(typeof(SqlVmGroupResource))] [ModelReaderWriterBuildable(typeof(SqlVmKeyVaultCredentialSettings))] - [ModelReaderWriterBuildable(typeof(SqlVmListResult))] [ModelReaderWriterBuildable(typeof(SqlVmPatch))] [ModelReaderWriterBuildable(typeof(SqlVmResource))] [ModelReaderWriterBuildable(typeof(SqlVmStorageConfigurationSettings))] + [ModelReaderWriterBuildable(typeof(SqlVmTroubleshooting))] [ModelReaderWriterBuildable(typeof(SqlWorkloadTypeUpdateSettings))] [ModelReaderWriterBuildable(typeof(SystemData))] + [ModelReaderWriterBuildable(typeof(TroubleshootingAdditionalProperties))] + [ModelReaderWriterBuildable(typeof(TroubleshootingStatus))] + [ModelReaderWriterBuildable(typeof(UnhealthyReplicaInfo))] + [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] + [ModelReaderWriterBuildable(typeof(VirtualMachineIdentity))] [ModelReaderWriterBuildable(typeof(WindowsServerFailoverClusterDomainCredentials))] [ModelReaderWriterBuildable(typeof(WindowsServerFailoverClusterDomainProfile))] public partial class AzureResourceManagerSqlVirtualMachineContext : ModelReaderWriterContext diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs new file mode 100644 index 000000000000..63dc37812f8f --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Result of the request to list SQL operations. + public partial class Info : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Info)} does not support writing '{format}' format."); + } + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(Display)) + { + writer.WritePropertyName("display"u8); + writer.WriteObjectValue(Display, options); + } + if (options.Format != "W" && Optional.IsDefined(Origin)) + { + writer.WritePropertyName("origin"u8); + writer.WriteStringValue(Origin.Value.ToString()); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + Info IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual Info JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Info)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInfo(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static Info DeserializeInfo(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + OperationDisplay display = default; + OperationOrigin? origin = default; + IReadOnlyDictionary properties = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("display"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + display = OperationDisplay.DeserializeOperationDisplay(prop.Value, options); + continue; + } + if (prop.NameEquals("origin"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + origin = new OperationOrigin(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, OperationProperty.DeserializeOperationProperty(prop0.Value, options)); + } + properties = dictionary; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new Info(name, display, origin, properties ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(Info)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + Info IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual Info PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Info)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs new file mode 100644 index 000000000000..3f69b71ccb18 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Result of the request to list SQL operations. + public partial class Info + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal Info() + { + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The name of the operation being performed on this particular object.". + /// he localized display information for this particular operation / action. + /// The intended executor of the operation.". + /// Additional descriptions for the operation. + /// Keeps track of any properties unknown to the library. + internal Info(string name, OperationDisplay display, OperationOrigin? origin, IReadOnlyDictionary properties, IDictionary additionalBinaryDataProperties) + { + Name = name; + Display = display; + Origin = origin; + Properties = properties; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The name of the operation being performed on this particular object.". + public string Name { get; } + + /// he localized display information for this particular operation / action. + public OperationDisplay Display { get; } + + /// The intended executor of the operation.". + public OperationOrigin? Origin { get; } + + /// Additional descriptions for the operation. + public IReadOnlyDictionary Properties { get; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LeastPrivilegeMode.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LeastPrivilegeMode.cs new file mode 100644 index 000000000000..4f6a48366eb1 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LeastPrivilegeMode.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// SQL IaaS Agent least privilege mode. + public readonly partial struct LeastPrivilegeMode : IEquatable + { + private readonly string _value; + private const string EnabledValue = "Enabled"; + private const string NotSetValue = "NotSet"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public LeastPrivilegeMode(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Gets the Enabled. + public static LeastPrivilegeMode Enabled { get; } = new LeastPrivilegeMode(EnabledValue); + + /// Gets the NotSet. + public static LeastPrivilegeMode NotSet { get; } = new LeastPrivilegeMode(NotSetValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(LeastPrivilegeMode left, LeastPrivilegeMode right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(LeastPrivilegeMode left, LeastPrivilegeMode right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator LeastPrivilegeMode(string value) => new LeastPrivilegeMode(value); + + /// Converts a string to a . + /// The value. + public static implicit operator LeastPrivilegeMode?(string value) => value == null ? null : new LeastPrivilegeMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LeastPrivilegeMode other && Equals(other); + + /// + public bool Equals(LeastPrivilegeMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/MultiSubnetIPConfiguration.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/MultiSubnetIPConfiguration.Serialization.cs index f962d224ca33..19207ac6f7ff 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/MultiSubnetIPConfiguration.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/MultiSubnetIPConfiguration.Serialization.cs @@ -9,14 +9,20 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class MultiSubnetIPConfiguration : IUtf8JsonSerializable, IJsonModel + /// Multi subnet ip configuration for an availability group listener. + public partial class MultiSubnetIPConfiguration : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal MultiSubnetIPConfiguration() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,25 +34,24 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MultiSubnetIPConfiguration)} does not support writing '{format}' format."); } - writer.WritePropertyName("privateIpAddress"u8); writer.WriteObjectValue(PrivateIPAddress, options); writer.WritePropertyName("sqlVirtualMachineInstance"u8); writer.WriteStringValue(SqlVmInstance); - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -55,55 +60,61 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - MultiSubnetIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + MultiSubnetIPConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual MultiSubnetIPConfiguration JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(MultiSubnetIPConfiguration)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeMultiSubnetIPConfiguration(document.RootElement, options); } - internal static MultiSubnetIPConfiguration DeserializeMultiSubnetIPConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static MultiSubnetIPConfiguration DeserializeMultiSubnetIPConfiguration(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } AvailabilityGroupListenerPrivateIPAddress privateIPAddress = default; string sqlVmInstance = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("privateIpAddress"u8)) + if (prop.NameEquals("privateIpAddress"u8)) { - privateIPAddress = AvailabilityGroupListenerPrivateIPAddress.DeserializeAvailabilityGroupListenerPrivateIPAddress(property.Value, options); + privateIPAddress = AvailabilityGroupListenerPrivateIPAddress.DeserializeAvailabilityGroupListenerPrivateIPAddress(prop.Value, options); continue; } - if (property.NameEquals("sqlVirtualMachineInstance"u8)) + if (prop.NameEquals("sqlVirtualMachineInstance"u8)) { - sqlVmInstance = property.Value.GetString(); + sqlVmInstance = prop.Value.GetString(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new MultiSubnetIPConfiguration(privateIPAddress, sqlVmInstance, serializedAdditionalRawData); + return new MultiSubnetIPConfiguration(privateIPAddress, sqlVmInstance, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -113,15 +124,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriter } } - MultiSubnetIPConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + MultiSubnetIPConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual MultiSubnetIPConfiguration PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeMultiSubnetIPConfiguration(document.RootElement, options); } default: @@ -129,6 +145,7 @@ MultiSubnetIPConfiguration IPersistableModel.Create( } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/MultiSubnetIPConfiguration.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/MultiSubnetIPConfiguration.cs index 9673244525fb..bad216929c11 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/MultiSubnetIPConfiguration.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/MultiSubnetIPConfiguration.cs @@ -7,43 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Multi subnet ip configuration for an availability group listener. public partial class MultiSubnetIPConfiguration { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . /// Private IP address. @@ -61,21 +33,17 @@ public MultiSubnetIPConfiguration(AvailabilityGroupListenerPrivateIPAddress priv /// Initializes a new instance of . /// Private IP address. /// SQL virtual machine instance resource id that are enrolled into the availability group listener. - /// Keeps track of any properties unknown to the library. - internal MultiSubnetIPConfiguration(AvailabilityGroupListenerPrivateIPAddress privateIPAddress, string sqlVmInstance, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal MultiSubnetIPConfiguration(AvailabilityGroupListenerPrivateIPAddress privateIPAddress, string sqlVmInstance, IDictionary additionalBinaryDataProperties) { PrivateIPAddress = privateIPAddress; SqlVmInstance = sqlVmInstance; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MultiSubnetIPConfiguration() - { + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Private IP address. public AvailabilityGroupListenerPrivateIPAddress PrivateIPAddress { get; set; } + /// SQL virtual machine instance resource id that are enrolled into the availability group listener. public string SqlVmInstance { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.Serialization.cs new file mode 100644 index 000000000000..e7093ffbd829 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Display metadata associated with the operation. + public partial class OperationDisplay : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationDisplay)} does not support writing '{format}' format."); + } + if (options.Format != "W" && Optional.IsDefined(Provider)) + { + writer.WritePropertyName("provider"u8); + writer.WriteStringValue(Provider); + } + if (options.Format != "W" && Optional.IsDefined(Resource)) + { + writer.WritePropertyName("resource"u8); + writer.WriteStringValue(Resource); + } + if (options.Format != "W" && Optional.IsDefined(Operation)) + { + writer.WritePropertyName("operation"u8); + writer.WriteStringValue(Operation); + } + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + OperationDisplay IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual OperationDisplay JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationDisplay)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationDisplay(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static OperationDisplay DeserializeOperationDisplay(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string provider = default; + string resource = default; + string operation = default; + string description = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("provider"u8)) + { + provider = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("resource"u8)) + { + resource = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("operation"u8)) + { + operation = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new OperationDisplay(provider, resource, operation, description, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(OperationDisplay)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + OperationDisplay IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual OperationDisplay PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeOperationDisplay(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationDisplay)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.cs new file mode 100644 index 000000000000..8b35e4e4e973 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Display metadata associated with the operation. + public partial class OperationDisplay + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal OperationDisplay() + { + } + + /// Initializes a new instance of . + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// Keeps track of any properties unknown to the library. + internal OperationDisplay(string provider, string resource, string operation, string description, IDictionary additionalBinaryDataProperties) + { + Provider = provider; + Resource = resource; + Operation = operation; + Description = description; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + public string Provider { get; } + + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + public string Resource { get; } + + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + public string Operation { get; } + + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + public string Description { get; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs new file mode 100644 index 000000000000..2fcaeb9055cd --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Virtual machine resource id for response. + internal partial class OperationListResult : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{format}' format."); + } + if (options.Format != "W") + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (Info item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + OperationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual OperationListResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationListResult)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationListResult(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static OperationListResult DeserializeOperationListResult(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(Info.DeserializeInfo(item, options)); + } + value = array; + continue; + } + if (prop.NameEquals("nextLink"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = string.IsNullOrEmpty(prop.Value.GetString()) ? null : new Uri(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new OperationListResult(value, nextLink, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + OperationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual OperationListResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeOperationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationListResult)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static OperationListResult FromResponse(Response response) + { + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeOperationListResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.cs new file mode 100644 index 000000000000..c17d4cbad3a3 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Virtual machine resource id for response. + internal partial class OperationListResult + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal OperationListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The Operation items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal OperationListResult(IReadOnlyList value, Uri nextLink, IDictionary additionalBinaryDataProperties) + { + Value = value; + NextLink = nextLink; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The Operation items on this page. + public IReadOnlyList Value { get; } + + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationOrigin.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationOrigin.cs new file mode 100644 index 000000000000..3ac59257f7a3 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationOrigin.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The intended executor of the operation. + public readonly partial struct OperationOrigin : IEquatable + { + private readonly string _value; + private const string UserValue = "user"; + private const string SystemValue = "system"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public OperationOrigin(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Gets the User. + public static OperationOrigin User { get; } = new OperationOrigin(UserValue); + + /// Gets the System. + public static OperationOrigin System { get; } = new OperationOrigin(SystemValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(OperationOrigin left, OperationOrigin right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(OperationOrigin left, OperationOrigin right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator OperationOrigin(string value) => new OperationOrigin(value); + + /// Converts a string to a . + /// The value. + public static implicit operator OperationOrigin?(string value) => value == null ? null : new OperationOrigin(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is OperationOrigin other && Equals(other); + + /// + public bool Equals(OperationOrigin other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.Serialization.cs new file mode 100644 index 000000000000..8a765ace29de --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.Serialization.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The OperationProperty. + public partial class OperationProperty : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationProperty)} does not support writing '{format}' format."); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + OperationProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual OperationProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(OperationProperty)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationProperty(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static OperationProperty DeserializeOperationProperty(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new OperationProperty(additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(OperationProperty)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + OperationProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual OperationProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeOperationProperty(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationProperty)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.cs new file mode 100644 index 000000000000..2f4e747c42f6 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The OperationProperty. + public partial class OperationProperty + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal OperationProperty() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal OperationProperty(IDictionary additionalBinaryDataProperties) + { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.Serialization.cs new file mode 100644 index 000000000000..f99166b81af7 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + internal static partial class OsTypeExtensions + { + /// The value to serialize. + public static string ToSerialString(this OsType value) => value switch + { + OsType.Windows => "Windows", + OsType.Linux => "Linux", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown OsType value.") + }; + + /// The value to deserialize. + public static OsType ToOsType(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Windows")) + { + return OsType.Windows; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Linux")) + { + return OsType.Linux; + } + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown OsType value."); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.cs new file mode 100644 index 000000000000..3de8ee88cc28 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Operating System of the current SQL Virtual Machine. + public enum OsType + { + /// Windows. + Windows, + /// Linux. + Linux + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondaryMode.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondaryMode.cs index 0306844f6155..79664db789e6 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondaryMode.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondaryMode.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,41 +15,59 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct ReadableSecondaryMode : IEquatable { private readonly string _value; + private const string NoValue = "No"; + private const string AllValue = "All"; + private const string ReadOnlyValue = "Read_Only"; /// Initializes a new instance of . + /// The value. /// is null. public ReadableSecondaryMode(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string NoValue = "NO"; - private const string AllValue = "ALL"; - private const string ReadOnlyValue = "READ_ONLY"; + _value = value; + } - /// NO. + /// Gets the No. public static ReadableSecondaryMode No { get; } = new ReadableSecondaryMode(NoValue); - /// ALL. + + /// Gets the All. public static ReadableSecondaryMode All { get; } = new ReadableSecondaryMode(AllValue); - /// READ_ONLY. + + /// Gets the ReadOnly. public static ReadableSecondaryMode ReadOnly { get; } = new ReadableSecondaryMode(ReadOnlyValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(ReadableSecondaryMode left, ReadableSecondaryMode right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(ReadableSecondaryMode left, ReadableSecondaryMode right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator ReadableSecondaryMode(string value) => new ReadableSecondaryMode(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator ReadableSecondaryMode?(string value) => value == null ? null : new ReadableSecondaryMode(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is ReadableSecondaryMode other && Equals(other); - /// + + /// public bool Equals(ReadableSecondaryMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqVmBackupScheduleType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqVmBackupScheduleType.cs index 2b5044469514..f7e089bef582 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqVmBackupScheduleType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqVmBackupScheduleType.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,38 +15,55 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqVmBackupScheduleType : IEquatable { private readonly string _value; + private const string ManualValue = "Manual"; + private const string AutomatedValue = "Automated"; /// Initializes a new instance of . + /// The value. /// is null. public SqVmBackupScheduleType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string ManualValue = "Manual"; - private const string AutomatedValue = "Automated"; + _value = value; + } - /// Manual. + /// Gets the Manual. public static SqVmBackupScheduleType Manual { get; } = new SqVmBackupScheduleType(ManualValue); - /// Automated. + + /// Gets the Automated. public static SqVmBackupScheduleType Automated { get; } = new SqVmBackupScheduleType(AutomatedValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqVmBackupScheduleType left, SqVmBackupScheduleType right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqVmBackupScheduleType left, SqVmBackupScheduleType right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqVmBackupScheduleType(string value) => new SqVmBackupScheduleType(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqVmBackupScheduleType?(string value) => value == null ? null : new SqVmBackupScheduleType(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqVmBackupScheduleType other && Equals(other); - /// + + /// public bool Equals(SqVmBackupScheduleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlConnectivityUpdateSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlConnectivityUpdateSettings.Serialization.cs index 709fc47c19da..0ca39dafa15a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlConnectivityUpdateSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlConnectivityUpdateSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlConnectivityUpdateSettings : IUtf8JsonSerializable, IJsonModel + /// Set the access level and network port settings for SQL Server. + public partial class SqlConnectivityUpdateSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlConnectivityUpdateSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ConnectivityType)) { writer.WritePropertyName("connectivityType"u8); @@ -54,15 +54,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("sqlAuthUpdatePassword"u8); writer.WriteStringValue(SqlAuthUpdatePassword); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -71,22 +71,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlConnectivityUpdateSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlConnectivityUpdateSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlConnectivityUpdateSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlConnectivityUpdateSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlConnectivityUpdateSettings(document.RootElement, options); } - internal static SqlConnectivityUpdateSettings DeserializeSqlConnectivityUpdateSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlConnectivityUpdateSettings DeserializeSqlConnectivityUpdateSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -95,51 +100,52 @@ internal static SqlConnectivityUpdateSettings DeserializeSqlConnectivityUpdateSe int? port = default; string sqlAuthUpdateUserName = default; string sqlAuthUpdatePassword = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("connectivityType"u8)) + if (prop.NameEquals("connectivityType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - connectivityType = new SqlServerConnectivityType(property.Value.GetString()); + connectivityType = new SqlServerConnectivityType(prop.Value.GetString()); continue; } - if (property.NameEquals("port"u8)) + if (prop.NameEquals("port"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - port = property.Value.GetInt32(); + port = prop.Value.GetInt32(); continue; } - if (property.NameEquals("sqlAuthUpdateUserName"u8)) + if (prop.NameEquals("sqlAuthUpdateUserName"u8)) { - sqlAuthUpdateUserName = property.Value.GetString(); + sqlAuthUpdateUserName = prop.Value.GetString(); continue; } - if (property.NameEquals("sqlAuthUpdatePassword"u8)) + if (prop.NameEquals("sqlAuthUpdatePassword"u8)) { - sqlAuthUpdatePassword = property.Value.GetString(); + sqlAuthUpdatePassword = prop.Value.GetString(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new SqlConnectivityUpdateSettings(connectivityType, port, sqlAuthUpdateUserName, sqlAuthUpdatePassword, serializedAdditionalRawData); + return new SqlConnectivityUpdateSettings(connectivityType, port, sqlAuthUpdateUserName, sqlAuthUpdatePassword, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -149,15 +155,20 @@ BinaryData IPersistableModel.Write(ModelReaderWri } } - SqlConnectivityUpdateSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlConnectivityUpdateSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlConnectivityUpdateSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlConnectivityUpdateSettings(document.RootElement, options); } default: @@ -165,6 +176,7 @@ SqlConnectivityUpdateSettings IPersistableModel.C } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlConnectivityUpdateSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlConnectivityUpdateSettings.cs index df494098ebca..7f02561bd315 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlConnectivityUpdateSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlConnectivityUpdateSettings.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Set the access level and network port settings for SQL Server. public partial class SqlConnectivityUpdateSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlConnectivityUpdateSettings() @@ -55,22 +26,25 @@ public SqlConnectivityUpdateSettings() /// SQL Server port. /// SQL Server sysadmin login to create. /// SQL Server sysadmin login password. - /// Keeps track of any properties unknown to the library. - internal SqlConnectivityUpdateSettings(SqlServerConnectivityType? connectivityType, int? port, string sqlAuthUpdateUserName, string sqlAuthUpdatePassword, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal SqlConnectivityUpdateSettings(SqlServerConnectivityType? connectivityType, int? port, string sqlAuthUpdateUserName, string sqlAuthUpdatePassword, IDictionary additionalBinaryDataProperties) { ConnectivityType = connectivityType; Port = port; SqlAuthUpdateUserName = sqlAuthUpdateUserName; SqlAuthUpdatePassword = sqlAuthUpdatePassword; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// SQL Server connectivity option. public SqlServerConnectivityType? ConnectivityType { get; set; } + /// SQL Server port. public int? Port { get; set; } + /// SQL Server sysadmin login to create. public string SqlAuthUpdateUserName { get; set; } + /// SQL Server sysadmin login password. public string SqlAuthUpdatePassword { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlImageSku.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlImageSku.cs index 197bb2de4bc1..37e860b1a86a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlImageSku.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlImageSku.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,47 +15,67 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlImageSku : IEquatable { private readonly string _value; + private const string DeveloperValue = "Developer"; + private const string ExpressValue = "Express"; + private const string StandardValue = "Standard"; + private const string EnterpriseValue = "Enterprise"; + private const string WebValue = "Web"; /// Initializes a new instance of . + /// The value. /// is null. public SqlImageSku(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string DeveloperValue = "Developer"; - private const string ExpressValue = "Express"; - private const string StandardValue = "Standard"; - private const string EnterpriseValue = "Enterprise"; - private const string WebValue = "Web"; + _value = value; + } - /// Developer. + /// Gets the Developer. public static SqlImageSku Developer { get; } = new SqlImageSku(DeveloperValue); - /// Express. + + /// Gets the Express. public static SqlImageSku Express { get; } = new SqlImageSku(ExpressValue); - /// Standard. + + /// Gets the Standard. public static SqlImageSku Standard { get; } = new SqlImageSku(StandardValue); - /// Enterprise. + + /// Gets the Enterprise. public static SqlImageSku Enterprise { get; } = new SqlImageSku(EnterpriseValue); - /// Web. + + /// Gets the Web. public static SqlImageSku Web { get; } = new SqlImageSku(WebValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlImageSku left, SqlImageSku right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlImageSku left, SqlImageSku right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlImageSku(string value) => new SqlImageSku(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlImageSku?(string value) => value == null ? null : new SqlImageSku(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlImageSku other && Equals(other); - /// + + /// public bool Equals(SqlImageSku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.Serialization.cs index 0f2253f0d22f..5215156b2c08 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlInstanceSettings : IUtf8JsonSerializable, IJsonModel + /// Set the server/instance-level settings for SQL Server. + public partial class SqlInstanceSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWri /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlInstanceSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Collation)) { writer.WritePropertyName("collation"u8); @@ -69,15 +69,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("isIfiEnabled"u8); writer.WriteBooleanValue(IsIfiEnabled.Value); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -86,22 +86,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlInstanceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlInstanceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlInstanceSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlInstanceSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlInstanceSettings(document.RootElement, options); } - internal static SqlInstanceSettings DeserializeSqlInstanceSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlInstanceSettings DeserializeSqlInstanceSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -109,94 +114,95 @@ internal static SqlInstanceSettings DeserializeSqlInstanceSettings(JsonElement e string collation = default; int? maxDop = default; bool? isOptimizeForAdHocWorkloadsEnabled = default; - int? minServerMemoryMB = default; - int? maxServerMemoryMB = default; + int? minServerMemoryInMB = default; + int? maxServerMemoryInMB = default; bool? isLpimEnabled = default; bool? isIfiEnabled = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("collation"u8)) + if (prop.NameEquals("collation"u8)) { - collation = property.Value.GetString(); + collation = prop.Value.GetString(); continue; } - if (property.NameEquals("maxDop"u8)) + if (prop.NameEquals("maxDop"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - maxDop = property.Value.GetInt32(); + maxDop = prop.Value.GetInt32(); continue; } - if (property.NameEquals("isOptimizeForAdHocWorkloadsEnabled"u8)) + if (prop.NameEquals("isOptimizeForAdHocWorkloadsEnabled"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - isOptimizeForAdHocWorkloadsEnabled = property.Value.GetBoolean(); + isOptimizeForAdHocWorkloadsEnabled = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("minServerMemoryMB"u8)) + if (prop.NameEquals("minServerMemoryMB"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - minServerMemoryMB = property.Value.GetInt32(); + minServerMemoryInMB = prop.Value.GetInt32(); continue; } - if (property.NameEquals("maxServerMemoryMB"u8)) + if (prop.NameEquals("maxServerMemoryMB"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - maxServerMemoryMB = property.Value.GetInt32(); + maxServerMemoryInMB = prop.Value.GetInt32(); continue; } - if (property.NameEquals("isLpimEnabled"u8)) + if (prop.NameEquals("isLpimEnabled"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - isLpimEnabled = property.Value.GetBoolean(); + isLpimEnabled = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("isIfiEnabled"u8)) + if (prop.NameEquals("isIfiEnabled"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - isIfiEnabled = property.Value.GetBoolean(); + isIfiEnabled = prop.Value.GetBoolean(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new SqlInstanceSettings( collation, maxDop, isOptimizeForAdHocWorkloadsEnabled, - minServerMemoryMB, - maxServerMemoryMB, + minServerMemoryInMB, + maxServerMemoryInMB, isLpimEnabled, isIfiEnabled, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -206,15 +212,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - SqlInstanceSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlInstanceSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlInstanceSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlInstanceSettings(document.RootElement, options); } default: @@ -222,6 +233,7 @@ SqlInstanceSettings IPersistableModel.Create(BinaryData dat } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.cs index d41863727159..bc2b789f4928 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Set the server/instance-level settings for SQL Server. public partial class SqlInstanceSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlInstanceSettings() @@ -58,8 +29,8 @@ public SqlInstanceSettings() /// SQL Server maximum memory. /// SQL Server LPIM. /// SQL Server IFI. - /// Keeps track of any properties unknown to the library. - internal SqlInstanceSettings(string collation, int? maxDop, bool? isOptimizeForAdHocWorkloadsEnabled, int? minServerMemoryInMB, int? maxServerMemoryInMB, bool? isLpimEnabled, bool? isIfiEnabled, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal SqlInstanceSettings(string collation, int? maxDop, bool? isOptimizeForAdHocWorkloadsEnabled, int? minServerMemoryInMB, int? maxServerMemoryInMB, bool? isLpimEnabled, bool? isIfiEnabled, IDictionary additionalBinaryDataProperties) { Collation = collation; MaxDop = maxDop; @@ -68,21 +39,27 @@ internal SqlInstanceSettings(string collation, int? maxDop, bool? isOptimizeForA MaxServerMemoryInMB = maxServerMemoryInMB; IsLpimEnabled = isLpimEnabled; IsIfiEnabled = isIfiEnabled; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// SQL Server Collation. public string Collation { get; set; } + /// SQL Server MAXDOP. public int? MaxDop { get; set; } + /// SQL Server Optimize for Adhoc workloads. public bool? IsOptimizeForAdHocWorkloadsEnabled { get; set; } + /// SQL Server minimum memory. public int? MinServerMemoryInMB { get; set; } + /// SQL Server maximum memory. public int? MaxServerMemoryInMB { get; set; } + /// SQL Server LPIM. public bool? IsLpimEnabled { get; set; } + /// SQL Server IFI. public bool? IsIfiEnabled { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlManagementMode.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlManagementMode.cs index 0e0befa7f556..3f312e15710a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlManagementMode.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlManagementMode.cs @@ -7,48 +7,67 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// SQL Server Management type. + /// SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it. public readonly partial struct SqlManagementMode : IEquatable { private readonly string _value; + private const string FullValue = "Full"; + private const string LightWeightValue = "LightWeight"; + private const string NoAgentValue = "NoAgent"; /// Initializes a new instance of . + /// The value. /// is null. public SqlManagementMode(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string FullValue = "Full"; - private const string LightWeightValue = "LightWeight"; - private const string NoAgentValue = "NoAgent"; + _value = value; + } - /// Full. + /// Gets the Full. public static SqlManagementMode Full { get; } = new SqlManagementMode(FullValue); - /// LightWeight. + + /// Gets the LightWeight. public static SqlManagementMode LightWeight { get; } = new SqlManagementMode(LightWeightValue); - /// NoAgent. + + /// Gets the NoAgent. public static SqlManagementMode NoAgent { get; } = new SqlManagementMode(NoAgentValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlManagementMode left, SqlManagementMode right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlManagementMode left, SqlManagementMode right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlManagementMode(string value) => new SqlManagementMode(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlManagementMode?(string value) => value == null ? null : new SqlManagementMode(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlManagementMode other && Equals(other); - /// + + /// public bool Equals(SqlManagementMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.Serialization.cs index 32ba7ff9cae4..be52094f25de 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlServerConfigurationsManagementSettings : IUtf8JsonSerializable, IJsonModel + /// Set the connectivity, storage and workload settings. + public partial class SqlServerConfigurationsManagementSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlServerConfigurationsManagementSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(SqlConnectivityUpdateSettings)) { writer.WritePropertyName("sqlConnectivityUpdateSettings"u8); @@ -59,15 +59,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("sqlInstanceSettings"u8); writer.WriteObjectValue(SqlInstanceSettings, options); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (Optional.IsDefined(AzureAdAuthenticationSettings)) { - foreach (var item in _serializedAdditionalRawData) + writer.WritePropertyName("azureAdAuthenticationSettings"u8); + writer.WriteObjectValue(AzureAdAuthenticationSettings, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -76,22 +81,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlServerConfigurationsManagementSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlServerConfigurationsManagementSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlServerConfigurationsManagementSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlServerConfigurationsManagementSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlServerConfigurationsManagementSettings(document.RootElement, options); } - internal static SqlServerConfigurationsManagementSettings DeserializeSqlServerConfigurationsManagementSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlServerConfigurationsManagementSettings DeserializeSqlServerConfigurationsManagementSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -101,74 +111,86 @@ internal static SqlServerConfigurationsManagementSettings DeserializeSqlServerCo SqlStorageUpdateSettings sqlStorageUpdateSettings = default; AdditionalFeaturesServerConfigurations additionalFeaturesServerConfigurations = default; SqlInstanceSettings sqlInstanceSettings = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + AADAuthenticationSettings azureAdAuthenticationSettings = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("sqlConnectivityUpdateSettings"u8)) + if (prop.NameEquals("sqlConnectivityUpdateSettings"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlConnectivityUpdateSettings = SqlConnectivityUpdateSettings.DeserializeSqlConnectivityUpdateSettings(property.Value, options); + sqlConnectivityUpdateSettings = SqlConnectivityUpdateSettings.DeserializeSqlConnectivityUpdateSettings(prop.Value, options); continue; } - if (property.NameEquals("sqlWorkloadTypeUpdateSettings"u8)) + if (prop.NameEquals("sqlWorkloadTypeUpdateSettings"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlWorkloadTypeUpdateSettings = SqlWorkloadTypeUpdateSettings.DeserializeSqlWorkloadTypeUpdateSettings(property.Value, options); + sqlWorkloadTypeUpdateSettings = SqlWorkloadTypeUpdateSettings.DeserializeSqlWorkloadTypeUpdateSettings(prop.Value, options); continue; } - if (property.NameEquals("sqlStorageUpdateSettings"u8)) + if (prop.NameEquals("sqlStorageUpdateSettings"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlStorageUpdateSettings = SqlStorageUpdateSettings.DeserializeSqlStorageUpdateSettings(property.Value, options); + sqlStorageUpdateSettings = SqlStorageUpdateSettings.DeserializeSqlStorageUpdateSettings(prop.Value, options); continue; } - if (property.NameEquals("additionalFeaturesServerConfigurations"u8)) + if (prop.NameEquals("additionalFeaturesServerConfigurations"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - additionalFeaturesServerConfigurations = AdditionalFeaturesServerConfigurations.DeserializeAdditionalFeaturesServerConfigurations(property.Value, options); + additionalFeaturesServerConfigurations = AdditionalFeaturesServerConfigurations.DeserializeAdditionalFeaturesServerConfigurations(prop.Value, options); continue; } - if (property.NameEquals("sqlInstanceSettings"u8)) + if (prop.NameEquals("sqlInstanceSettings"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlInstanceSettings = SqlInstanceSettings.DeserializeSqlInstanceSettings(property.Value, options); + sqlInstanceSettings = SqlInstanceSettings.DeserializeSqlInstanceSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("azureAdAuthenticationSettings"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureAdAuthenticationSettings = AADAuthenticationSettings.DeserializeAADAuthenticationSettings(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new SqlServerConfigurationsManagementSettings( sqlConnectivityUpdateSettings, sqlWorkloadTypeUpdateSettings, sqlStorageUpdateSettings, additionalFeaturesServerConfigurations, sqlInstanceSettings, - serializedAdditionalRawData); + azureAdAuthenticationSettings, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -178,15 +200,20 @@ BinaryData IPersistableModel.Write(Mo } } - SqlServerConfigurationsManagementSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlServerConfigurationsManagementSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlServerConfigurationsManagementSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlServerConfigurationsManagementSettings(document.RootElement, options); } default: @@ -194,6 +221,7 @@ SqlServerConfigurationsManagementSettings IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.cs index 280c5c5395d0..5f49ffeae065 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Set the connectivity, storage and workload settings. public partial class SqlServerConfigurationsManagementSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlServerConfigurationsManagementSettings() @@ -56,50 +27,86 @@ public SqlServerConfigurationsManagementSettings() /// SQL storage update settings. /// Additional SQL feature settings. /// SQL Instance settings. - /// Keeps track of any properties unknown to the library. - internal SqlServerConfigurationsManagementSettings(SqlConnectivityUpdateSettings sqlConnectivityUpdateSettings, SqlWorkloadTypeUpdateSettings sqlWorkloadTypeUpdateSettings, SqlStorageUpdateSettings sqlStorageUpdateSettings, AdditionalFeaturesServerConfigurations additionalFeaturesServerConfigurations, SqlInstanceSettings sqlInstanceSettings, IDictionary serializedAdditionalRawData) + /// Azure AD authentication Settings. + /// Keeps track of any properties unknown to the library. + internal SqlServerConfigurationsManagementSettings(SqlConnectivityUpdateSettings sqlConnectivityUpdateSettings, SqlWorkloadTypeUpdateSettings sqlWorkloadTypeUpdateSettings, SqlStorageUpdateSettings sqlStorageUpdateSettings, AdditionalFeaturesServerConfigurations additionalFeaturesServerConfigurations, SqlInstanceSettings sqlInstanceSettings, AADAuthenticationSettings azureAdAuthenticationSettings, IDictionary additionalBinaryDataProperties) { SqlConnectivityUpdateSettings = sqlConnectivityUpdateSettings; SqlWorkloadTypeUpdateSettings = sqlWorkloadTypeUpdateSettings; SqlStorageUpdateSettings = sqlStorageUpdateSettings; AdditionalFeaturesServerConfigurations = additionalFeaturesServerConfigurations; SqlInstanceSettings = sqlInstanceSettings; - _serializedAdditionalRawData = serializedAdditionalRawData; + AzureAdAuthenticationSettings = azureAdAuthenticationSettings; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// SQL connectivity type settings. public SqlConnectivityUpdateSettings SqlConnectivityUpdateSettings { get; set; } + /// SQL workload type settings. internal SqlWorkloadTypeUpdateSettings SqlWorkloadTypeUpdateSettings { get; set; } + + /// SQL storage update settings. + public SqlStorageUpdateSettings SqlStorageUpdateSettings { get; set; } + + /// Additional SQL feature settings. + internal AdditionalFeaturesServerConfigurations AdditionalFeaturesServerConfigurations { get; set; } + + /// SQL Instance settings. + public SqlInstanceSettings SqlInstanceSettings { get; set; } + + /// Azure AD authentication Settings. + internal AADAuthenticationSettings AzureAdAuthenticationSettings { get; set; } + /// SQL Server workload type. public SqlWorkloadType? SqlWorkloadType { - get => SqlWorkloadTypeUpdateSettings is null ? default : SqlWorkloadTypeUpdateSettings.SqlWorkloadType; + get + { + return SqlWorkloadTypeUpdateSettings is null ? default : SqlWorkloadTypeUpdateSettings.SqlWorkloadType; + } set { if (SqlWorkloadTypeUpdateSettings is null) + { SqlWorkloadTypeUpdateSettings = new SqlWorkloadTypeUpdateSettings(); + } SqlWorkloadTypeUpdateSettings.SqlWorkloadType = value; } } - /// SQL storage update settings. - public SqlStorageUpdateSettings SqlStorageUpdateSettings { get; set; } - /// Additional SQL feature settings. - internal AdditionalFeaturesServerConfigurations AdditionalFeaturesServerConfigurations { get; set; } /// Enable or disable R services (SQL 2016 onwards). public bool? IsRServicesEnabled { - get => AdditionalFeaturesServerConfigurations is null ? default : AdditionalFeaturesServerConfigurations.IsRServicesEnabled; + get + { + return AdditionalFeaturesServerConfigurations is null ? default : AdditionalFeaturesServerConfigurations.IsRServicesEnabled; + } set { if (AdditionalFeaturesServerConfigurations is null) + { AdditionalFeaturesServerConfigurations = new AdditionalFeaturesServerConfigurations(); + } AdditionalFeaturesServerConfigurations.IsRServicesEnabled = value; } } - /// SQL Instance settings. - public SqlInstanceSettings SqlInstanceSettings { get; set; } + /// The client Id of the Managed Identity to query Microsoft Graph API. An empty string must be used for the system assigned Managed Identity. + public string AzureAdAuthenticationClientId + { + get + { + return AzureAdAuthenticationSettings is null ? default : AzureAdAuthenticationSettings.ClientId; + } + set + { + if (AzureAdAuthenticationSettings is null) + { + AzureAdAuthenticationSettings = new AADAuthenticationSettings(); + } + AzureAdAuthenticationSettings.ClientId = value; + } + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConnectivityType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConnectivityType.cs index bbd0e139bd73..78f1a1efeef4 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConnectivityType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConnectivityType.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,41 +15,59 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlServerConnectivityType : IEquatable { private readonly string _value; + private const string LocalValue = "LOCAL"; + private const string PrivateValue = "PRIVATE"; + private const string PublicValue = "PUBLIC"; /// Initializes a new instance of . + /// The value. /// is null. public SqlServerConnectivityType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string LocalValue = "LOCAL"; - private const string PrivateValue = "PRIVATE"; - private const string PublicValue = "PUBLIC"; + _value = value; + } - /// LOCAL. + /// Gets the Local. public static SqlServerConnectivityType Local { get; } = new SqlServerConnectivityType(LocalValue); - /// PRIVATE. + + /// Gets the Private. public static SqlServerConnectivityType Private { get; } = new SqlServerConnectivityType(PrivateValue); - /// PUBLIC. + + /// Gets the Public. public static SqlServerConnectivityType Public { get; } = new SqlServerConnectivityType(PublicValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlServerConnectivityType left, SqlServerConnectivityType right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlServerConnectivityType left, SqlServerConnectivityType right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlServerConnectivityType(string value) => new SqlServerConnectivityType(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlServerConnectivityType?(string value) => value == null ? null : new SqlServerConnectivityType(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlServerConnectivityType other && Equals(other); - /// + + /// public bool Equals(SqlServerConnectivityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerLicenseType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerLicenseType.cs index 48ecf13ae3d3..c9386a40ca97 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerLicenseType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerLicenseType.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,41 +15,59 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlServerLicenseType : IEquatable { private readonly string _value; + private const string PaygValue = "PAYG"; + private const string AhubValue = "AHUB"; + private const string DRValue = "DR"; /// Initializes a new instance of . + /// The value. /// is null. public SqlServerLicenseType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string PaygValue = "PAYG"; - private const string AhubValue = "AHUB"; - private const string DRValue = "DR"; + _value = value; + } - /// PAYG. + /// Gets the Payg. public static SqlServerLicenseType Payg { get; } = new SqlServerLicenseType(PaygValue); - /// AHUB. + + /// Gets the Ahub. public static SqlServerLicenseType Ahub { get; } = new SqlServerLicenseType(AhubValue); - /// DR. + + /// Gets the DR. public static SqlServerLicenseType DR { get; } = new SqlServerLicenseType(DRValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlServerLicenseType left, SqlServerLicenseType right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlServerLicenseType left, SqlServerLicenseType right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlServerLicenseType(string value) => new SqlServerLicenseType(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlServerLicenseType?(string value) => value == null ? null : new SqlServerLicenseType(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlServerLicenseType other && Equals(other); - /// + + /// public bool Equals(SqlServerLicenseType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.Serialization.cs index 3c977a790fb3..3173c0de82f7 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlStorageSettings : IUtf8JsonSerializable, IJsonModel + /// Set disk storage settings for SQL Server. + public partial class SqlStorageSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,17 +29,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrit /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlStorageSettings)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Luns)) { writer.WritePropertyName("luns"u8); writer.WriteStartArray(); - foreach (var item in Luns) + foreach (int item in Luns) { writer.WriteNumberValue(item); } @@ -49,15 +49,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("defaultFilePath"u8); writer.WriteStringValue(DefaultFilePath); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (Optional.IsDefined(UseStoragePool)) { - foreach (var item in _serializedAdditionalRawData) + writer.WritePropertyName("useStoragePool"u8); + writer.WriteBooleanValue(UseStoragePool.Value); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -66,64 +71,80 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlStorageSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlStorageSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlStorageSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlStorageSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlStorageSettings(document.RootElement, options); } - internal static SqlStorageSettings DeserializeSqlStorageSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlStorageSettings DeserializeSqlStorageSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IList luns = default; string defaultFilePath = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + bool? useStoragePool = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("luns"u8)) + if (prop.NameEquals("luns"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(item.GetInt32()); } luns = array; continue; } - if (property.NameEquals("defaultFilePath"u8)) + if (prop.NameEquals("defaultFilePath"u8)) { - defaultFilePath = property.Value.GetString(); + defaultFilePath = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("useStoragePool"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useStoragePool = prop.Value.GetBoolean(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new SqlStorageSettings(luns ?? new ChangeTrackingList(), defaultFilePath, serializedAdditionalRawData); + return new SqlStorageSettings(luns ?? new ChangeTrackingList(), defaultFilePath, useStoragePool, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -133,15 +154,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions } } - SqlStorageSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlStorageSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlStorageSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlStorageSettings(document.RootElement, options); } default: @@ -149,6 +175,7 @@ SqlStorageSettings IPersistableModel.Create(BinaryData data, } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.cs index 5be7ee361ce0..7f6c930e5bdd 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.cs @@ -7,43 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Set disk storage settings for SQL Server. public partial class SqlStorageSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlStorageSettings() @@ -54,17 +26,23 @@ public SqlStorageSettings() /// Initializes a new instance of . /// Logical Unit Numbers for the disks. /// SQL Server default file path. - /// Keeps track of any properties unknown to the library. - internal SqlStorageSettings(IList luns, string defaultFilePath, IDictionary serializedAdditionalRawData) + /// Use storage pool to build a drive if true or not provided. + /// Keeps track of any properties unknown to the library. + internal SqlStorageSettings(IList luns, string defaultFilePath, bool? useStoragePool, IDictionary additionalBinaryDataProperties) { Luns = luns; DefaultFilePath = defaultFilePath; - _serializedAdditionalRawData = serializedAdditionalRawData; + UseStoragePool = useStoragePool; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Logical Unit Numbers for the disks. public IList Luns { get; } + /// SQL Server default file path. public string DefaultFilePath { get; set; } + + /// Use storage pool to build a drive if true or not provided. + public bool? UseStoragePool { get; set; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageUpdateSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageUpdateSettings.Serialization.cs index 6c5358a8f88c..81734d1aebe4 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageUpdateSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageUpdateSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlStorageUpdateSettings : IUtf8JsonSerializable, IJsonModel + /// Set disk storage settings for SQL Server. + public partial class SqlStorageUpdateSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlStorageUpdateSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(DiskCount)) { writer.WritePropertyName("diskCount"u8); @@ -49,15 +49,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("diskConfigurationType"u8); writer.WriteStringValue(DiskConfigurationType.Value.ToString()); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -66,22 +66,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlStorageUpdateSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlStorageUpdateSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlStorageUpdateSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlStorageUpdateSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlStorageUpdateSettings(document.RootElement, options); } - internal static SqlStorageUpdateSettings DeserializeSqlStorageUpdateSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlStorageUpdateSettings DeserializeSqlStorageUpdateSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -89,50 +94,51 @@ internal static SqlStorageUpdateSettings DeserializeSqlStorageUpdateSettings(Jso int? diskCount = default; int? startingDeviceId = default; SqlVmDiskConfigurationType? diskConfigurationType = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("diskCount"u8)) + if (prop.NameEquals("diskCount"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - diskCount = property.Value.GetInt32(); + diskCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("startingDeviceId"u8)) + if (prop.NameEquals("startingDeviceId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - startingDeviceId = property.Value.GetInt32(); + startingDeviceId = prop.Value.GetInt32(); continue; } - if (property.NameEquals("diskConfigurationType"u8)) + if (prop.NameEquals("diskConfigurationType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - diskConfigurationType = new SqlVmDiskConfigurationType(property.Value.GetString()); + diskConfigurationType = new SqlVmDiskConfigurationType(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new SqlStorageUpdateSettings(diskCount, startingDeviceId, diskConfigurationType, serializedAdditionalRawData); + return new SqlStorageUpdateSettings(diskCount, startingDeviceId, diskConfigurationType, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -142,15 +148,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp } } - SqlStorageUpdateSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlStorageUpdateSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlStorageUpdateSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlStorageUpdateSettings(document.RootElement, options); } default: @@ -158,6 +169,7 @@ SqlStorageUpdateSettings IPersistableModel.Create(Bina } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageUpdateSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageUpdateSettings.cs index 1b628d0a09b8..a04a1ad5cf00 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageUpdateSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageUpdateSettings.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Set disk storage settings for SQL Server. public partial class SqlStorageUpdateSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlStorageUpdateSettings() @@ -54,19 +25,21 @@ public SqlStorageUpdateSettings() /// Virtual machine disk count. /// Device id of the first disk to be updated. /// Disk configuration to apply to SQL Server. - /// Keeps track of any properties unknown to the library. - internal SqlStorageUpdateSettings(int? diskCount, int? startingDeviceId, SqlVmDiskConfigurationType? diskConfigurationType, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal SqlStorageUpdateSettings(int? diskCount, int? startingDeviceId, SqlVmDiskConfigurationType? diskConfigurationType, IDictionary additionalBinaryDataProperties) { DiskCount = diskCount; StartingDeviceId = startingDeviceId; DiskConfigurationType = diskConfigurationType; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Virtual machine disk count. public int? DiskCount { get; set; } + /// Device id of the first disk to be updated. public int? StartingDeviceId { get; set; } + /// Disk configuration to apply to SQL Server. public SqlVmDiskConfigurationType? DiskConfigurationType { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.Serialization.cs index e3b17b5eeaa5..5fce35cec50e 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlTempDBSettings : IUtf8JsonSerializable, IJsonModel + /// Set tempDb storage settings for SQL Server. + public partial class SqlTempDBSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlTempDBSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(DataFileSize)) { writer.WritePropertyName("dataFileSize"u8); @@ -73,7 +73,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("luns"u8); writer.WriteStartArray(); - foreach (var item in LogicalUnitNumbers) + foreach (int item in LogicalUnitNumbers) { writer.WriteNumberValue(item); } @@ -84,15 +84,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("defaultFilePath"u8); writer.WriteStringValue(DefaultFilePath); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (Optional.IsDefined(UseStoragePool)) { - foreach (var item in _serializedAdditionalRawData) + writer.WritePropertyName("useStoragePool"u8); + writer.WriteBooleanValue(UseStoragePool.Value); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -101,22 +106,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlTempDBSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlTempDBSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlTempDBSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlTempDBSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlTempDBSettings(document.RootElement, options); } - internal static SqlTempDBSettings DeserializeSqlTempDBSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlTempDBSettings DeserializeSqlTempDBSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -128,96 +138,104 @@ internal static SqlTempDBSettings DeserializeSqlTempDBSettings(JsonElement eleme int? dataFileCount = default; bool? persistFolder = default; string persistFolderPath = default; - IList luns = default; + IList logicalUnitNumbers = default; string defaultFilePath = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + bool? useStoragePool = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("dataFileSize"u8)) + if (prop.NameEquals("dataFileSize"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - dataFileSize = property.Value.GetInt32(); + dataFileSize = prop.Value.GetInt32(); continue; } - if (property.NameEquals("dataGrowth"u8)) + if (prop.NameEquals("dataGrowth"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - dataGrowth = property.Value.GetInt32(); + dataGrowth = prop.Value.GetInt32(); continue; } - if (property.NameEquals("logFileSize"u8)) + if (prop.NameEquals("logFileSize"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - logFileSize = property.Value.GetInt32(); + logFileSize = prop.Value.GetInt32(); continue; } - if (property.NameEquals("logGrowth"u8)) + if (prop.NameEquals("logGrowth"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - logGrowth = property.Value.GetInt32(); + logGrowth = prop.Value.GetInt32(); continue; } - if (property.NameEquals("dataFileCount"u8)) + if (prop.NameEquals("dataFileCount"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - dataFileCount = property.Value.GetInt32(); + dataFileCount = prop.Value.GetInt32(); continue; } - if (property.NameEquals("persistFolder"u8)) + if (prop.NameEquals("persistFolder"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - persistFolder = property.Value.GetBoolean(); + persistFolder = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("persistFolderPath"u8)) + if (prop.NameEquals("persistFolderPath"u8)) { - persistFolderPath = property.Value.GetString(); + persistFolderPath = prop.Value.GetString(); continue; } - if (property.NameEquals("luns"u8)) + if (prop.NameEquals("luns"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(item.GetInt32()); } - luns = array; + logicalUnitNumbers = array; continue; } - if (property.NameEquals("defaultFilePath"u8)) + if (prop.NameEquals("defaultFilePath"u8)) { - defaultFilePath = property.Value.GetString(); + defaultFilePath = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("useStoragePool"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useStoragePool = prop.Value.GetBoolean(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new SqlTempDBSettings( dataFileSize, dataGrowth, @@ -226,15 +244,19 @@ internal static SqlTempDBSettings DeserializeSqlTempDBSettings(JsonElement eleme dataFileCount, persistFolder, persistFolderPath, - luns ?? new ChangeTrackingList(), + logicalUnitNumbers ?? new ChangeTrackingList(), defaultFilePath, - serializedAdditionalRawData); + useStoragePool, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -244,15 +266,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions o } } - SqlTempDBSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlTempDBSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlTempDBSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlTempDBSettings(document.RootElement, options); } default: @@ -260,6 +287,7 @@ SqlTempDBSettings IPersistableModel.Create(BinaryData data, M } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.cs index 3c52b53db33a..7e39a4b5d0eb 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.cs @@ -7,43 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// The SqlTempDBSettings. + /// Set tempDb storage settings for SQL Server. public partial class SqlTempDBSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlTempDBSettings() @@ -61,8 +33,9 @@ public SqlTempDBSettings() /// SQL Server tempdb persist folder location. /// Logical Unit Numbers for the disks. /// SQL Server default file path. - /// Keeps track of any properties unknown to the library. - internal SqlTempDBSettings(int? dataFileSize, int? dataGrowth, int? logFileSize, int? logGrowth, int? dataFileCount, bool? persistFolder, string persistFolderPath, IList logicalUnitNumbers, string defaultFilePath, IDictionary serializedAdditionalRawData) + /// Use storage pool to build a drive if true or not provided. + /// Keeps track of any properties unknown to the library. + internal SqlTempDBSettings(int? dataFileSize, int? dataGrowth, int? logFileSize, int? logGrowth, int? dataFileCount, bool? persistFolder, string persistFolderPath, IList logicalUnitNumbers, string defaultFilePath, bool? useStoragePool, IDictionary additionalBinaryDataProperties) { DataFileSize = dataFileSize; DataGrowth = dataGrowth; @@ -73,26 +46,38 @@ internal SqlTempDBSettings(int? dataFileSize, int? dataGrowth, int? logFileSize, PersistFolderPath = persistFolderPath; LogicalUnitNumbers = logicalUnitNumbers; DefaultFilePath = defaultFilePath; - _serializedAdditionalRawData = serializedAdditionalRawData; + UseStoragePool = useStoragePool; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// SQL Server tempdb data file size. public int? DataFileSize { get; set; } + /// SQL Server tempdb data file autoGrowth size. public int? DataGrowth { get; set; } + /// SQL Server tempdb log file size. public int? LogFileSize { get; set; } + /// SQL Server tempdb log file autoGrowth size. public int? LogGrowth { get; set; } + /// SQL Server tempdb data file count. public int? DataFileCount { get; set; } + /// SQL Server tempdb persist folder choice. public bool? PersistFolder { get; set; } + /// SQL Server tempdb persist folder location. public string PersistFolderPath { get; set; } + /// Logical Unit Numbers for the disks. public IList LogicalUnitNumbers { get; } + /// SQL Server default file path. public string DefaultFilePath { get; set; } + + /// Use storage pool to build a drive if true or not provided. + public bool? UseStoragePool { get; set; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupListResult.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupListResult.Serialization.cs new file mode 100644 index 000000000000..1d083b812ec1 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupListResult.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The response of a SqlVirtualMachineGroup list operation. + internal partial class SqlVirtualMachineGroupListResult : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupListResult)} does not support writing '{format}' format."); + } + if (options.Format != "W") + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (SqlVmGroupData item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + SqlVirtualMachineGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVirtualMachineGroupListResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupListResult)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlVirtualMachineGroupListResult(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVirtualMachineGroupListResult DeserializeSqlVirtualMachineGroupListResult(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(SqlVmGroupData.DeserializeSqlVmGroupData(item, options)); + } + value = array; + continue; + } + if (prop.NameEquals("nextLink"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = string.IsNullOrEmpty(prop.Value.GetString()) ? null : new Uri(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SqlVirtualMachineGroupListResult(value, nextLink, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupListResult)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + SqlVirtualMachineGroupListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVirtualMachineGroupListResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeSqlVirtualMachineGroupListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupListResult)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static SqlVirtualMachineGroupListResult FromResponse(Response response) + { + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSqlVirtualMachineGroupListResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupListResult.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupListResult.cs new file mode 100644 index 000000000000..9d485596b7e4 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupListResult.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The response of a SqlVirtualMachineGroup list operation. + internal partial class SqlVirtualMachineGroupListResult + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal SqlVirtualMachineGroupListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The SqlVirtualMachineGroup items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SqlVirtualMachineGroupListResult(IReadOnlyList value, Uri nextLink, IDictionary additionalBinaryDataProperties) + { + Value = value; + NextLink = nextLink; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The SqlVirtualMachineGroup items on this page. + public IReadOnlyList Value { get; } + + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupProperties.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupProperties.Serialization.cs new file mode 100644 index 000000000000..b48618c1605f --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupProperties.Serialization.cs @@ -0,0 +1,235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The properties of a SQL virtual machine group. + internal partial class SqlVirtualMachineGroupProperties : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupProperties)} does not support writing '{format}' format."); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (Optional.IsDefined(SqlImageOffer)) + { + writer.WritePropertyName("sqlImageOffer"u8); + writer.WriteStringValue(SqlImageOffer); + } + if (Optional.IsDefined(SqlImageSku)) + { + writer.WritePropertyName("sqlImageSku"u8); + writer.WriteStringValue(SqlImageSku.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ScaleType)) + { + writer.WritePropertyName("scaleType"u8); + writer.WriteStringValue(ScaleType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ClusterManagerType)) + { + writer.WritePropertyName("clusterManagerType"u8); + writer.WriteStringValue(ClusterManagerType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ClusterConfiguration)) + { + writer.WritePropertyName("clusterConfiguration"u8); + writer.WriteStringValue(ClusterConfiguration.Value.ToString()); + } + if (Optional.IsDefined(WindowsServerFailoverClusterDomainProfile)) + { + writer.WritePropertyName("wsfcDomainProfile"u8); + writer.WriteObjectValue(WindowsServerFailoverClusterDomainProfile, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + SqlVirtualMachineGroupProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVirtualMachineGroupProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlVirtualMachineGroupProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVirtualMachineGroupProperties DeserializeSqlVirtualMachineGroupProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string provisioningState = default; + string sqlImageOffer = default; + SqlVmGroupImageSku? sqlImageSku = default; + SqlVmGroupScaleType? scaleType = default; + SqlVmClusterManagerType? clusterManagerType = default; + SqlVmClusterConfiguration? clusterConfiguration = default; + WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("provisioningState"u8)) + { + provisioningState = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("sqlImageOffer"u8)) + { + sqlImageOffer = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("sqlImageSku"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sqlImageSku = new SqlVmGroupImageSku(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("scaleType"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scaleType = new SqlVmGroupScaleType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("clusterManagerType"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterManagerType = new SqlVmClusterManagerType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("clusterConfiguration"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clusterConfiguration = new SqlVmClusterConfiguration(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("wsfcDomainProfile"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + windowsServerFailoverClusterDomainProfile = WindowsServerFailoverClusterDomainProfile.DeserializeWindowsServerFailoverClusterDomainProfile(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SqlVirtualMachineGroupProperties( + provisioningState, + sqlImageOffer, + sqlImageSku, + scaleType, + clusterManagerType, + clusterConfiguration, + windowsServerFailoverClusterDomainProfile, + additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + SqlVirtualMachineGroupProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVirtualMachineGroupProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeSqlVirtualMachineGroupProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupProperties.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupProperties.cs new file mode 100644 index 000000000000..6644afd79069 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupProperties.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The properties of a SQL virtual machine group. + internal partial class SqlVirtualMachineGroupProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public SqlVirtualMachineGroupProperties() + { + } + + /// Initializes a new instance of . + /// Provisioning state to track the async operation status. + /// SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016. + /// SQL image sku. + /// Scale type. + /// Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type. + /// Cluster type. + /// Cluster Active Directory domain profile. + /// Keeps track of any properties unknown to the library. + internal SqlVirtualMachineGroupProperties(string provisioningState, string sqlImageOffer, SqlVmGroupImageSku? sqlImageSku, SqlVmGroupScaleType? scaleType, SqlVmClusterManagerType? clusterManagerType, SqlVmClusterConfiguration? clusterConfiguration, WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile, IDictionary additionalBinaryDataProperties) + { + ProvisioningState = provisioningState; + SqlImageOffer = sqlImageOffer; + SqlImageSku = sqlImageSku; + ScaleType = scaleType; + ClusterManagerType = clusterManagerType; + ClusterConfiguration = clusterConfiguration; + WindowsServerFailoverClusterDomainProfile = windowsServerFailoverClusterDomainProfile; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Provisioning state to track the async operation status. + public string ProvisioningState { get; } + + /// SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016. + public string SqlImageOffer { get; set; } + + /// SQL image sku. + public SqlVmGroupImageSku? SqlImageSku { get; set; } + + /// Scale type. + public SqlVmGroupScaleType? ScaleType { get; } + + /// Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type. + public SqlVmClusterManagerType? ClusterManagerType { get; } + + /// Cluster type. + public SqlVmClusterConfiguration? ClusterConfiguration { get; } + + /// Cluster Active Directory domain profile. + public WindowsServerFailoverClusterDomainProfile WindowsServerFailoverClusterDomainProfile { get; set; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.Serialization.cs new file mode 100644 index 000000000000..f97488e8d255 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.Serialization.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The response of a SqlVirtualMachine list operation. + internal partial class SqlVirtualMachineListResult : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVirtualMachineListResult)} does not support writing '{format}' format."); + } + if (options.Format != "W") + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (SqlVmData item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + SqlVirtualMachineListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVirtualMachineListResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVirtualMachineListResult)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlVirtualMachineListResult(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVirtualMachineListResult DeserializeSqlVirtualMachineListResult(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(SqlVmData.DeserializeSqlVmData(item, options)); + } + value = array; + continue; + } + if (prop.NameEquals("nextLink"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = string.IsNullOrEmpty(prop.Value.GetString()) ? null : new Uri(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SqlVirtualMachineListResult(value, nextLink, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(SqlVirtualMachineListResult)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + SqlVirtualMachineListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVirtualMachineListResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeSqlVirtualMachineListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlVirtualMachineListResult)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + internal static SqlVirtualMachineListResult FromResponse(Response response) + { + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSqlVirtualMachineListResult(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.cs new file mode 100644 index 000000000000..4d0bcd0691bc --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The response of a SqlVirtualMachine list operation. + internal partial class SqlVirtualMachineListResult + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal SqlVirtualMachineListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The SqlVirtualMachine items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SqlVirtualMachineListResult(IReadOnlyList value, Uri nextLink, IDictionary additionalBinaryDataProperties) + { + Value = value; + NextLink = nextLink; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The SqlVirtualMachine items on this page. + public IReadOnlyList Value { get; } + + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs new file mode 100644 index 000000000000..bf325a75304e --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs @@ -0,0 +1,461 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Net; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The SQL virtual machine properties. + internal partial class SqlVirtualMachineProperties : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVirtualMachineProperties)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(VirtualMachineResourceId)) + { + writer.WritePropertyName("virtualMachineResourceId"u8); + writer.WriteStringValue(VirtualMachineResourceId); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (Optional.IsDefined(SqlImageOffer)) + { + writer.WritePropertyName("sqlImageOffer"u8); + writer.WriteStringValue(SqlImageOffer); + } + if (Optional.IsDefined(SqlServerLicenseType)) + { + writer.WritePropertyName("sqlServerLicenseType"u8); + writer.WriteStringValue(SqlServerLicenseType.Value.ToString()); + } + if (Optional.IsDefined(SqlManagement)) + { + writer.WritePropertyName("sqlManagement"u8); + writer.WriteStringValue(SqlManagement.Value.ToString()); + } + if (Optional.IsDefined(LeastPrivilegeMode)) + { + writer.WritePropertyName("leastPrivilegeMode"u8); + writer.WriteStringValue(LeastPrivilegeMode.Value.ToString()); + } + if (Optional.IsDefined(SqlImageSku)) + { + writer.WritePropertyName("sqlImageSku"u8); + writer.WriteStringValue(SqlImageSku.Value.ToString()); + } + if (Optional.IsDefined(SqlVmGroupResourceId)) + { + writer.WritePropertyName("sqlVirtualMachineGroupResourceId"u8); + writer.WriteStringValue(SqlVmGroupResourceId); + } + if (Optional.IsDefined(WindowsServerFailoverClusterDomainCredentials)) + { + writer.WritePropertyName("wsfcDomainCredentials"u8); + writer.WriteObjectValue(WindowsServerFailoverClusterDomainCredentials, options); + } + if (Optional.IsDefined(WindowsServerFailoverClusterStaticIP)) + { + writer.WritePropertyName("wsfcStaticIp"u8); + writer.WriteStringValue(WindowsServerFailoverClusterStaticIP.ToString()); + } + if (Optional.IsDefined(AutoPatchingSettings)) + { + writer.WritePropertyName("autoPatchingSettings"u8); + writer.WriteObjectValue(AutoPatchingSettings, options); + } + if (Optional.IsDefined(AutoBackupSettings)) + { + writer.WritePropertyName("autoBackupSettings"u8); + writer.WriteObjectValue(AutoBackupSettings, options); + } + if (Optional.IsDefined(KeyVaultCredentialSettings)) + { + writer.WritePropertyName("keyVaultCredentialSettings"u8); + writer.WriteObjectValue(KeyVaultCredentialSettings, options); + } + if (Optional.IsDefined(ServerConfigurationsManagementSettings)) + { + writer.WritePropertyName("serverConfigurationsManagementSettings"u8); + writer.WriteObjectValue(ServerConfigurationsManagementSettings, options); + } + if (Optional.IsDefined(StorageConfigurationSettings)) + { + writer.WritePropertyName("storageConfigurationSettings"u8); + writer.WriteObjectValue(StorageConfigurationSettings, options); + } + if (options.Format != "W" && Optional.IsDefined(TroubleshootingStatus)) + { + writer.WritePropertyName("troubleshootingStatus"u8); + writer.WriteObjectValue(TroubleshootingStatus, options); + } + if (Optional.IsDefined(AssessmentSettings)) + { + writer.WritePropertyName("assessmentSettings"u8); + writer.WriteObjectValue(AssessmentSettings, options); + } + if (Optional.IsDefined(EnableAutomaticUpgrade)) + { + writer.WritePropertyName("enableAutomaticUpgrade"u8); + writer.WriteBooleanValue(EnableAutomaticUpgrade.Value); + } + if (options.Format != "W" && Optional.IsDefined(AdditionalVmPatch)) + { + writer.WritePropertyName("additionalVmPatch"u8); + writer.WriteStringValue(AdditionalVmPatch.Value.ToString()); + } + if (Optional.IsDefined(VirtualMachineIdentitySettings)) + { + writer.WritePropertyName("virtualMachineIdentitySettings"u8); + writer.WriteObjectValue(VirtualMachineIdentitySettings, options); + } + if (options.Format != "W" && Optional.IsDefined(OsType)) + { + writer.WritePropertyName("osType"u8); + writer.WriteStringValue(OsType.Value.ToSerialString()); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + SqlVirtualMachineProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVirtualMachineProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVirtualMachineProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlVirtualMachineProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVirtualMachineProperties DeserializeSqlVirtualMachineProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier virtualMachineResourceId = default; + string provisioningState = default; + string sqlImageOffer = default; + SqlServerLicenseType? sqlServerLicenseType = default; + SqlManagementMode? sqlManagement = default; + LeastPrivilegeMode? leastPrivilegeMode = default; + SqlImageSku? sqlImageSku = default; + ResourceIdentifier sqlVmGroupResourceId = default; + WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = default; + IPAddress windowsServerFailoverClusterStaticIP = default; + SqlVmAutoPatchingSettings autoPatchingSettings = default; + SqlVmAutoBackupSettings autoBackupSettings = default; + SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = default; + SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default; + SqlVmStorageConfigurationSettings storageConfigurationSettings = default; + TroubleshootingStatus troubleshootingStatus = default; + SqlVmAssessmentSettings assessmentSettings = default; + bool? enableAutomaticUpgrade = default; + AdditionalOsPatch? additionalVmPatch = default; + VirtualMachineIdentity virtualMachineIdentitySettings = default; + OsType? osType = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("virtualMachineResourceId"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachineResourceId = new ResourceIdentifier(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("provisioningState"u8)) + { + provisioningState = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("sqlImageOffer"u8)) + { + sqlImageOffer = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("sqlServerLicenseType"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sqlServerLicenseType = new SqlServerLicenseType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("sqlManagement"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sqlManagement = new SqlManagementMode(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("leastPrivilegeMode"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + leastPrivilegeMode = new LeastPrivilegeMode(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("sqlImageSku"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sqlImageSku = new SqlImageSku(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("sqlVirtualMachineGroupResourceId"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sqlVmGroupResourceId = new ResourceIdentifier(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("wsfcDomainCredentials"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + windowsServerFailoverClusterDomainCredentials = WindowsServerFailoverClusterDomainCredentials.DeserializeWindowsServerFailoverClusterDomainCredentials(prop.Value, options); + continue; + } + if (prop.NameEquals("wsfcStaticIp"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + windowsServerFailoverClusterStaticIP = IPAddress.Parse(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("autoPatchingSettings"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoPatchingSettings = SqlVmAutoPatchingSettings.DeserializeSqlVmAutoPatchingSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("autoBackupSettings"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autoBackupSettings = SqlVmAutoBackupSettings.DeserializeSqlVmAutoBackupSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("keyVaultCredentialSettings"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keyVaultCredentialSettings = SqlVmKeyVaultCredentialSettings.DeserializeSqlVmKeyVaultCredentialSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("serverConfigurationsManagementSettings"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serverConfigurationsManagementSettings = SqlServerConfigurationsManagementSettings.DeserializeSqlServerConfigurationsManagementSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("storageConfigurationSettings"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storageConfigurationSettings = SqlVmStorageConfigurationSettings.DeserializeSqlVmStorageConfigurationSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("troubleshootingStatus"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + troubleshootingStatus = TroubleshootingStatus.DeserializeTroubleshootingStatus(prop.Value, options); + continue; + } + if (prop.NameEquals("assessmentSettings"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + assessmentSettings = SqlVmAssessmentSettings.DeserializeSqlVmAssessmentSettings(prop.Value, options); + continue; + } + if (prop.NameEquals("enableAutomaticUpgrade"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAutomaticUpgrade = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("additionalVmPatch"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalVmPatch = new AdditionalOsPatch(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("virtualMachineIdentitySettings"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachineIdentitySettings = VirtualMachineIdentity.DeserializeVirtualMachineIdentity(prop.Value, options); + continue; + } + if (prop.NameEquals("osType"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osType = prop.Value.GetString().ToOsType(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SqlVirtualMachineProperties( + virtualMachineResourceId, + provisioningState, + sqlImageOffer, + sqlServerLicenseType, + sqlManagement, + leastPrivilegeMode, + sqlImageSku, + sqlVmGroupResourceId, + windowsServerFailoverClusterDomainCredentials, + windowsServerFailoverClusterStaticIP, + autoPatchingSettings, + autoBackupSettings, + keyVaultCredentialSettings, + serverConfigurationsManagementSettings, + storageConfigurationSettings, + troubleshootingStatus, + assessmentSettings, + enableAutomaticUpgrade, + additionalVmPatch, + virtualMachineIdentitySettings, + osType, + additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(SqlVirtualMachineProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + SqlVirtualMachineProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVirtualMachineProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeSqlVirtualMachineProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlVirtualMachineProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs new file mode 100644 index 000000000000..c8f46478076c --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Net; +using Azure.Core; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The SQL virtual machine properties. + internal partial class SqlVirtualMachineProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public SqlVirtualMachineProperties() + { + } + + /// Initializes a new instance of . + /// ARM Resource id of underlying virtual machine created from SQL marketplace image. + /// Provisioning state to track the async operation status. + /// SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016. + /// SQL Server license type. + /// SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it. + /// SQL IaaS Agent least privilege mode. + /// SQL Server edition type. + /// ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of. + /// 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. + /// Auto patching settings for applying critical security updates to SQL virtual machine. + /// Auto backup settings for SQL Server. + /// Key vault credential settings. + /// SQL Server configuration management settings. + /// Storage Configuration Settings. + /// Troubleshooting status. + /// SQL best practices Assessment Settings. + /// Enable automatic upgrade of Sql IaaS extension Agent. + /// Additional VM Patching solution enabled on the Virtual Machine. + /// Virtual Machine Identity details used for Sql IaaS extension configurations. + /// Operating System of the current SQL Virtual Machine. + /// Keeps track of any properties unknown to the library. + internal SqlVirtualMachineProperties(ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, SqlServerLicenseType? sqlServerLicenseType, SqlManagementMode? sqlManagement, LeastPrivilegeMode? leastPrivilegeMode, SqlImageSku? sqlImageSku, ResourceIdentifier sqlVmGroupResourceId, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, IPAddress windowsServerFailoverClusterStaticIP, SqlVmAutoPatchingSettings autoPatchingSettings, SqlVmAutoBackupSettings autoBackupSettings, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, SqlVmStorageConfigurationSettings storageConfigurationSettings, TroubleshootingStatus troubleshootingStatus, SqlVmAssessmentSettings assessmentSettings, bool? enableAutomaticUpgrade, AdditionalOsPatch? additionalVmPatch, VirtualMachineIdentity virtualMachineIdentitySettings, OsType? osType, IDictionary additionalBinaryDataProperties) + { + VirtualMachineResourceId = virtualMachineResourceId; + ProvisioningState = provisioningState; + SqlImageOffer = sqlImageOffer; + SqlServerLicenseType = sqlServerLicenseType; + SqlManagement = sqlManagement; + LeastPrivilegeMode = leastPrivilegeMode; + SqlImageSku = sqlImageSku; + SqlVmGroupResourceId = sqlVmGroupResourceId; + WindowsServerFailoverClusterDomainCredentials = windowsServerFailoverClusterDomainCredentials; + WindowsServerFailoverClusterStaticIP = windowsServerFailoverClusterStaticIP; + AutoPatchingSettings = autoPatchingSettings; + AutoBackupSettings = autoBackupSettings; + KeyVaultCredentialSettings = keyVaultCredentialSettings; + ServerConfigurationsManagementSettings = serverConfigurationsManagementSettings; + StorageConfigurationSettings = storageConfigurationSettings; + TroubleshootingStatus = troubleshootingStatus; + AssessmentSettings = assessmentSettings; + EnableAutomaticUpgrade = enableAutomaticUpgrade; + AdditionalVmPatch = additionalVmPatch; + VirtualMachineIdentitySettings = virtualMachineIdentitySettings; + OsType = osType; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// ARM Resource id of underlying virtual machine created from SQL marketplace image. + public ResourceIdentifier VirtualMachineResourceId { get; set; } + + /// Provisioning state to track the async operation status. + public string ProvisioningState { get; } + + /// SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016. + public string SqlImageOffer { get; set; } + + /// SQL Server license type. + public SqlServerLicenseType? SqlServerLicenseType { get; set; } + + /// SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it. + public SqlManagementMode? SqlManagement { get; set; } + + /// SQL IaaS Agent least privilege mode. + public LeastPrivilegeMode? LeastPrivilegeMode { get; set; } + + /// SQL Server edition type. + public SqlImageSku? SqlImageSku { get; set; } + + /// ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of. + public ResourceIdentifier SqlVmGroupResourceId { get; set; } + + /// Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. + public WindowsServerFailoverClusterDomainCredentials WindowsServerFailoverClusterDomainCredentials { get; set; } + + /// Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. + public IPAddress WindowsServerFailoverClusterStaticIP { get; set; } + + /// Auto patching settings for applying critical security updates to SQL virtual machine. + public SqlVmAutoPatchingSettings AutoPatchingSettings { get; set; } + + /// Auto backup settings for SQL Server. + public SqlVmAutoBackupSettings AutoBackupSettings { get; set; } + + /// Key vault credential settings. + public SqlVmKeyVaultCredentialSettings KeyVaultCredentialSettings { get; set; } + + /// SQL Server configuration management settings. + public SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get; set; } + + /// Storage Configuration Settings. + public SqlVmStorageConfigurationSettings StorageConfigurationSettings { get; set; } + + /// Troubleshooting status. + public TroubleshootingStatus TroubleshootingStatus { get; } + + /// SQL best practices Assessment Settings. + public SqlVmAssessmentSettings AssessmentSettings { get; set; } + + /// Enable automatic upgrade of Sql IaaS extension Agent. + public bool? EnableAutomaticUpgrade { get; set; } + + /// Additional VM Patching solution enabled on the Virtual Machine. + public AdditionalOsPatch? AdditionalVmPatch { get; } + + /// Virtual Machine Identity details used for Sql IaaS extension configurations. + public VirtualMachineIdentity VirtualMachineIdentitySettings { get; set; } + + /// Operating System of the current SQL Virtual Machine. + public OsType? OsType { get; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentDayOfWeek.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentDayOfWeek.Serialization.cs index f9e11a138da6..3714e8aef0c1 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentDayOfWeek.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentDayOfWeek.Serialization.cs @@ -11,6 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { internal static partial class SqlVmAssessmentDayOfWeekExtensions { + /// The value to serialize. public static string ToSerialString(this SqlVmAssessmentDayOfWeek value) => value switch { SqlVmAssessmentDayOfWeek.Monday => "Monday", @@ -23,15 +24,37 @@ internal static partial class SqlVmAssessmentDayOfWeekExtensions _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SqlVmAssessmentDayOfWeek value.") }; + /// The value to deserialize. public static SqlVmAssessmentDayOfWeek ToSqlVmAssessmentDayOfWeek(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Monday")) return SqlVmAssessmentDayOfWeek.Monday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Tuesday")) return SqlVmAssessmentDayOfWeek.Tuesday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wednesday")) return SqlVmAssessmentDayOfWeek.Wednesday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Thursday")) return SqlVmAssessmentDayOfWeek.Thursday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Friday")) return SqlVmAssessmentDayOfWeek.Friday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Saturday")) return SqlVmAssessmentDayOfWeek.Saturday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Sunday")) return SqlVmAssessmentDayOfWeek.Sunday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Monday")) + { + return SqlVmAssessmentDayOfWeek.Monday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Tuesday")) + { + return SqlVmAssessmentDayOfWeek.Tuesday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wednesday")) + { + return SqlVmAssessmentDayOfWeek.Wednesday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Thursday")) + { + return SqlVmAssessmentDayOfWeek.Thursday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Friday")) + { + return SqlVmAssessmentDayOfWeek.Friday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Saturday")) + { + return SqlVmAssessmentDayOfWeek.Saturday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Sunday")) + { + return SqlVmAssessmentDayOfWeek.Sunday; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SqlVmAssessmentDayOfWeek value."); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.Serialization.cs index 9b9a7b257f34..f8d4bc5dfd90 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmAssessmentSchedule : IUtf8JsonSerializable, IJsonModel + /// Set assessment schedule for SQL Server. + public partial class SqlVmAssessmentSchedule : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmAssessmentSchedule)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enable"u8); @@ -59,15 +59,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("startTime"u8); writer.WriteStringValue(StartTime); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -76,95 +76,101 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmAssessmentSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmAssessmentSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVmAssessmentSchedule JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmAssessmentSchedule)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlVmAssessmentSchedule(document.RootElement, options); } - internal static SqlVmAssessmentSchedule DeserializeSqlVmAssessmentSchedule(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmAssessmentSchedule DeserializeSqlVmAssessmentSchedule(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - bool? enable = default; + bool? isEnabled = default; int? weeklyInterval = default; int? monthlyOccurrence = default; SqlVmAssessmentDayOfWeek? dayOfWeek = default; string startTime = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("enable"u8)) + if (prop.NameEquals("enable"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - enable = property.Value.GetBoolean(); + isEnabled = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("weeklyInterval"u8)) + if (prop.NameEquals("weeklyInterval"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - weeklyInterval = property.Value.GetInt32(); + weeklyInterval = prop.Value.GetInt32(); continue; } - if (property.NameEquals("monthlyOccurrence"u8)) + if (prop.NameEquals("monthlyOccurrence"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - monthlyOccurrence = property.Value.GetInt32(); + monthlyOccurrence = prop.Value.GetInt32(); continue; } - if (property.NameEquals("dayOfWeek"u8)) + if (prop.NameEquals("dayOfWeek"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - dayOfWeek = property.Value.GetString().ToSqlVmAssessmentDayOfWeek(); + dayOfWeek = prop.Value.GetString().ToSqlVmAssessmentDayOfWeek(); continue; } - if (property.NameEquals("startTime"u8)) + if (prop.NameEquals("startTime"u8)) { - startTime = property.Value.GetString(); + startTime = prop.Value.GetString(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new SqlVmAssessmentSchedule( - enable, + isEnabled, weeklyInterval, monthlyOccurrence, dayOfWeek, startTime, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -174,15 +180,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt } } - SqlVmAssessmentSchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlVmAssessmentSchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVmAssessmentSchedule PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlVmAssessmentSchedule(document.RootElement, options); } default: @@ -190,6 +201,7 @@ SqlVmAssessmentSchedule IPersistableModel.Create(Binary } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.cs index a6b066b5c3e4..f995789653f9 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.cs @@ -10,40 +10,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// The SqlVmAssessmentSchedule. + /// Set assessment schedule for SQL Server. public partial class SqlVmAssessmentSchedule { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlVmAssessmentSchedule() @@ -56,25 +27,29 @@ public SqlVmAssessmentSchedule() /// 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. /// Day of the week to run assessment. /// Time of the day in HH:mm format. Eg. 17:30. - /// Keeps track of any properties unknown to the library. - internal SqlVmAssessmentSchedule(bool? isEnabled, int? weeklyInterval, int? monthlyOccurrence, SqlVmAssessmentDayOfWeek? dayOfWeek, string startTime, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal SqlVmAssessmentSchedule(bool? isEnabled, int? weeklyInterval, int? monthlyOccurrence, SqlVmAssessmentDayOfWeek? dayOfWeek, string startTime, IDictionary additionalBinaryDataProperties) { IsEnabled = isEnabled; WeeklyInterval = weeklyInterval; MonthlyOccurrence = monthlyOccurrence; DayOfWeek = dayOfWeek; StartTime = startTime; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Enable or disable assessment schedule on SQL virtual machine. public bool? IsEnabled { get; set; } + /// Number of weeks to schedule between 2 assessment runs. Takes value from 1-6. public int? WeeklyInterval { get; set; } + /// 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. public int? MonthlyOccurrence { get; set; } + /// Day of the week to run assessment. public SqlVmAssessmentDayOfWeek? DayOfWeek { get; set; } + /// Time of the day in HH:mm format. Eg. 17:30. public string StartTime { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.Serialization.cs index c2405a50f0af..1c264a127ed9 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmAssessmentSettings : IUtf8JsonSerializable, IJsonModel + /// Configure SQL best practices Assessment for databases in your SQL virtual machine. + public partial class SqlVmAssessmentSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmAssessmentSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enable"u8); @@ -49,15 +49,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("schedule"u8); writer.WriteObjectValue(Schedule, options); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -66,73 +66,79 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmAssessmentSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmAssessmentSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVmAssessmentSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmAssessmentSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlVmAssessmentSettings(document.RootElement, options); } - internal static SqlVmAssessmentSettings DeserializeSqlVmAssessmentSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmAssessmentSettings DeserializeSqlVmAssessmentSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - bool? enable = default; + bool? isEnabled = default; bool? runImmediately = default; SqlVmAssessmentSchedule schedule = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("enable"u8)) + if (prop.NameEquals("enable"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - enable = property.Value.GetBoolean(); + isEnabled = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("runImmediately"u8)) + if (prop.NameEquals("runImmediately"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - runImmediately = property.Value.GetBoolean(); + runImmediately = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("schedule"u8)) + if (prop.NameEquals("schedule"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - schedule = SqlVmAssessmentSchedule.DeserializeSqlVmAssessmentSchedule(property.Value, options); + schedule = SqlVmAssessmentSchedule.DeserializeSqlVmAssessmentSchedule(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new SqlVmAssessmentSettings(enable, runImmediately, schedule, serializedAdditionalRawData); + return new SqlVmAssessmentSettings(isEnabled, runImmediately, schedule, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -142,15 +148,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt } } - SqlVmAssessmentSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlVmAssessmentSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVmAssessmentSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlVmAssessmentSettings(document.RootElement, options); } default: @@ -158,6 +169,7 @@ SqlVmAssessmentSettings IPersistableModel.Create(Binary } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.cs index a74a7cb1e0ad..9d5d3f75b7c6 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.cs @@ -10,40 +10,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// Configure assessment for databases in your SQL virtual machine. + /// Configure SQL best practices Assessment for databases in your SQL virtual machine. public partial class SqlVmAssessmentSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlVmAssessmentSettings() @@ -51,23 +22,25 @@ public SqlVmAssessmentSettings() } /// Initializes a new instance of . - /// Enable or disable assessment feature on SQL virtual machine. - /// Run assessment immediately on SQL virtual machine. - /// Schedule for Assessment. - /// Keeps track of any properties unknown to the library. - internal SqlVmAssessmentSettings(bool? isEnabled, bool? runImmediately, SqlVmAssessmentSchedule schedule, IDictionary serializedAdditionalRawData) + /// Enable or disable SQL best practices Assessment feature on SQL virtual machine. + /// Run SQL best practices Assessment immediately on SQL virtual machine. + /// Schedule for SQL best practices Assessment. + /// Keeps track of any properties unknown to the library. + internal SqlVmAssessmentSettings(bool? isEnabled, bool? runImmediately, SqlVmAssessmentSchedule schedule, IDictionary additionalBinaryDataProperties) { IsEnabled = isEnabled; RunImmediately = runImmediately; Schedule = schedule; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } - /// Enable or disable assessment feature on SQL virtual machine. + /// Enable or disable SQL best practices Assessment feature on SQL virtual machine. public bool? IsEnabled { get; set; } - /// Run assessment immediately on SQL virtual machine. + + /// Run SQL best practices Assessment immediately on SQL virtual machine. public bool? RunImmediately { get; set; } - /// Schedule for Assessment. + + /// Schedule for SQL best practices Assessment. public SqlVmAssessmentSchedule Schedule { get; set; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupDayOfWeek.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupDayOfWeek.cs index 9e8cdfec1ea3..6ffbb6d66629 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupDayOfWeek.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupDayOfWeek.cs @@ -7,21 +7,14 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// The SqlVmAutoBackupDayOfWeek. + /// public readonly partial struct SqlVmAutoBackupDayOfWeek : IEquatable { private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqlVmAutoBackupDayOfWeek(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - private const string MondayValue = "Monday"; private const string TuesdayValue = "Tuesday"; private const string WednesdayValue = "Wednesday"; @@ -30,37 +23,67 @@ public SqlVmAutoBackupDayOfWeek(string value) private const string SaturdayValue = "Saturday"; private const string SundayValue = "Sunday"; - /// Monday. + /// Initializes a new instance of . + /// The value. + /// is null. + public SqlVmAutoBackupDayOfWeek(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Gets the Monday. public static SqlVmAutoBackupDayOfWeek Monday { get; } = new SqlVmAutoBackupDayOfWeek(MondayValue); - /// Tuesday. + + /// Gets the Tuesday. public static SqlVmAutoBackupDayOfWeek Tuesday { get; } = new SqlVmAutoBackupDayOfWeek(TuesdayValue); - /// Wednesday. + + /// Gets the Wednesday. public static SqlVmAutoBackupDayOfWeek Wednesday { get; } = new SqlVmAutoBackupDayOfWeek(WednesdayValue); - /// Thursday. + + /// Gets the Thursday. public static SqlVmAutoBackupDayOfWeek Thursday { get; } = new SqlVmAutoBackupDayOfWeek(ThursdayValue); - /// Friday. + + /// Gets the Friday. public static SqlVmAutoBackupDayOfWeek Friday { get; } = new SqlVmAutoBackupDayOfWeek(FridayValue); - /// Saturday. + + /// Gets the Saturday. public static SqlVmAutoBackupDayOfWeek Saturday { get; } = new SqlVmAutoBackupDayOfWeek(SaturdayValue); - /// Sunday. + + /// Gets the Sunday. public static SqlVmAutoBackupDayOfWeek Sunday { get; } = new SqlVmAutoBackupDayOfWeek(SundayValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlVmAutoBackupDayOfWeek left, SqlVmAutoBackupDayOfWeek right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlVmAutoBackupDayOfWeek left, SqlVmAutoBackupDayOfWeek right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlVmAutoBackupDayOfWeek(string value) => new SqlVmAutoBackupDayOfWeek(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmAutoBackupDayOfWeek?(string value) => value == null ? null : new SqlVmAutoBackupDayOfWeek(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlVmAutoBackupDayOfWeek other && Equals(other); - /// + + /// public bool Equals(SqlVmAutoBackupDayOfWeek other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.Serialization.cs index 88b214fc6f5e..4e2723ec6953 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmAutoBackupSettings : IUtf8JsonSerializable, IJsonModel + /// Configure backups for databases in your SQL virtual machine. + public partial class SqlVmAutoBackupSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmAutoBackupSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enable"u8); @@ -88,7 +88,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit { writer.WritePropertyName("daysOfWeek"u8); writer.WriteStartArray(); - foreach (var item in DaysOfWeek) + foreach (SqlVmAutoBackupDayOfWeek item in DaysOfWeek) { writer.WriteStringValue(item.ToString()); } @@ -109,15 +109,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("logBackupFrequency"u8); writer.WriteNumberValue(LogBackupFrequency.Value); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -126,191 +126,197 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmAutoBackupSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmAutoBackupSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVmAutoBackupSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmAutoBackupSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlVmAutoBackupSettings(document.RootElement, options); } - internal static SqlVmAutoBackupSettings DeserializeSqlVmAutoBackupSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmAutoBackupSettings DeserializeSqlVmAutoBackupSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - bool? enable = default; - bool? enableEncryption = default; - int? retentionPeriod = default; - Uri storageAccountUrl = default; + bool? isEnabled = default; + bool? isEncryptionEnabled = default; + int? retentionPeriodInDays = default; + Uri storageAccountUri = default; string storageContainerName = default; string storageAccessKey = default; string password = default; - bool? backupSystemDbs = default; + bool? areSystemDbsIncludedInBackup = default; SqVmBackupScheduleType? backupScheduleType = default; SqlVmFullBackupFrequency? fullBackupFrequency = default; IList daysOfWeek = default; - int? fullBackupStartTime = default; + int? fullBackupStartHour = default; int? fullBackupWindowHours = default; int? logBackupFrequency = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("enable"u8)) + if (prop.NameEquals("enable"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - enable = property.Value.GetBoolean(); + isEnabled = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("enableEncryption"u8)) + if (prop.NameEquals("enableEncryption"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - enableEncryption = property.Value.GetBoolean(); + isEncryptionEnabled = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("retentionPeriod"u8)) + if (prop.NameEquals("retentionPeriod"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - retentionPeriod = property.Value.GetInt32(); + retentionPeriodInDays = prop.Value.GetInt32(); continue; } - if (property.NameEquals("storageAccountUrl"u8)) + if (prop.NameEquals("storageAccountUrl"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - storageAccountUrl = new Uri(property.Value.GetString()); + storageAccountUri = string.IsNullOrEmpty(prop.Value.GetString()) ? null : new Uri(prop.Value.GetString()); continue; } - if (property.NameEquals("storageContainerName"u8)) + if (prop.NameEquals("storageContainerName"u8)) { - storageContainerName = property.Value.GetString(); + storageContainerName = prop.Value.GetString(); continue; } - if (property.NameEquals("storageAccessKey"u8)) + if (prop.NameEquals("storageAccessKey"u8)) { - storageAccessKey = property.Value.GetString(); + storageAccessKey = prop.Value.GetString(); continue; } - if (property.NameEquals("password"u8)) + if (prop.NameEquals("password"u8)) { - password = property.Value.GetString(); + password = prop.Value.GetString(); continue; } - if (property.NameEquals("backupSystemDbs"u8)) + if (prop.NameEquals("backupSystemDbs"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - backupSystemDbs = property.Value.GetBoolean(); + areSystemDbsIncludedInBackup = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("backupScheduleType"u8)) + if (prop.NameEquals("backupScheduleType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - backupScheduleType = new SqVmBackupScheduleType(property.Value.GetString()); + backupScheduleType = new SqVmBackupScheduleType(prop.Value.GetString()); continue; } - if (property.NameEquals("fullBackupFrequency"u8)) + if (prop.NameEquals("fullBackupFrequency"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - fullBackupFrequency = new SqlVmFullBackupFrequency(property.Value.GetString()); + fullBackupFrequency = new SqlVmFullBackupFrequency(prop.Value.GetString()); continue; } - if (property.NameEquals("daysOfWeek"u8)) + if (prop.NameEquals("daysOfWeek"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + foreach (var item in prop.Value.EnumerateArray()) { array.Add(new SqlVmAutoBackupDayOfWeek(item.GetString())); } daysOfWeek = array; continue; } - if (property.NameEquals("fullBackupStartTime"u8)) + if (prop.NameEquals("fullBackupStartTime"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - fullBackupStartTime = property.Value.GetInt32(); + fullBackupStartHour = prop.Value.GetInt32(); continue; } - if (property.NameEquals("fullBackupWindowHours"u8)) + if (prop.NameEquals("fullBackupWindowHours"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - fullBackupWindowHours = property.Value.GetInt32(); + fullBackupWindowHours = prop.Value.GetInt32(); continue; } - if (property.NameEquals("logBackupFrequency"u8)) + if (prop.NameEquals("logBackupFrequency"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - logBackupFrequency = property.Value.GetInt32(); + logBackupFrequency = prop.Value.GetInt32(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new SqlVmAutoBackupSettings( - enable, - enableEncryption, - retentionPeriod, - storageAccountUrl, + isEnabled, + isEncryptionEnabled, + retentionPeriodInDays, + storageAccountUri, storageContainerName, storageAccessKey, password, - backupSystemDbs, + areSystemDbsIncludedInBackup, backupScheduleType, fullBackupFrequency, daysOfWeek ?? new ChangeTrackingList(), - fullBackupStartTime, + fullBackupStartHour, fullBackupWindowHours, logBackupFrequency, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -320,15 +326,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOpt } } - SqlVmAutoBackupSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlVmAutoBackupSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVmAutoBackupSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlVmAutoBackupSettings(document.RootElement, options); } default: @@ -336,6 +347,7 @@ SqlVmAutoBackupSettings IPersistableModel.Create(Binary } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.cs index 4b68d99bb22a..27cdc8283fd3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.cs @@ -7,43 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Configure backups for databases in your SQL virtual machine. public partial class SqlVmAutoBackupSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlVmAutoBackupSettings() @@ -66,8 +38,8 @@ public SqlVmAutoBackupSettings() /// Start time of a given day during which full backups can take place. 0-23 hours. /// Duration of the time window of a given day during which full backups can take place. 1-23 hours. /// Frequency of log backups. 5-60 minutes. - /// Keeps track of any properties unknown to the library. - internal SqlVmAutoBackupSettings(bool? isEnabled, bool? isEncryptionEnabled, int? retentionPeriodInDays, Uri storageAccountUri, string storageContainerName, string storageAccessKey, string password, bool? areSystemDbsIncludedInBackup, SqVmBackupScheduleType? backupScheduleType, SqlVmFullBackupFrequency? fullBackupFrequency, IList daysOfWeek, int? fullBackupStartHour, int? fullBackupWindowHours, int? logBackupFrequency, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal SqlVmAutoBackupSettings(bool? isEnabled, bool? isEncryptionEnabled, int? retentionPeriodInDays, Uri storageAccountUri, string storageContainerName, string storageAccessKey, string password, bool? areSystemDbsIncludedInBackup, SqVmBackupScheduleType? backupScheduleType, SqlVmFullBackupFrequency? fullBackupFrequency, IList daysOfWeek, int? fullBackupStartHour, int? fullBackupWindowHours, int? logBackupFrequency, IDictionary additionalBinaryDataProperties) { IsEnabled = isEnabled; IsEncryptionEnabled = isEncryptionEnabled; @@ -83,35 +55,48 @@ internal SqlVmAutoBackupSettings(bool? isEnabled, bool? isEncryptionEnabled, int FullBackupStartHour = fullBackupStartHour; FullBackupWindowHours = fullBackupWindowHours; LogBackupFrequency = logBackupFrequency; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Enable or disable autobackup on SQL virtual machine. public bool? IsEnabled { get; set; } + /// Enable or disable encryption for backup on SQL virtual machine. public bool? IsEncryptionEnabled { get; set; } + /// Retention period of backup: 1-90 days. public int? RetentionPeriodInDays { get; set; } + /// Storage account url where backup will be taken to. public Uri StorageAccountUri { get; set; } + /// Storage container name where backup will be taken to. public string StorageContainerName { get; set; } + /// Storage account key where backup will be taken to. public string StorageAccessKey { get; set; } + /// Password for encryption on backup. public string Password { get; set; } + /// Include or exclude system databases from auto backup. public bool? AreSystemDbsIncludedInBackup { get; set; } + /// Backup schedule type. public SqVmBackupScheduleType? BackupScheduleType { get; set; } + /// Frequency of full backups. In both cases, full backups begin during the next scheduled time window. public SqlVmFullBackupFrequency? FullBackupFrequency { get; set; } + /// Days of the week for the backups when FullBackupFrequency is set to Weekly. public IList DaysOfWeek { get; } + /// Start time of a given day during which full backups can take place. 0-23 hours. public int? FullBackupStartHour { get; set; } + /// Duration of the time window of a given day during which full backups can take place. 1-23 hours. public int? FullBackupWindowHours { get; set; } + /// Frequency of log backups. 5-60 minutes. public int? LogBackupFrequency { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingDayOfWeek.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingDayOfWeek.Serialization.cs index 82ab61fa1c09..d1d45357ab53 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingDayOfWeek.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingDayOfWeek.Serialization.cs @@ -11,6 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { internal static partial class SqlVmAutoPatchingDayOfWeekExtensions { + /// The value to serialize. public static string ToSerialString(this SqlVmAutoPatchingDayOfWeek value) => value switch { SqlVmAutoPatchingDayOfWeek.Everyday => "Everyday", @@ -24,16 +25,41 @@ internal static partial class SqlVmAutoPatchingDayOfWeekExtensions _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SqlVmAutoPatchingDayOfWeek value.") }; + /// The value to deserialize. public static SqlVmAutoPatchingDayOfWeek ToSqlVmAutoPatchingDayOfWeek(this string value) { - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Everyday")) return SqlVmAutoPatchingDayOfWeek.Everyday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Monday")) return SqlVmAutoPatchingDayOfWeek.Monday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Tuesday")) return SqlVmAutoPatchingDayOfWeek.Tuesday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wednesday")) return SqlVmAutoPatchingDayOfWeek.Wednesday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Thursday")) return SqlVmAutoPatchingDayOfWeek.Thursday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Friday")) return SqlVmAutoPatchingDayOfWeek.Friday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Saturday")) return SqlVmAutoPatchingDayOfWeek.Saturday; - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Sunday")) return SqlVmAutoPatchingDayOfWeek.Sunday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Everyday")) + { + return SqlVmAutoPatchingDayOfWeek.Everyday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Monday")) + { + return SqlVmAutoPatchingDayOfWeek.Monday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Tuesday")) + { + return SqlVmAutoPatchingDayOfWeek.Tuesday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wednesday")) + { + return SqlVmAutoPatchingDayOfWeek.Wednesday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Thursday")) + { + return SqlVmAutoPatchingDayOfWeek.Thursday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Friday")) + { + return SqlVmAutoPatchingDayOfWeek.Friday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Saturday")) + { + return SqlVmAutoPatchingDayOfWeek.Saturday; + } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Sunday")) + { + return SqlVmAutoPatchingDayOfWeek.Sunday; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SqlVmAutoPatchingDayOfWeek value."); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs index 0c730662f3bd..818de96678dc 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmAutoPatchingSettings : IUtf8JsonSerializable, IJsonModel + /// Set a patching window during which Windows and SQL patches will be applied. + public partial class SqlVmAutoPatchingSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmAutoPatchingSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enable"u8); @@ -54,15 +54,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("maintenanceWindowDuration"u8); writer.WriteNumberValue(MaintenanceWindowDurationInMinutes.Value); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (Optional.IsDefined(AdditionalVmPatch)) { - foreach (var item in _serializedAdditionalRawData) + writer.WritePropertyName("additionalVmPatch"u8); + writer.WriteStringValue(AdditionalVmPatch.Value.ToString()); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -71,83 +76,105 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmAutoPatchingSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmAutoPatchingSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVmAutoPatchingSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmAutoPatchingSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlVmAutoPatchingSettings(document.RootElement, options); } - internal static SqlVmAutoPatchingSettings DeserializeSqlVmAutoPatchingSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmAutoPatchingSettings DeserializeSqlVmAutoPatchingSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - bool? enable = default; + bool? isEnabled = default; SqlVmAutoPatchingDayOfWeek? dayOfWeek = default; int? maintenanceWindowStartingHour = default; - int? maintenanceWindowDuration = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + int? maintenanceWindowDurationInMinutes = default; + AdditionalVmPatch? additionalVmPatch = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("enable"u8)) + if (prop.NameEquals("enable"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - enable = property.Value.GetBoolean(); + isEnabled = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("dayOfWeek"u8)) + if (prop.NameEquals("dayOfWeek"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - dayOfWeek = property.Value.GetString().ToSqlVmAutoPatchingDayOfWeek(); + dayOfWeek = prop.Value.GetString().ToSqlVmAutoPatchingDayOfWeek(); continue; } - if (property.NameEquals("maintenanceWindowStartingHour"u8)) + if (prop.NameEquals("maintenanceWindowStartingHour"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - maintenanceWindowStartingHour = property.Value.GetInt32(); + maintenanceWindowStartingHour = prop.Value.GetInt32(); continue; } - if (property.NameEquals("maintenanceWindowDuration"u8)) + if (prop.NameEquals("maintenanceWindowDuration"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - maintenanceWindowDuration = property.Value.GetInt32(); + maintenanceWindowDurationInMinutes = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("additionalVmPatch"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalVmPatch = new AdditionalVmPatch(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new SqlVmAutoPatchingSettings(enable, dayOfWeek, maintenanceWindowStartingHour, maintenanceWindowDuration, serializedAdditionalRawData); + return new SqlVmAutoPatchingSettings( + isEnabled, + dayOfWeek, + maintenanceWindowStartingHour, + maintenanceWindowDurationInMinutes, + additionalVmPatch, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -157,15 +184,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO } } - SqlVmAutoPatchingSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlVmAutoPatchingSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVmAutoPatchingSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlVmAutoPatchingSettings(document.RootElement, options); } default: @@ -173,6 +205,7 @@ SqlVmAutoPatchingSettings IPersistableModel.Create(Bi } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.cs index 14466cb4482f..b847f647a3f3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Set a patching window during which Windows and SQL patches will be applied. public partial class SqlVmAutoPatchingSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlVmAutoPatchingSettings() @@ -55,23 +26,31 @@ public SqlVmAutoPatchingSettings() /// Day of week to apply the patch on. /// Hour of the day when patching is initiated. Local VM time. /// Duration of patching. - /// Keeps track of any properties unknown to the library. - internal SqlVmAutoPatchingSettings(bool? isEnabled, SqlVmAutoPatchingDayOfWeek? dayOfWeek, int? maintenanceWindowStartingHour, int? maintenanceWindowDurationInMinutes, IDictionary serializedAdditionalRawData) + /// Additional Patch to be enable or enabled on the SQL Virtual Machine. + /// Keeps track of any properties unknown to the library. + internal SqlVmAutoPatchingSettings(bool? isEnabled, SqlVmAutoPatchingDayOfWeek? dayOfWeek, int? maintenanceWindowStartingHour, int? maintenanceWindowDurationInMinutes, AdditionalVmPatch? additionalVmPatch, IDictionary additionalBinaryDataProperties) { IsEnabled = isEnabled; DayOfWeek = dayOfWeek; MaintenanceWindowStartingHour = maintenanceWindowStartingHour; MaintenanceWindowDurationInMinutes = maintenanceWindowDurationInMinutes; - _serializedAdditionalRawData = serializedAdditionalRawData; + AdditionalVmPatch = additionalVmPatch; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Enable or disable autopatching on SQL virtual machine. public bool? IsEnabled { get; set; } + /// Day of week to apply the patch on. public SqlVmAutoPatchingDayOfWeek? DayOfWeek { get; set; } + /// Hour of the day when patching is initiated. Local VM time. public int? MaintenanceWindowStartingHour { get; set; } + /// Duration of patching. public int? MaintenanceWindowDurationInMinutes { get; set; } + + /// Additional Patch to be enable or enabled on the SQL Virtual Machine. + public AdditionalVmPatch? AdditionalVmPatch { get; set; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterConfiguration.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterConfiguration.cs index e237a64341d1..9baca1e0e9f1 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterConfiguration.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterConfiguration.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,35 +15,51 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlVmClusterConfiguration : IEquatable { private readonly string _value; + private const string DomainfulValue = "Domainful"; /// Initializes a new instance of . + /// The value. /// is null. public SqlVmClusterConfiguration(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string DomainfulValue = "Domainful"; + _value = value; + } - /// Domainful. + /// Gets the Domainful. public static SqlVmClusterConfiguration Domainful { get; } = new SqlVmClusterConfiguration(DomainfulValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlVmClusterConfiguration left, SqlVmClusterConfiguration right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlVmClusterConfiguration left, SqlVmClusterConfiguration right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlVmClusterConfiguration(string value) => new SqlVmClusterConfiguration(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmClusterConfiguration?(string value) => value == null ? null : new SqlVmClusterConfiguration(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlVmClusterConfiguration other && Equals(other); - /// + + /// public bool Equals(SqlVmClusterConfiguration other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterManagerType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterManagerType.cs index 880abe035271..bbd434b41c4a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterManagerType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterManagerType.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,35 +15,51 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlVmClusterManagerType : IEquatable { private readonly string _value; + private const string WindowsServerFailoverClusterValue = "WSFC"; /// Initializes a new instance of . + /// The value. /// is null. public SqlVmClusterManagerType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string WindowsServerFailoverClusterValue = "WSFC"; + _value = value; + } - /// WSFC. + /// Gets the WindowsServerFailoverCluster. public static SqlVmClusterManagerType WindowsServerFailoverCluster { get; } = new SqlVmClusterManagerType(WindowsServerFailoverClusterValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlVmClusterManagerType left, SqlVmClusterManagerType right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlVmClusterManagerType left, SqlVmClusterManagerType right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlVmClusterManagerType(string value) => new SqlVmClusterManagerType(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmClusterManagerType?(string value) => value == null ? null : new SqlVmClusterManagerType(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlVmClusterManagerType other && Equals(other); - /// + + /// public bool Equals(SqlVmClusterManagerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterSubnetType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterSubnetType.cs index 716439a2d484..d62d116b159c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterSubnetType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterSubnetType.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,38 +15,55 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlVmClusterSubnetType : IEquatable { private readonly string _value; + private const string SingleSubnetValue = "SingleSubnet"; + private const string MultiSubnetValue = "MultiSubnet"; /// Initializes a new instance of . + /// The value. /// is null. public SqlVmClusterSubnetType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string SingleSubnetValue = "SingleSubnet"; - private const string MultiSubnetValue = "MultiSubnet"; + _value = value; + } - /// SingleSubnet. + /// Gets the SingleSubnet. public static SqlVmClusterSubnetType SingleSubnet { get; } = new SqlVmClusterSubnetType(SingleSubnetValue); - /// MultiSubnet. + + /// Gets the MultiSubnet. public static SqlVmClusterSubnetType MultiSubnet { get; } = new SqlVmClusterSubnetType(MultiSubnetValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlVmClusterSubnetType left, SqlVmClusterSubnetType right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlVmClusterSubnetType left, SqlVmClusterSubnetType right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlVmClusterSubnetType(string value) => new SqlVmClusterSubnetType(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmClusterSubnetType?(string value) => value == null ? null : new SqlVmClusterSubnetType(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlVmClusterSubnetType other && Equals(other); - /// + + /// public bool Equals(SqlVmClusterSubnetType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigAssessmentContent.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigAssessmentContent.Serialization.cs new file mode 100644 index 000000000000..4dc678818de0 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigAssessmentContent.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Configure disk config assessment for databases in your SQL virtual machine. + public partial class SqlVmDiskConfigAssessmentContent : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVmDiskConfigAssessmentContent)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(RunDiskConfigRules)) + { + writer.WritePropertyName("runDiskConfigRules"u8); + writer.WriteBooleanValue(RunDiskConfigRules.Value); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmDiskConfigAssessmentContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVmDiskConfigAssessmentContent JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVmDiskConfigAssessmentContent)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlVmDiskConfigAssessmentContent(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmDiskConfigAssessmentContent DeserializeSqlVmDiskConfigAssessmentContent(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? runDiskConfigRules = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("runDiskConfigRules"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runDiskConfigRules = prop.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SqlVmDiskConfigAssessmentContent(runDiskConfigRules, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(SqlVmDiskConfigAssessmentContent)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + SqlVmDiskConfigAssessmentContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVmDiskConfigAssessmentContent PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeSqlVmDiskConfigAssessmentContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlVmDiskConfigAssessmentContent)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(SqlVmDiskConfigAssessmentContent sqlVmDiskConfigAssessmentContent) + { + if (sqlVmDiskConfigAssessmentContent == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sqlVmDiskConfigAssessmentContent, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigAssessmentContent.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigAssessmentContent.cs new file mode 100644 index 000000000000..43e85e8a1186 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigAssessmentContent.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Configure disk config assessment for databases in your SQL virtual machine. + public partial class SqlVmDiskConfigAssessmentContent + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public SqlVmDiskConfigAssessmentContent() + { + } + + /// Initializes a new instance of . + /// Boolean to run disk config Assessment. Use false to fetch past Assessment. + /// Keeps track of any properties unknown to the library. + internal SqlVmDiskConfigAssessmentContent(bool? runDiskConfigRules, IDictionary additionalBinaryDataProperties) + { + RunDiskConfigRules = runDiskConfigRules; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Boolean to run disk config Assessment. Use false to fetch past Assessment. + public bool? RunDiskConfigRules { get; set; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigurationType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigurationType.cs index 44b149c85582..247cbf24d24e 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigurationType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigurationType.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,41 +15,59 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlVmDiskConfigurationType : IEquatable { private readonly string _value; + private const string NewValue = "NEW"; + private const string ExtendValue = "EXTEND"; + private const string AddValue = "ADD"; /// Initializes a new instance of . + /// The value. /// is null. public SqlVmDiskConfigurationType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string NewValue = "NEW"; - private const string ExtendValue = "EXTEND"; - private const string AddValue = "ADD"; + _value = value; + } - /// NEW. + /// Gets the New. public static SqlVmDiskConfigurationType New { get; } = new SqlVmDiskConfigurationType(NewValue); - /// EXTEND. + + /// Gets the Extend. public static SqlVmDiskConfigurationType Extend { get; } = new SqlVmDiskConfigurationType(ExtendValue); - /// ADD. + + /// Gets the Add. public static SqlVmDiskConfigurationType Add { get; } = new SqlVmDiskConfigurationType(AddValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlVmDiskConfigurationType left, SqlVmDiskConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlVmDiskConfigurationType left, SqlVmDiskConfigurationType right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlVmDiskConfigurationType(string value) => new SqlVmDiskConfigurationType(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmDiskConfigurationType?(string value) => value == null ? null : new SqlVmDiskConfigurationType(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlVmDiskConfigurationType other && Equals(other); - /// + + /// public bool Equals(SqlVmDiskConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmFullBackupFrequency.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmFullBackupFrequency.cs index 8652d94ab061..77ddfdb519d0 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmFullBackupFrequency.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmFullBackupFrequency.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,38 +15,55 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlVmFullBackupFrequency : IEquatable { private readonly string _value; + private const string DailyValue = "Daily"; + private const string WeeklyValue = "Weekly"; /// Initializes a new instance of . + /// The value. /// is null. public SqlVmFullBackupFrequency(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string DailyValue = "Daily"; - private const string WeeklyValue = "Weekly"; + _value = value; + } - /// Daily. + /// Gets the Daily. public static SqlVmFullBackupFrequency Daily { get; } = new SqlVmFullBackupFrequency(DailyValue); - /// Weekly. + + /// Gets the Weekly. public static SqlVmFullBackupFrequency Weekly { get; } = new SqlVmFullBackupFrequency(WeeklyValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlVmFullBackupFrequency left, SqlVmFullBackupFrequency right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlVmFullBackupFrequency left, SqlVmFullBackupFrequency right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlVmFullBackupFrequency(string value) => new SqlVmFullBackupFrequency(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmFullBackupFrequency?(string value) => value == null ? null : new SqlVmFullBackupFrequency(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlVmFullBackupFrequency other && Equals(other); - /// + + /// public bool Equals(SqlVmFullBackupFrequency other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupImageSku.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupImageSku.cs index 3ff96f661eb6..5d54b8a95229 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupImageSku.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupImageSku.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,38 +15,55 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlVmGroupImageSku : IEquatable { private readonly string _value; + private const string DeveloperValue = "Developer"; + private const string EnterpriseValue = "Enterprise"; /// Initializes a new instance of . + /// The value. /// is null. public SqlVmGroupImageSku(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string DeveloperValue = "Developer"; - private const string EnterpriseValue = "Enterprise"; + _value = value; + } - /// Developer. + /// Gets the Developer. public static SqlVmGroupImageSku Developer { get; } = new SqlVmGroupImageSku(DeveloperValue); - /// Enterprise. + + /// Gets the Enterprise. public static SqlVmGroupImageSku Enterprise { get; } = new SqlVmGroupImageSku(EnterpriseValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlVmGroupImageSku left, SqlVmGroupImageSku right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlVmGroupImageSku left, SqlVmGroupImageSku right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlVmGroupImageSku(string value) => new SqlVmGroupImageSku(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmGroupImageSku?(string value) => value == null ? null : new SqlVmGroupImageSku(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlVmGroupImageSku other && Equals(other); - /// + + /// public bool Equals(SqlVmGroupImageSku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.Serialization.cs deleted file mode 100644 index 2f21ad1ade8e..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.Serialization.cs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - internal partial class SqlVmGroupListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SqlVmGroupListResult)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SqlVmGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SqlVmGroupListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmGroupListResult(document.RootElement, options); - } - - internal static SqlVmGroupListResult DeserializeSqlVmGroupListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SqlVmGroupData.DeserializeSqlVmGroupData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SqlVmGroupListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); - default: - throw new FormatException($"The model {nameof(SqlVmGroupListResult)} does not support writing '{options.Format}' format."); - } - } - - SqlVmGroupListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmGroupListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SqlVmGroupListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.cs deleted file mode 100644 index 4cb52bf333d9..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// A list of SQL virtual machine groups. - internal partial class SqlVmGroupListResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal SqlVmGroupListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Array of results. - /// Link to retrieve next page of results. - /// Keeps track of any properties unknown to the library. - internal SqlVmGroupListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Array of results. - public IReadOnlyList Value { get; } - /// Link to retrieve next page of results. - public string NextLink { get; } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.Serialization.cs index 6b636c8b8a7a..157c45744c2d 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.Serialization.cs @@ -10,13 +10,15 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmGroupPatch : IUtf8JsonSerializable, IJsonModel + /// An update to a SQL virtual machine group. + public partial class SqlVmGroupPatch : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +30,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterO /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmGroupPatch)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -41,19 +42,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit foreach (var item in Tags) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -62,58 +68,71 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmGroupPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmGroupPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVmGroupPatch JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmGroupPatch)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlVmGroupPatch(document.RootElement, options); } - internal static SqlVmGroupPatch DeserializeSqlVmGroupPatch(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmGroupPatch DeserializeSqlVmGroupPatch(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IDictionary tags = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tags"u8)) + if (prop.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } tags = dictionary; continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new SqlVmGroupPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new SqlVmGroupPatch(tags ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +142,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opt } } - SqlVmGroupPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlVmGroupPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVmGroupPatch PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlVmGroupPatch(document.RootElement, options); } default: @@ -139,6 +163,19 @@ SqlVmGroupPatch IPersistableModel.Create(BinaryData data, Model } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(SqlVmGroupPatch sqlVmGroupPatch) + { + if (sqlVmGroupPatch == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sqlVmGroupPatch, ModelSerializationExtensions.WireOptions); + return content; + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.cs index a53a14d66294..d6d6a88e5b94 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.cs @@ -7,43 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// An update to a SQL virtual machine group. public partial class SqlVmGroupPatch { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlVmGroupPatch() @@ -53,11 +25,11 @@ public SqlVmGroupPatch() /// Initializes a new instance of . /// Resource tags. - /// Keeps track of any properties unknown to the library. - internal SqlVmGroupPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal SqlVmGroupPatch(IDictionary tags, IDictionary additionalBinaryDataProperties) { Tags = tags; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Resource tags. diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupScaleType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupScaleType.cs index f4ac937b0b98..1689148067dc 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupScaleType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupScaleType.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,35 +15,51 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlVmGroupScaleType : IEquatable { private readonly string _value; + private const string HAValue = "HA"; /// Initializes a new instance of . + /// The value. /// is null. public SqlVmGroupScaleType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string HAValue = "HA"; + _value = value; + } - /// HA. + /// Gets the HA. public static SqlVmGroupScaleType HA { get; } = new SqlVmGroupScaleType(HAValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlVmGroupScaleType left, SqlVmGroupScaleType right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlVmGroupScaleType left, SqlVmGroupScaleType right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlVmGroupScaleType(string value) => new SqlVmGroupScaleType(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmGroupScaleType?(string value) => value == null ? null : new SqlVmGroupScaleType(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlVmGroupScaleType other && Equals(other); - /// + + /// public bool Equals(SqlVmGroupScaleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.Serialization.cs index f06ade0b759f..3d9ed08ed628 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmKeyVaultCredentialSettings : IUtf8JsonSerializable, IJsonModel + /// Configure your SQL virtual machine to be able to connect to the Azure Key Vault service. + public partial class SqlVmKeyVaultCredentialSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmKeyVaultCredentialSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) { writer.WritePropertyName("enable"u8); @@ -59,15 +59,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("servicePrincipalSecret"u8); writer.WriteStringValue(ServicePrincipalSecret); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -76,87 +76,93 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmKeyVaultCredentialSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmKeyVaultCredentialSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVmKeyVaultCredentialSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmKeyVaultCredentialSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlVmKeyVaultCredentialSettings(document.RootElement, options); } - internal static SqlVmKeyVaultCredentialSettings DeserializeSqlVmKeyVaultCredentialSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmKeyVaultCredentialSettings DeserializeSqlVmKeyVaultCredentialSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - bool? enable = default; + bool? isEnabled = default; string credentialName = default; - Uri azureKeyVaultUrl = default; + Uri azureKeyVaultUri = default; string servicePrincipalName = default; string servicePrincipalSecret = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("enable"u8)) + if (prop.NameEquals("enable"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - enable = property.Value.GetBoolean(); + isEnabled = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("credentialName"u8)) + if (prop.NameEquals("credentialName"u8)) { - credentialName = property.Value.GetString(); + credentialName = prop.Value.GetString(); continue; } - if (property.NameEquals("azureKeyVaultUrl"u8)) + if (prop.NameEquals("azureKeyVaultUrl"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - azureKeyVaultUrl = new Uri(property.Value.GetString()); + azureKeyVaultUri = string.IsNullOrEmpty(prop.Value.GetString()) ? null : new Uri(prop.Value.GetString()); continue; } - if (property.NameEquals("servicePrincipalName"u8)) + if (prop.NameEquals("servicePrincipalName"u8)) { - servicePrincipalName = property.Value.GetString(); + servicePrincipalName = prop.Value.GetString(); continue; } - if (property.NameEquals("servicePrincipalSecret"u8)) + if (prop.NameEquals("servicePrincipalSecret"u8)) { - servicePrincipalSecret = property.Value.GetString(); + servicePrincipalSecret = prop.Value.GetString(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new SqlVmKeyVaultCredentialSettings( - enable, + isEnabled, credentialName, - azureKeyVaultUrl, + azureKeyVaultUri, servicePrincipalName, servicePrincipalSecret, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -166,15 +172,20 @@ BinaryData IPersistableModel.Write(ModelReaderW } } - SqlVmKeyVaultCredentialSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlVmKeyVaultCredentialSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVmKeyVaultCredentialSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlVmKeyVaultCredentialSettings(document.RootElement, options); } default: @@ -182,6 +193,7 @@ SqlVmKeyVaultCredentialSettings IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.cs index 6d9cda22d543..82daf6bea3b2 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Configure your SQL virtual machine to be able to connect to the Azure Key Vault service. public partial class SqlVmKeyVaultCredentialSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlVmKeyVaultCredentialSettings() @@ -56,25 +27,29 @@ public SqlVmKeyVaultCredentialSettings() /// Azure Key Vault url. /// Service principal name to access key vault. /// Service principal name secret to access key vault. - /// Keeps track of any properties unknown to the library. - internal SqlVmKeyVaultCredentialSettings(bool? isEnabled, string credentialName, Uri azureKeyVaultUri, string servicePrincipalName, string servicePrincipalSecret, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal SqlVmKeyVaultCredentialSettings(bool? isEnabled, string credentialName, Uri azureKeyVaultUri, string servicePrincipalName, string servicePrincipalSecret, IDictionary additionalBinaryDataProperties) { IsEnabled = isEnabled; CredentialName = credentialName; AzureKeyVaultUri = azureKeyVaultUri; ServicePrincipalName = servicePrincipalName; ServicePrincipalSecret = servicePrincipalSecret; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Enable or disable key vault credential setting. public bool? IsEnabled { get; set; } + /// Credential name. public string CredentialName { get; set; } + /// Azure Key Vault url. public Uri AzureKeyVaultUri { get; set; } + /// Service principal name to access key vault. public string ServicePrincipalName { get; set; } + /// Service principal name secret to access key vault. public string ServicePrincipalSecret { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.Serialization.cs deleted file mode 100644 index e967e8de05f9..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.Serialization.cs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - internal partial class SqlVmListResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SqlVmListResult)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - SqlVmListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SqlVmListResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmListResult(document.RootElement, options); - } - - internal static SqlVmListResult DeserializeSqlVmListResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - string nextLink = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SqlVmData.DeserializeSqlVmData(item, options)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SqlVmListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); - default: - throw new FormatException($"The model {nameof(SqlVmListResult)} does not support writing '{options.Format}' format."); - } - } - - SqlVmListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SqlVmListResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.cs deleted file mode 100644 index bd81f083086c..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// A list of SQL virtual machines. - internal partial class SqlVmListResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - internal SqlVmListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// Array of results. - /// Link to retrieve next page of results. - /// Keeps track of any properties unknown to the library. - internal SqlVmListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) - { - Value = value; - NextLink = nextLink; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Array of results. - public IReadOnlyList Value { get; } - /// Link to retrieve next page of results. - public string NextLink { get; } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.Serialization.cs index 080c2702aa9d..cc00417664f9 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.Serialization.cs @@ -10,13 +10,15 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmPatch : IUtf8JsonSerializable, IJsonModel + /// An update to a SQL virtual machine. + public partial class SqlVmPatch : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +30,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOption /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmPatch)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -41,19 +42,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit foreach (var item in Tags) { writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } writer.WriteStringValue(item.Value); } writer.WriteEndObject(); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -62,58 +68,71 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVmPatch JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmPatch)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlVmPatch(document.RootElement, options); } - internal static SqlVmPatch DeserializeSqlVmPatch(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmPatch DeserializeSqlVmPatch(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } IDictionary tags = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tags"u8)) + if (prop.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) + foreach (var prop0 in prop.Value.EnumerateObject()) { - dictionary.Add(property0.Name, property0.Value.GetString()); + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } } tags = dictionary; continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new SqlVmPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new SqlVmPatch(tags ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -123,15 +142,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - SqlVmPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlVmPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVmPatch PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlVmPatch(document.RootElement, options); } default: @@ -139,6 +163,19 @@ SqlVmPatch IPersistableModel.Create(BinaryData data, ModelReaderWrit } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(SqlVmPatch sqlVmPatch) + { + if (sqlVmPatch == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sqlVmPatch, ModelSerializationExtensions.WireOptions); + return content; + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.cs index 8f5cc1c2a9bc..dfdca395fa99 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.cs @@ -7,43 +7,15 @@ using System; using System.Collections.Generic; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// An update to a SQL virtual machine. public partial class SqlVmPatch { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlVmPatch() @@ -53,11 +25,11 @@ public SqlVmPatch() /// Initializes a new instance of . /// Resource tags. - /// Keeps track of any properties unknown to the library. - internal SqlVmPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal SqlVmPatch(IDictionary tags, IDictionary additionalBinaryDataProperties) { Tags = tags; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Resource tags. diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.Serialization.cs index 6deaff2bf9dd..42b926faf0b0 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmStorageConfigurationSettings : IUtf8JsonSerializable, IJsonModel + /// Storage Configurations for SQL Data, Log and TempDb. + public partial class SqlVmStorageConfigurationSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmStorageConfigurationSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(SqlDataSettings)) { writer.WritePropertyName("sqlDataSettings"u8); @@ -64,15 +64,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("storageWorkloadType"u8); writer.WriteStringValue(StorageWorkloadType.Value.ToString()); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (Optional.IsDefined(EnableStorageConfigBlade)) { - foreach (var item in _serializedAdditionalRawData) + writer.WritePropertyName("enableStorageConfigBlade"u8); + writer.WriteBooleanValue(EnableStorageConfigBlade.Value); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -81,22 +86,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmStorageConfigurationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmStorageConfigurationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVmStorageConfigurationSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmStorageConfigurationSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlVmStorageConfigurationSettings(document.RootElement, options); } - internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigurationSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigurationSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -104,87 +114,99 @@ internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigu SqlStorageSettings sqlDataSettings = default; SqlStorageSettings sqlLogSettings = default; SqlTempDBSettings sqlTempDBSettings = default; - bool? sqlSystemDBOnDataDisk = default; + bool? isSqlSystemDBOnDataDisk = default; SqlVmDiskConfigurationType? diskConfigurationType = default; SqlVmStorageWorkloadType? storageWorkloadType = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + bool? enableStorageConfigBlade = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("sqlDataSettings"u8)) + if (prop.NameEquals("sqlDataSettings"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlDataSettings = SqlStorageSettings.DeserializeSqlStorageSettings(property.Value, options); + sqlDataSettings = SqlStorageSettings.DeserializeSqlStorageSettings(prop.Value, options); continue; } - if (property.NameEquals("sqlLogSettings"u8)) + if (prop.NameEquals("sqlLogSettings"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlLogSettings = SqlStorageSettings.DeserializeSqlStorageSettings(property.Value, options); + sqlLogSettings = SqlStorageSettings.DeserializeSqlStorageSettings(prop.Value, options); continue; } - if (property.NameEquals("sqlTempDbSettings"u8)) + if (prop.NameEquals("sqlTempDbSettings"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlTempDBSettings = SqlTempDBSettings.DeserializeSqlTempDBSettings(property.Value, options); + sqlTempDBSettings = SqlTempDBSettings.DeserializeSqlTempDBSettings(prop.Value, options); continue; } - if (property.NameEquals("sqlSystemDbOnDataDisk"u8)) + if (prop.NameEquals("sqlSystemDbOnDataDisk"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlSystemDBOnDataDisk = property.Value.GetBoolean(); + isSqlSystemDBOnDataDisk = prop.Value.GetBoolean(); continue; } - if (property.NameEquals("diskConfigurationType"u8)) + if (prop.NameEquals("diskConfigurationType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - diskConfigurationType = new SqlVmDiskConfigurationType(property.Value.GetString()); + diskConfigurationType = new SqlVmDiskConfigurationType(prop.Value.GetString()); continue; } - if (property.NameEquals("storageWorkloadType"u8)) + if (prop.NameEquals("storageWorkloadType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - storageWorkloadType = new SqlVmStorageWorkloadType(property.Value.GetString()); + storageWorkloadType = new SqlVmStorageWorkloadType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("enableStorageConfigBlade"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableStorageConfigBlade = prop.Value.GetBoolean(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new SqlVmStorageConfigurationSettings( sqlDataSettings, sqlLogSettings, sqlTempDBSettings, - sqlSystemDBOnDataDisk, + isSqlSystemDBOnDataDisk, diskConfigurationType, storageWorkloadType, - serializedAdditionalRawData); + enableStorageConfigBlade, + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -194,15 +216,20 @@ BinaryData IPersistableModel.Write(ModelReade } } - SqlVmStorageConfigurationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlVmStorageConfigurationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVmStorageConfigurationSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlVmStorageConfigurationSettings(document.RootElement, options); } default: @@ -210,6 +237,7 @@ SqlVmStorageConfigurationSettings IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.cs index 4fc099461cb4..415b7d981020 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Storage Configurations for SQL Data, Log and TempDb. public partial class SqlVmStorageConfigurationSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlVmStorageConfigurationSettings() @@ -57,8 +28,9 @@ public SqlVmStorageConfigurationSettings() /// SQL Server SystemDb Storage on DataPool if true. /// Disk configuration to apply to SQL Server. /// Storage workload type. - /// Keeps track of any properties unknown to the library. - internal SqlVmStorageConfigurationSettings(SqlStorageSettings sqlDataSettings, SqlStorageSettings sqlLogSettings, SqlTempDBSettings sqlTempDBSettings, bool? isSqlSystemDBOnDataDisk, SqlVmDiskConfigurationType? diskConfigurationType, SqlVmStorageWorkloadType? storageWorkloadType, IDictionary serializedAdditionalRawData) + /// Enable SQL IaaS Agent storage configuration blade in Azure Portal. + /// Keeps track of any properties unknown to the library. + internal SqlVmStorageConfigurationSettings(SqlStorageSettings sqlDataSettings, SqlStorageSettings sqlLogSettings, SqlTempDBSettings sqlTempDBSettings, bool? isSqlSystemDBOnDataDisk, SqlVmDiskConfigurationType? diskConfigurationType, SqlVmStorageWorkloadType? storageWorkloadType, bool? enableStorageConfigBlade, IDictionary additionalBinaryDataProperties) { SqlDataSettings = sqlDataSettings; SqlLogSettings = sqlLogSettings; @@ -66,20 +38,29 @@ internal SqlVmStorageConfigurationSettings(SqlStorageSettings sqlDataSettings, S IsSqlSystemDBOnDataDisk = isSqlSystemDBOnDataDisk; DiskConfigurationType = diskConfigurationType; StorageWorkloadType = storageWorkloadType; - _serializedAdditionalRawData = serializedAdditionalRawData; + EnableStorageConfigBlade = enableStorageConfigBlade; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// SQL Server Data Storage Settings. public SqlStorageSettings SqlDataSettings { get; set; } + /// SQL Server Log Storage Settings. public SqlStorageSettings SqlLogSettings { get; set; } + /// SQL Server TempDb Storage Settings. public SqlTempDBSettings SqlTempDBSettings { get; set; } + /// SQL Server SystemDb Storage on DataPool if true. public bool? IsSqlSystemDBOnDataDisk { get; set; } + /// Disk configuration to apply to SQL Server. public SqlVmDiskConfigurationType? DiskConfigurationType { get; set; } + /// Storage workload type. public SqlVmStorageWorkloadType? StorageWorkloadType { get; set; } + + /// Enable SQL IaaS Agent storage configuration blade in Azure Portal. + public bool? EnableStorageConfigBlade { get; set; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageWorkloadType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageWorkloadType.cs index c086cd71669b..b1e315c6a3e3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageWorkloadType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageWorkloadType.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,41 +15,59 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlVmStorageWorkloadType : IEquatable { private readonly string _value; + private const string GeneralValue = "GENERAL"; + private const string OltpValue = "OLTP"; + private const string DWValue = "DW"; /// Initializes a new instance of . + /// The value. /// is null. public SqlVmStorageWorkloadType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string GeneralValue = "GENERAL"; - private const string OltpValue = "OLTP"; - private const string DWValue = "DW"; + _value = value; + } - /// GENERAL. + /// Gets the General. public static SqlVmStorageWorkloadType General { get; } = new SqlVmStorageWorkloadType(GeneralValue); - /// OLTP. + + /// Gets the Oltp. public static SqlVmStorageWorkloadType Oltp { get; } = new SqlVmStorageWorkloadType(OltpValue); - /// DW. + + /// Gets the DW. public static SqlVmStorageWorkloadType DW { get; } = new SqlVmStorageWorkloadType(DWValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlVmStorageWorkloadType left, SqlVmStorageWorkloadType right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlVmStorageWorkloadType left, SqlVmStorageWorkloadType right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlVmStorageWorkloadType(string value) => new SqlVmStorageWorkloadType(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmStorageWorkloadType?(string value) => value == null ? null : new SqlVmStorageWorkloadType(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlVmStorageWorkloadType other && Equals(other); - /// + + /// public bool Equals(SqlVmStorageWorkloadType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.Serialization.cs new file mode 100644 index 000000000000..b2a5349317f4 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Details required for SQL VM troubleshooting. + public partial class SqlVmTroubleshooting : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVmTroubleshooting)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(StartTimeUtc)) + { + writer.WritePropertyName("startTimeUtc"u8); + writer.WriteStringValue(StartTimeUtc.Value, "O"); + } + if (Optional.IsDefined(EndTimeUtc)) + { + writer.WritePropertyName("endTimeUtc"u8); + writer.WriteStringValue(EndTimeUtc.Value, "O"); + } + if (Optional.IsDefined(TroubleshootingScenario)) + { + writer.WritePropertyName("troubleshootingScenario"u8); + writer.WriteStringValue(TroubleshootingScenario.Value.ToString()); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && Optional.IsDefined(VirtualMachineResourceId)) + { + writer.WritePropertyName("virtualMachineResourceId"u8); + writer.WriteStringValue(VirtualMachineResourceId); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmTroubleshooting IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlVmTroubleshooting JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SqlVmTroubleshooting)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlVmTroubleshooting(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmTroubleshooting DeserializeSqlVmTroubleshooting(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? startTimeUtc = default; + DateTimeOffset? endTimeUtc = default; + TroubleshootingScenario? troubleshootingScenario = default; + TroubleshootingAdditionalProperties properties = default; + string virtualMachineResourceId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("startTimeUtc"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTimeUtc = prop.Value.GetDateTimeOffset("O"); + continue; + } + if (prop.NameEquals("endTimeUtc"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTimeUtc = prop.Value.GetDateTimeOffset("O"); + continue; + } + if (prop.NameEquals("troubleshootingScenario"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + troubleshootingScenario = new TroubleshootingScenario(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = TroubleshootingAdditionalProperties.DeserializeTroubleshootingAdditionalProperties(prop.Value, options); + continue; + } + if (prop.NameEquals("virtualMachineResourceId"u8)) + { + virtualMachineResourceId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SqlVmTroubleshooting( + startTimeUtc, + endTimeUtc, + troubleshootingScenario, + properties, + virtualMachineResourceId, + additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(SqlVmTroubleshooting)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + SqlVmTroubleshooting IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlVmTroubleshooting PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeSqlVmTroubleshooting(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlVmTroubleshooting)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(SqlVmTroubleshooting sqlVmTroubleshooting) + { + if (sqlVmTroubleshooting == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sqlVmTroubleshooting, ModelSerializationExtensions.WireOptions); + return content; + } + + /// The to deserialize the from. + internal static SqlVmTroubleshooting FromResponse(Response response) + { + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSqlVmTroubleshooting(document.RootElement, ModelSerializationExtensions.WireOptions); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.cs new file mode 100644 index 000000000000..126bf65342a0 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Details required for SQL VM troubleshooting. + public partial class SqlVmTroubleshooting + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public SqlVmTroubleshooting() + { + } + + /// Initializes a new instance of . + /// Start time in UTC timezone. + /// End time in UTC timezone. + /// SQL VM troubleshooting scenario. + /// Troubleshooting properties. + /// Virtual machine resource id for response. + /// Keeps track of any properties unknown to the library. + internal SqlVmTroubleshooting(DateTimeOffset? startTimeUtc, DateTimeOffset? endTimeUtc, TroubleshootingScenario? troubleshootingScenario, TroubleshootingAdditionalProperties properties, string virtualMachineResourceId, IDictionary additionalBinaryDataProperties) + { + StartTimeUtc = startTimeUtc; + EndTimeUtc = endTimeUtc; + TroubleshootingScenario = troubleshootingScenario; + Properties = properties; + VirtualMachineResourceId = virtualMachineResourceId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Start time in UTC timezone. + public DateTimeOffset? StartTimeUtc { get; set; } + + /// End time in UTC timezone. + public DateTimeOffset? EndTimeUtc { get; set; } + + /// SQL VM troubleshooting scenario. + public TroubleshootingScenario? TroubleshootingScenario { get; set; } + + /// Troubleshooting properties. + internal TroubleshootingAdditionalProperties Properties { get; set; } + + /// Virtual machine resource id for response. + public string VirtualMachineResourceId { get; } + + /// The name of the availability group. + public string TroubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName + { + get + { + return Properties is null ? default : Properties.UnhealthyReplicaInfoAvailabilityGroupName; + } + set + { + if (Properties is null) + { + Properties = new TroubleshootingAdditionalProperties(); + } + Properties.UnhealthyReplicaInfoAvailabilityGroupName = value; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadType.cs index 8c70e4f6a8a5..b7b519ccb0b6 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadType.cs @@ -7,6 +7,7 @@ using System; using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -14,41 +15,59 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public readonly partial struct SqlWorkloadType : IEquatable { private readonly string _value; + private const string GeneralValue = "GENERAL"; + private const string OltpValue = "OLTP"; + private const string DWValue = "DW"; /// Initializes a new instance of . + /// The value. /// is null. public SqlWorkloadType(string value) { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } + Argument.AssertNotNull(value, nameof(value)); - private const string GeneralValue = "GENERAL"; - private const string OltpValue = "OLTP"; - private const string DWValue = "DW"; + _value = value; + } - /// GENERAL. + /// Gets the General. public static SqlWorkloadType General { get; } = new SqlWorkloadType(GeneralValue); - /// OLTP. + + /// Gets the Oltp. public static SqlWorkloadType Oltp { get; } = new SqlWorkloadType(OltpValue); - /// DW. + + /// Gets the DW. public static SqlWorkloadType DW { get; } = new SqlWorkloadType(DWValue); + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. public static bool operator ==(SqlWorkloadType left, SqlWorkloadType right) => left.Equals(right); + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. public static bool operator !=(SqlWorkloadType left, SqlWorkloadType right) => !left.Equals(right); - /// Converts a to a . + + /// Converts a string to a . + /// The value. public static implicit operator SqlWorkloadType(string value) => new SqlWorkloadType(value); - /// + /// Converts a string to a . + /// The value. + public static implicit operator SqlWorkloadType?(string value) => value == null ? null : new SqlWorkloadType(value); + + /// [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is SqlWorkloadType other && Equals(other); - /// + + /// public bool Equals(SqlWorkloadType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - /// + /// [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// + + /// public override string ToString() => _value; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadTypeUpdateSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadTypeUpdateSettings.Serialization.cs index c22803e291df..2233c6650b69 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadTypeUpdateSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadTypeUpdateSettings.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - internal partial class SqlWorkloadTypeUpdateSettings : IUtf8JsonSerializable, IJsonModel + /// Set workload type to optimize storage for SQL Server. + internal partial class SqlWorkloadTypeUpdateSettings : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,26 +29,25 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlWorkloadTypeUpdateSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(SqlWorkloadType)) { writer.WritePropertyName("sqlWorkloadType"u8); writer.WriteStringValue(SqlWorkloadType.Value.ToString()); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -56,53 +56,59 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlWorkloadTypeUpdateSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlWorkloadTypeUpdateSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual SqlWorkloadTypeUpdateSettings JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlWorkloadTypeUpdateSettings)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlWorkloadTypeUpdateSettings(document.RootElement, options); } - internal static SqlWorkloadTypeUpdateSettings DeserializeSqlWorkloadTypeUpdateSettings(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlWorkloadTypeUpdateSettings DeserializeSqlWorkloadTypeUpdateSettings(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } SqlWorkloadType? sqlWorkloadType = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("sqlWorkloadType"u8)) + if (prop.NameEquals("sqlWorkloadType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlWorkloadType = new SqlWorkloadType(property.Value.GetString()); + sqlWorkloadType = new SqlWorkloadType(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new SqlWorkloadTypeUpdateSettings(sqlWorkloadType, serializedAdditionalRawData); + return new SqlWorkloadTypeUpdateSettings(sqlWorkloadType, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -112,15 +118,20 @@ BinaryData IPersistableModel.Write(ModelReaderWri } } - SqlWorkloadTypeUpdateSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlWorkloadTypeUpdateSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual SqlWorkloadTypeUpdateSettings PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlWorkloadTypeUpdateSettings(document.RootElement, options); } default: @@ -128,6 +139,7 @@ SqlWorkloadTypeUpdateSettings IPersistableModel.C } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadTypeUpdateSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadTypeUpdateSettings.cs index 688ecf556b92..226d368c1075 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadTypeUpdateSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadTypeUpdateSettings.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Set workload type to optimize storage for SQL Server. internal partial class SqlWorkloadTypeUpdateSettings { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public SqlWorkloadTypeUpdateSettings() @@ -52,11 +23,11 @@ public SqlWorkloadTypeUpdateSettings() /// Initializes a new instance of . /// SQL Server workload type. - /// Keeps track of any properties unknown to the library. - internal SqlWorkloadTypeUpdateSettings(SqlWorkloadType? sqlWorkloadType, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal SqlWorkloadTypeUpdateSettings(SqlWorkloadType? sqlWorkloadType, IDictionary additionalBinaryDataProperties) { SqlWorkloadType = sqlWorkloadType; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// SQL Server workload type. diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.Serialization.cs new file mode 100644 index 000000000000..49eb1ab41a12 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// SQL VM Troubleshooting additional properties. + internal partial class TroubleshootingAdditionalProperties : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TroubleshootingAdditionalProperties)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(UnhealthyReplicaInfo)) + { + writer.WritePropertyName("unhealthyReplicaInfo"u8); + writer.WriteObjectValue(UnhealthyReplicaInfo, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + TroubleshootingAdditionalProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual TroubleshootingAdditionalProperties JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TroubleshootingAdditionalProperties)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTroubleshootingAdditionalProperties(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static TroubleshootingAdditionalProperties DeserializeTroubleshootingAdditionalProperties(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + UnhealthyReplicaInfo unhealthyReplicaInfo = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("unhealthyReplicaInfo"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + unhealthyReplicaInfo = UnhealthyReplicaInfo.DeserializeUnhealthyReplicaInfo(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new TroubleshootingAdditionalProperties(unhealthyReplicaInfo, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(TroubleshootingAdditionalProperties)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + TroubleshootingAdditionalProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual TroubleshootingAdditionalProperties PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeTroubleshootingAdditionalProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TroubleshootingAdditionalProperties)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.cs new file mode 100644 index 000000000000..d0560b279a0c --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// SQL VM Troubleshooting additional properties. + internal partial class TroubleshootingAdditionalProperties + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public TroubleshootingAdditionalProperties() + { + } + + /// Initializes a new instance of . + /// The unhealthy replica information. + /// Keeps track of any properties unknown to the library. + internal TroubleshootingAdditionalProperties(UnhealthyReplicaInfo unhealthyReplicaInfo, IDictionary additionalBinaryDataProperties) + { + UnhealthyReplicaInfo = unhealthyReplicaInfo; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The unhealthy replica information. + internal UnhealthyReplicaInfo UnhealthyReplicaInfo { get; set; } + + /// The name of the availability group. + public string UnhealthyReplicaInfoAvailabilityGroupName + { + get + { + return UnhealthyReplicaInfo is null ? default : UnhealthyReplicaInfo.AvailabilityGroupName; + } + set + { + if (UnhealthyReplicaInfo is null) + { + UnhealthyReplicaInfo = new UnhealthyReplicaInfo(); + } + UnhealthyReplicaInfo.AvailabilityGroupName = value; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingScenario.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingScenario.cs new file mode 100644 index 000000000000..2bc0e94c5049 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingScenario.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// SQL VM troubleshooting scenario. + public readonly partial struct TroubleshootingScenario : IEquatable + { + private readonly string _value; + private const string UnhealthyReplicaValue = "UnhealthyReplica"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public TroubleshootingScenario(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Gets the UnhealthyReplica. + public static TroubleshootingScenario UnhealthyReplica { get; } = new TroubleshootingScenario(UnhealthyReplicaValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(TroubleshootingScenario left, TroubleshootingScenario right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(TroubleshootingScenario left, TroubleshootingScenario right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator TroubleshootingScenario(string value) => new TroubleshootingScenario(value); + + /// Converts a string to a . + /// The value. + public static implicit operator TroubleshootingScenario?(string value) => value == null ? null : new TroubleshootingScenario(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is TroubleshootingScenario other && Equals(other); + + /// + public bool Equals(TroubleshootingScenario other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.Serialization.cs new file mode 100644 index 000000000000..6c8599536a75 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.Serialization.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Status of last troubleshooting operation on this SQL VM. + public partial class TroubleshootingStatus : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TroubleshootingStatus)} does not support writing '{format}' format."); + } + if (options.Format != "W" && Optional.IsDefined(RootCause)) + { + writer.WritePropertyName("rootCause"u8); + writer.WriteStringValue(RootCause); + } + if (options.Format != "W" && Optional.IsDefined(LastTriggerTimeUtc)) + { + writer.WritePropertyName("lastTriggerTimeUtc"u8); + writer.WriteStringValue(LastTriggerTimeUtc.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(StartTimeUtc)) + { + writer.WritePropertyName("startTimeUtc"u8); + writer.WriteStringValue(StartTimeUtc.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(EndTimeUtc)) + { + writer.WritePropertyName("endTimeUtc"u8); + writer.WriteStringValue(EndTimeUtc.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(TroubleshootingScenario)) + { + writer.WritePropertyName("troubleshootingScenario"u8); + writer.WriteStringValue(TroubleshootingScenario.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + TroubleshootingStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual TroubleshootingStatus JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TroubleshootingStatus)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTroubleshootingStatus(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static TroubleshootingStatus DeserializeTroubleshootingStatus(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string rootCause = default; + DateTimeOffset? lastTriggerTimeUtc = default; + DateTimeOffset? startTimeUtc = default; + DateTimeOffset? endTimeUtc = default; + TroubleshootingScenario? troubleshootingScenario = default; + TroubleshootingAdditionalProperties properties = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("rootCause"u8)) + { + rootCause = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("lastTriggerTimeUtc"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastTriggerTimeUtc = prop.Value.GetDateTimeOffset("O"); + continue; + } + if (prop.NameEquals("startTimeUtc"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTimeUtc = prop.Value.GetDateTimeOffset("O"); + continue; + } + if (prop.NameEquals("endTimeUtc"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTimeUtc = prop.Value.GetDateTimeOffset("O"); + continue; + } + if (prop.NameEquals("troubleshootingScenario"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + troubleshootingScenario = new TroubleshootingScenario(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = TroubleshootingAdditionalProperties.DeserializeTroubleshootingAdditionalProperties(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new TroubleshootingStatus( + rootCause, + lastTriggerTimeUtc, + startTimeUtc, + endTimeUtc, + troubleshootingScenario, + properties, + additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(TroubleshootingStatus)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + TroubleshootingStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual TroubleshootingStatus PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeTroubleshootingStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TroubleshootingStatus)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.cs new file mode 100644 index 000000000000..d6b4d1a6a704 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Status of last troubleshooting operation on this SQL VM. + public partial class TroubleshootingStatus + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal TroubleshootingStatus() + { + } + + /// Initializes a new instance of . + /// Root cause of the issue. + /// Last troubleshooting trigger time in UTC timezone. + /// Start time in UTC timezone. + /// End time in UTC timezone. + /// SQL VM troubleshooting scenario. + /// Troubleshooting properties. + /// Keeps track of any properties unknown to the library. + internal TroubleshootingStatus(string rootCause, DateTimeOffset? lastTriggerTimeUtc, DateTimeOffset? startTimeUtc, DateTimeOffset? endTimeUtc, TroubleshootingScenario? troubleshootingScenario, TroubleshootingAdditionalProperties properties, IDictionary additionalBinaryDataProperties) + { + RootCause = rootCause; + LastTriggerTimeUtc = lastTriggerTimeUtc; + StartTimeUtc = startTimeUtc; + EndTimeUtc = endTimeUtc; + TroubleshootingScenario = troubleshootingScenario; + Properties = properties; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Root cause of the issue. + public string RootCause { get; } + + /// Last troubleshooting trigger time in UTC timezone. + public DateTimeOffset? LastTriggerTimeUtc { get; } + + /// Start time in UTC timezone. + public DateTimeOffset? StartTimeUtc { get; } + + /// End time in UTC timezone. + public DateTimeOffset? EndTimeUtc { get; } + + /// SQL VM troubleshooting scenario. + public TroubleshootingScenario? TroubleshootingScenario { get; } + + /// Troubleshooting properties. + internal TroubleshootingAdditionalProperties Properties { get; } + + /// The name of the availability group. + public string TroubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName + { + get + { + return Properties.UnhealthyReplicaInfoAvailabilityGroupName; + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/UnhealthyReplicaInfo.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/UnhealthyReplicaInfo.Serialization.cs new file mode 100644 index 000000000000..9414c19e72c2 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/UnhealthyReplicaInfo.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// SQL VM Troubleshoot UnhealthyReplica scenario information. + internal partial class UnhealthyReplicaInfo : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnhealthyReplicaInfo)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(AvailabilityGroupName)) + { + writer.WritePropertyName("availabilityGroupName"u8); + writer.WriteStringValue(AvailabilityGroupName); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + UnhealthyReplicaInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual UnhealthyReplicaInfo JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(UnhealthyReplicaInfo)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUnhealthyReplicaInfo(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnhealthyReplicaInfo DeserializeUnhealthyReplicaInfo(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string availabilityGroupName = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("availabilityGroupName"u8)) + { + availabilityGroupName = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnhealthyReplicaInfo(availabilityGroupName, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(UnhealthyReplicaInfo)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + UnhealthyReplicaInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual UnhealthyReplicaInfo PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeUnhealthyReplicaInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UnhealthyReplicaInfo)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/UnhealthyReplicaInfo.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/UnhealthyReplicaInfo.cs new file mode 100644 index 000000000000..b7c7e5a46c02 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/UnhealthyReplicaInfo.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// SQL VM Troubleshoot UnhealthyReplica scenario information. + internal partial class UnhealthyReplicaInfo + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public UnhealthyReplicaInfo() + { + } + + /// Initializes a new instance of . + /// The name of the availability group. + /// Keeps track of any properties unknown to the library. + internal UnhealthyReplicaInfo(string availabilityGroupName, IDictionary additionalBinaryDataProperties) + { + AvailabilityGroupName = availabilityGroupName; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The name of the availability group. + public string AvailabilityGroupName { get; set; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.Serialization.cs new file mode 100644 index 000000000000..1616631a74f7 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Virtual Machine Identity details used for Sql IaaS extension configurations. + public partial class VirtualMachineIdentity : IJsonModel + { + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineIdentity)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + VirtualMachineIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual VirtualMachineIdentity JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VirtualMachineIdentity)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineIdentity(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static VirtualMachineIdentity DeserializeVirtualMachineIdentity(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + VmIdentityType? @type = default; + ResourceIdentifier resourceId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + @type = new VmIdentityType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("resourceId"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new VirtualMachineIdentity(@type, resourceId, additionalBinaryDataProperties); + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); + default: + throw new FormatException($"The model {nameof(VirtualMachineIdentity)} does not support writing '{options.Format}' format."); + } + } + + /// The data to parse. + /// The client options for reading and writing models. + VirtualMachineIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual VirtualMachineIdentity PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeVirtualMachineIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineIdentity)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.cs new file mode 100644 index 000000000000..64872c62ba6d --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Virtual Machine Identity details used for Sql IaaS extension configurations. + public partial class VirtualMachineIdentity + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public VirtualMachineIdentity() + { + } + + /// Initializes a new instance of . + /// Identity type of the virtual machine. Specify None to opt-out of Managed Identities. + /// ARM Resource Id of the identity. Only required when UserAssigned identity is selected. + /// Keeps track of any properties unknown to the library. + internal VirtualMachineIdentity(VmIdentityType? @type, ResourceIdentifier resourceId, IDictionary additionalBinaryDataProperties) + { + Type = @type; + ResourceId = resourceId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Identity type of the virtual machine. Specify None to opt-out of Managed Identities. + public VmIdentityType? Type { get; set; } + + /// ARM Resource Id of the identity. Only required when UserAssigned identity is selected. + public ResourceIdentifier ResourceId { get; set; } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VmIdentityType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VmIdentityType.cs new file mode 100644 index 000000000000..7b611d6a7622 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VmIdentityType.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Identity type of the virtual machine. Specify None to opt-out of Managed Identities. + public readonly partial struct VmIdentityType : IEquatable + { + private readonly string _value; + private const string NoneValue = "None"; + private const string SystemAssignedValue = "SystemAssigned"; + private const string UserAssignedValue = "UserAssigned"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public VmIdentityType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Gets the None. + public static VmIdentityType None { get; } = new VmIdentityType(NoneValue); + + /// Gets the SystemAssigned. + public static VmIdentityType SystemAssigned { get; } = new VmIdentityType(SystemAssignedValue); + + /// Gets the UserAssigned. + public static VmIdentityType UserAssigned { get; } = new VmIdentityType(UserAssignedValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(VmIdentityType left, VmIdentityType right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(VmIdentityType left, VmIdentityType right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator VmIdentityType(string value) => new VmIdentityType(value); + + /// Converts a string to a . + /// The value. + public static implicit operator VmIdentityType?(string value) => value == null ? null : new VmIdentityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is VmIdentityType other && Equals(other); + + /// + public bool Equals(VmIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.Serialization.cs index 0a65e8708912..4ffdad2ab9c3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class WindowsServerFailoverClusterDomainCredentials : IUtf8JsonSerializable, IJsonModel + /// Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. + public partial class WindowsServerFailoverClusterDomainCredentials : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWri /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(WindowsServerFailoverClusterDomainCredentials)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ClusterBootstrapAccountPassword)) { writer.WritePropertyName("clusterBootstrapAccountPassword"u8); @@ -49,15 +49,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("sqlServiceAccountPassword"u8); writer.WriteStringValue(SqlServiceAccountPassword); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -66,22 +66,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - WindowsServerFailoverClusterDomainCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + WindowsServerFailoverClusterDomainCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual WindowsServerFailoverClusterDomainCredentials JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(WindowsServerFailoverClusterDomainCredentials)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeWindowsServerFailoverClusterDomainCredentials(document.RootElement, options); } - internal static WindowsServerFailoverClusterDomainCredentials DeserializeWindowsServerFailoverClusterDomainCredentials(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static WindowsServerFailoverClusterDomainCredentials DeserializeWindowsServerFailoverClusterDomainCredentials(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; @@ -89,38 +94,39 @@ internal static WindowsServerFailoverClusterDomainCredentials DeserializeWindows string clusterBootstrapAccountPassword = default; string clusterOperatorAccountPassword = default; string sqlServiceAccountPassword = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("clusterBootstrapAccountPassword"u8)) + if (prop.NameEquals("clusterBootstrapAccountPassword"u8)) { - clusterBootstrapAccountPassword = property.Value.GetString(); + clusterBootstrapAccountPassword = prop.Value.GetString(); continue; } - if (property.NameEquals("clusterOperatorAccountPassword"u8)) + if (prop.NameEquals("clusterOperatorAccountPassword"u8)) { - clusterOperatorAccountPassword = property.Value.GetString(); + clusterOperatorAccountPassword = prop.Value.GetString(); continue; } - if (property.NameEquals("sqlServiceAccountPassword"u8)) + if (prop.NameEquals("sqlServiceAccountPassword"u8)) { - sqlServiceAccountPassword = property.Value.GetString(); + sqlServiceAccountPassword = prop.Value.GetString(); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; - return new WindowsServerFailoverClusterDomainCredentials(clusterBootstrapAccountPassword, clusterOperatorAccountPassword, sqlServiceAccountPassword, serializedAdditionalRawData); + return new WindowsServerFailoverClusterDomainCredentials(clusterBootstrapAccountPassword, clusterOperatorAccountPassword, sqlServiceAccountPassword, additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -130,15 +136,20 @@ BinaryData IPersistableModel.Writ } } - WindowsServerFailoverClusterDomainCredentials IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + WindowsServerFailoverClusterDomainCredentials IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual WindowsServerFailoverClusterDomainCredentials PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeWindowsServerFailoverClusterDomainCredentials(document.RootElement, options); } default: @@ -146,6 +157,7 @@ WindowsServerFailoverClusterDomainCredentials IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.cs index f1036060bd29..1d1cfb01b17a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. public partial class WindowsServerFailoverClusterDomainCredentials { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public WindowsServerFailoverClusterDomainCredentials() @@ -54,19 +25,21 @@ public WindowsServerFailoverClusterDomainCredentials() /// Cluster bootstrap account password. /// Cluster operator account password. /// SQL service account password. - /// Keeps track of any properties unknown to the library. - internal WindowsServerFailoverClusterDomainCredentials(string clusterBootstrapAccountPassword, string clusterOperatorAccountPassword, string sqlServiceAccountPassword, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal WindowsServerFailoverClusterDomainCredentials(string clusterBootstrapAccountPassword, string clusterOperatorAccountPassword, string sqlServiceAccountPassword, IDictionary additionalBinaryDataProperties) { ClusterBootstrapAccountPassword = clusterBootstrapAccountPassword; ClusterOperatorAccountPassword = clusterOperatorAccountPassword; SqlServiceAccountPassword = sqlServiceAccountPassword; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Cluster bootstrap account password. public string ClusterBootstrapAccountPassword { get; set; } + /// Cluster operator account password. public string ClusterOperatorAccountPassword { get; set; } + /// SQL service account password. public string SqlServiceAccountPassword { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.Serialization.cs index 30dd82e012a7..6b80ed2932fc 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.Serialization.cs @@ -9,14 +9,15 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Text.Json; -using Azure.Core; +using Azure.ResourceManager.SqlVirtualMachine; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class WindowsServerFailoverClusterDomainProfile : IUtf8JsonSerializable, IJsonModel + /// Active Directory account details to operate Windows Server Failover Cluster. + public partial class WindowsServerFailoverClusterDomainProfile : IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -28,12 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(WindowsServerFailoverClusterDomainProfile)} does not support writing '{format}' format."); } - if (Optional.IsDefined(DomainFqdn)) { writer.WritePropertyName("domainFqdn"u8); @@ -59,6 +59,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("sqlServiceAccount"u8); writer.WriteStringValue(SqlServiceAccount); } + if (Optional.IsDefined(IsSqlServiceAccountGmsa)) + { + writer.WritePropertyName("isSqlServiceAccountGmsa"u8); + writer.WriteBooleanValue(IsSqlServiceAccountGmsa.Value); + } if (Optional.IsDefined(FileShareWitnessPath)) { writer.WritePropertyName("fileShareWitnessPath"u8); @@ -79,15 +84,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("clusterSubnetType"u8); writer.WriteStringValue(ClusterSubnetType.Value.ToString()); } - if (options.Format != "W" && _serializedAdditionalRawData != null) + if (options.Format != "W" && _additionalBinaryDataProperties != null) { - foreach (var item in _serializedAdditionalRawData) + foreach (var item in _additionalBinaryDataProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); + writer.WriteRawValue(item.Value); #else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + using (JsonDocument document = JsonDocument.Parse(item.Value)) { JsonSerializer.Serialize(writer, document.RootElement); } @@ -96,115 +101,132 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - WindowsServerFailoverClusterDomainProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + WindowsServerFailoverClusterDomainProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual WindowsServerFailoverClusterDomainProfile JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(WindowsServerFailoverClusterDomainProfile)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeWindowsServerFailoverClusterDomainProfile(document.RootElement, options); } - internal static WindowsServerFailoverClusterDomainProfile DeserializeWindowsServerFailoverClusterDomainProfile(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static WindowsServerFailoverClusterDomainProfile DeserializeWindowsServerFailoverClusterDomainProfile(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } string domainFqdn = default; - string ouPath = default; + string organizationalUnitPath = default; string clusterBootstrapAccount = default; string clusterOperatorAccount = default; string sqlServiceAccount = default; + bool? isSqlServiceAccountGmsa = default; string fileShareWitnessPath = default; - Uri storageAccountUrl = default; + Uri storageAccountUri = default; string storageAccountPrimaryKey = default; SqlVmClusterSubnetType? clusterSubnetType = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("domainFqdn"u8)) + if (prop.NameEquals("domainFqdn"u8)) { - domainFqdn = property.Value.GetString(); + domainFqdn = prop.Value.GetString(); continue; } - if (property.NameEquals("ouPath"u8)) + if (prop.NameEquals("ouPath"u8)) { - ouPath = property.Value.GetString(); + organizationalUnitPath = prop.Value.GetString(); continue; } - if (property.NameEquals("clusterBootstrapAccount"u8)) + if (prop.NameEquals("clusterBootstrapAccount"u8)) { - clusterBootstrapAccount = property.Value.GetString(); + clusterBootstrapAccount = prop.Value.GetString(); continue; } - if (property.NameEquals("clusterOperatorAccount"u8)) + if (prop.NameEquals("clusterOperatorAccount"u8)) { - clusterOperatorAccount = property.Value.GetString(); + clusterOperatorAccount = prop.Value.GetString(); continue; } - if (property.NameEquals("sqlServiceAccount"u8)) + if (prop.NameEquals("sqlServiceAccount"u8)) { - sqlServiceAccount = property.Value.GetString(); + sqlServiceAccount = prop.Value.GetString(); continue; } - if (property.NameEquals("fileShareWitnessPath"u8)) + if (prop.NameEquals("isSqlServiceAccountGmsa"u8)) { - fileShareWitnessPath = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSqlServiceAccountGmsa = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("fileShareWitnessPath"u8)) + { + fileShareWitnessPath = prop.Value.GetString(); continue; } - if (property.NameEquals("storageAccountUrl"u8)) + if (prop.NameEquals("storageAccountUrl"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - storageAccountUrl = new Uri(property.Value.GetString()); + storageAccountUri = string.IsNullOrEmpty(prop.Value.GetString()) ? null : new Uri(prop.Value.GetString()); continue; } - if (property.NameEquals("storageAccountPrimaryKey"u8)) + if (prop.NameEquals("storageAccountPrimaryKey"u8)) { - storageAccountPrimaryKey = property.Value.GetString(); + storageAccountPrimaryKey = prop.Value.GetString(); continue; } - if (property.NameEquals("clusterSubnetType"u8)) + if (prop.NameEquals("clusterSubnetType"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - clusterSubnetType = new SqlVmClusterSubnetType(property.Value.GetString()); + clusterSubnetType = new SqlVmClusterSubnetType(prop.Value.GetString()); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new WindowsServerFailoverClusterDomainProfile( domainFqdn, - ouPath, + organizationalUnitPath, clusterBootstrapAccount, clusterOperatorAccount, sqlServiceAccount, + isSqlServiceAccountGmsa, fileShareWitnessPath, - storageAccountUrl, + storageAccountUri, storageAccountPrimaryKey, clusterSubnetType, - serializedAdditionalRawData); + additionalBinaryDataProperties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -214,15 +236,20 @@ BinaryData IPersistableModel.Write(Mo } } - WindowsServerFailoverClusterDomainProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + WindowsServerFailoverClusterDomainProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual WindowsServerFailoverClusterDomainProfile PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeWindowsServerFailoverClusterDomainProfile(document.RootElement, options); } default: @@ -230,6 +257,7 @@ WindowsServerFailoverClusterDomainProfile IPersistableModel The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.cs index 521146dc1174..263fa034d85d 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.cs @@ -13,37 +13,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Active Directory account details to operate Windows Server Failover Cluster. public partial class WindowsServerFailoverClusterDomainProfile { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . public WindowsServerFailoverClusterDomainProfile() @@ -56,41 +27,54 @@ public WindowsServerFailoverClusterDomainProfile() /// Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain). /// 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 under which SQL service will run on all participating SQL virtual machines in the cluster. + /// The flag to check if SQL service account is GMSA. /// Optional path for fileshare witness. /// Fully qualified ARM resource id of the witness storage account. /// Primary key of the witness storage account. /// Cluster subnet type. - /// Keeps track of any properties unknown to the library. - internal WindowsServerFailoverClusterDomainProfile(string domainFqdn, string organizationalUnitPath, string clusterBootstrapAccount, string clusterOperatorAccount, string sqlServiceAccount, string fileShareWitnessPath, Uri storageAccountUri, string storageAccountPrimaryKey, SqlVmClusterSubnetType? clusterSubnetType, IDictionary serializedAdditionalRawData) + /// Keeps track of any properties unknown to the library. + internal WindowsServerFailoverClusterDomainProfile(string domainFqdn, string organizationalUnitPath, string clusterBootstrapAccount, string clusterOperatorAccount, string sqlServiceAccount, bool? isSqlServiceAccountGmsa, string fileShareWitnessPath, Uri storageAccountUri, string storageAccountPrimaryKey, SqlVmClusterSubnetType? clusterSubnetType, IDictionary additionalBinaryDataProperties) { DomainFqdn = domainFqdn; OrganizationalUnitPath = organizationalUnitPath; ClusterBootstrapAccount = clusterBootstrapAccount; ClusterOperatorAccount = clusterOperatorAccount; SqlServiceAccount = sqlServiceAccount; + IsSqlServiceAccountGmsa = isSqlServiceAccountGmsa; FileShareWitnessPath = fileShareWitnessPath; StorageAccountUri = storageAccountUri; StorageAccountPrimaryKey = storageAccountPrimaryKey; ClusterSubnetType = clusterSubnetType; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; } /// Fully qualified name of the domain. public string DomainFqdn { get; set; } + /// Organizational Unit path in which the nodes and cluster will be present. public string OrganizationalUnitPath { get; set; } + /// Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain). public string ClusterBootstrapAccount { get; set; } + /// Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster. public string ClusterOperatorAccount { get; set; } + /// Account name under which SQL service will run on all participating SQL virtual machines in the cluster. public string SqlServiceAccount { get; set; } + + /// The flag to check if SQL service account is GMSA. + public bool? IsSqlServiceAccountGmsa { get; set; } + /// Optional path for fileshare witness. public string FileShareWitnessPath { get; set; } + /// Fully qualified ARM resource id of the witness storage account. public Uri StorageAccountUri { get; set; } + /// Primary key of the witness storage account. public string StorageAccountPrimaryKey { get; set; } + /// Cluster subnet type. public SqlVmClusterSubnetType? ClusterSubnetType { get; set; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ProviderConstants.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ProviderConstants.cs index 9ec0e818f5da..0701f0d2e7aa 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ProviderConstants.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ProviderConstants.cs @@ -9,8 +9,9 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - internal static class ProviderConstants + internal static partial class ProviderConstants { + /// Gets the DefaultProviderNamespace. public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs index 929a1fe333c5..c0a0ba2b4d8d 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs @@ -6,519 +6,139 @@ #nullable disable using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { - internal partial class AvailabilityGroupListenersRestOperations + internal partial class AvailabilityGroupListeners { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of AvailabilityGroupListenersRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public AvailabilityGroupListenersRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// Initializes a new instance of AvailabilityGroupListeners for mocking. + protected AvailabilityGroupListeners() { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, string expand) + /// Initializes a new instance of AvailabilityGroupListeners. + /// The ClientDiagnostics is used to provide tracing support for the client library. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal AvailabilityGroupListeners(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); - uri.AppendPath("/availabilityGroupListeners/", false); - uri.AppendPath(availabilityGroupListenerName, true); - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - return uri; + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, string expand) + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, string expand, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendPath("/availabilityGroupListeners/", false); uri.AppendPath(availabilityGroupListenerName, true); + uri.AppendQuery("api-version", _apiVersion, true); if (expand != null) { uri.AppendQuery("$expand", expand, true); } - uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// Gets an availability group listener. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// Name of the availability group listener. - /// The child resources to include in the response. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName, expand); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AvailabilityGroupListenerData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AvailabilityGroupListenerData.DeserializeAvailabilityGroupListenerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AvailabilityGroupListenerData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets an availability group listener. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// Name of the availability group listener. - /// The child resources to include in the response. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName, expand); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AvailabilityGroupListenerData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AvailabilityGroupListenerData.DeserializeAvailabilityGroupListenerData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AvailabilityGroupListenerData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, AvailabilityGroupListenerData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, RequestContent content, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); - uri.AppendPath("/availabilityGroupListeners/", false); - uri.AppendPath(availabilityGroupListenerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, AvailabilityGroupListenerData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendPath("/availabilityGroupListeners/", false); uri.AppendPath(availabilityGroupListenerName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Creates or updates an availability group listener. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// Name of the availability group listener. - /// The availability group listener. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, AvailabilityGroupListenerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates an availability group listener. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// Name of the availability group listener. - /// The availability group listener. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, AvailabilityGroupListenerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); - uri.AppendPath("/availabilityGroupListeners/", false); - uri.AppendPath(availabilityGroupListenerName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendPath("/availabilityGroupListeners/", false); uri.AppendPath(availabilityGroupListenerName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - _userAgent.Apply(message); + request.Method = RequestMethod.Delete; return message; } - /// Deletes an availability group listener. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// Name of the availability group listener. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes an availability group listener. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// Name of the availability group listener. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByGroupRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); - uri.AppendPath("/availabilityGroupListeners", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByGroupRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal HttpMessage CreateGetByGroupRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendPath("/availabilityGroupListeners", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// Lists all availability group listeners in a SQL virtual machine group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByGroupAsync(string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateListByGroupRequest(subscriptionId, resourceGroupName, sqlVmGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AvailabilityGroupListenerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AvailabilityGroupListenerListResult.DeserializeAvailabilityGroupListenerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all availability group listeners in a SQL virtual machine group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByGroup(string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateListByGroupRequest(subscriptionId, resourceGroupName, sqlVmGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AvailabilityGroupListenerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AvailabilityGroupListenerListResult.DeserializeAvailabilityGroupListenerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal HttpMessage CreateNextGetByGroupRequest(Uri nextPage, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - - /// Lists all availability group listeners in a SQL virtual machine group. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateListByGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVmGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - AvailabilityGroupListenerListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AvailabilityGroupListenerListResult.DeserializeAvailabilityGroupListenerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all availability group listeners in a SQL virtual machine group. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateListByGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVmGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - AvailabilityGroupListenerListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AvailabilityGroupListenerListResult.DeserializeAvailabilityGroupListenerListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/OperationsRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/OperationsRestOperations.cs new file mode 100644 index 000000000000..1d7ff9cf5f4a --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/OperationsRestOperations.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class Operations + { + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of Operations for mocking. + protected Operations() + { + } + + /// Initializes a new instance of Operations. + /// The ClientDiagnostics is used to provide tracing support for the client library. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal Operations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; + } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + internal HttpMessage CreateGetAllRequest(RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/operations", false); + uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateNextGetAllRequest(Uri nextPage, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs index cb13b94d9c41..50ca51962d3b 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs @@ -6,418 +6,123 @@ #nullable disable using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { - internal partial class SqlVirtualMachineGroupsRestOperations + internal partial class SqlVirtualMachineGroups { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of SqlVirtualMachineGroupsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public SqlVirtualMachineGroupsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + /// Initializes a new instance of SqlVirtualMachineGroups for mocking. + protected SqlVirtualMachineGroups() { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets a SQL virtual machine group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) + /// Initializes a new instance of SqlVirtualMachineGroups. + /// The ClientDiagnostics is used to provide tracing support for the client library. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal SqlVirtualMachineGroups(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmGroupData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmGroupData.DeserializeSqlVmGroupData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((SqlVmGroupData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; } - /// Gets a SQL virtual machine group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmGroupData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmGroupData.DeserializeSqlVmGroupData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((SqlVmGroupData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupData data) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); - return uri; + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Creates or updates a SQL virtual machine group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The SQL virtual machine group. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupData data, CancellationToken cancellationToken = default) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContent content, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a SQL virtual machine group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The SQL virtual machine group. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - _userAgent.Apply(message); + request.Method = RequestMethod.Patch; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); + request.Content = content; return message; } - /// Deletes a SQL virtual machine group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a SQL virtual machine group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupPatch patch) - { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupPatch patch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); + request.Method = RequestMethod.Delete; return message; } - /// Updates SQL virtual machine group tags. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The SQL virtual machine group. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupPatch patch, CancellationToken cancellationToken = default) + internal HttpMessage CreateGetByResourceGroupRequest(string subscriptionId, string resourceGroupName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates SQL virtual machine group tags. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The SQL virtual machine group. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); @@ -425,298 +130,52 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// Gets all SQL virtual machine groups in a resource group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmGroupListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets all SQL virtual machine groups in a resource group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmGroupListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + internal HttpMessage CreateNextGetByResourceGroupRequest(Uri nextPage, string subscriptionId, string resourceGroupName, RequestContext context) { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateListRequest(string subscriptionId) + internal HttpMessage CreateGetAllRequest(string subscriptionId, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets all SQL virtual machine groups in a subscription. - /// Subscription ID that identifies an Azure subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmGroupListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets all SQL virtual machine groups in a subscription. - /// Subscription ID that identifies an Azure subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmGroupListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Headers.SetValue("Accept", "application/json"); return message; } - /// Gets all SQL virtual machine groups in a resource group. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmGroupListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets all SQL virtual machine groups in a resource group. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + internal HttpMessage CreateNextGetAllRequest(Uri nextPage, string subscriptionId, RequestContext context) { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmGroupListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - - /// Gets all SQL virtual machine groups in a subscription. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmGroupListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets all SQL virtual machine groups in a subscription. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmGroupListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineTroubleshootRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineTroubleshootRestOperations.cs new file mode 100644 index 000000000000..d4b7fccc0f40 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineTroubleshootRestOperations.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class SqlVirtualMachineTroubleshoot + { + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SqlVirtualMachineTroubleshoot for mocking. + protected SqlVirtualMachineTroubleshoot() + { + } + + /// Initializes a new instance of SqlVirtualMachineTroubleshoot. + /// The ClientDiagnostics is used to provide tracing support for the client library. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal SqlVirtualMachineTroubleshoot(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; + } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + internal HttpMessage CreateTroubleshootRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContent content, RequestContext context) + { + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); + uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath("/troubleshoot", false); + uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); + request.Content = content; + return message; + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs index 95996a6d8976..a9e6de3fcfab 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs @@ -6,1075 +6,271 @@ #nullable disable using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; -using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { - internal partial class SqlVirtualMachinesRestOperations + internal partial class SqlVirtualMachines { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of SqlVirtualMachinesRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public SqlVirtualMachinesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) - { - _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); - _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-01"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal RequestUriBuilder CreateListBySqlVmGroupRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); - uri.AppendPath("/sqlVirtualMachines", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateListBySqlVmGroupRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVmGroupName, true); - uri.AppendPath("/sqlVirtualMachines", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the list of sql virtual machines in a SQL virtual machine group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListBySqlVmGroupAsync(string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateListBySqlVmGroupRequest(subscriptionId, resourceGroupName, sqlVmGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the list of sql virtual machines in a SQL virtual machine group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListBySqlVmGroup(string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateListBySqlVmGroupRequest(subscriptionId, resourceGroupName, sqlVmGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + /// Initializes a new instance of SqlVirtualMachines for mocking. + protected SqlVirtualMachines() { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; } - internal HttpMessage CreateListRequest(string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets all SQL virtual machines in a subscription. - /// Subscription ID that identifies an Azure subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + /// Initializes a new instance of SqlVirtualMachines. + /// The ClientDiagnostics is used to provide tracing support for the client library. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal SqlVirtualMachines(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } + ClientDiagnostics = clientDiagnostics; + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; } - /// Gets all SQL virtual machines in a subscription. - /// Subscription ID that identifies an Azure subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline { get; } - using var message = CreateListRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName, string expand) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, string expand, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); - if (expand != null) - { - uri.AppendQuery("$expand", expand, true); - } + uri.AppendPath(sqlVirtualMachineName, true); uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVmName, string expand) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); if (expand != null) { uri.AppendQuery("$expand", expand, true); } - uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// Gets a SQL virtual machine. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The child resources to include in the response. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sqlVmName, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmName, expand); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmData.DeserializeSqlVmData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((SqlVmData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets a SQL virtual machine. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The child resources to include in the response. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string sqlVmName, string expand = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmName, expand); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmData.DeserializeSqlVmData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((SqlVmData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContent content, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); + uri.AppendPath(sqlVirtualMachineName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Method = RequestMethod.Put; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); request.Content = content; - _userAgent.Apply(message); return message; } - /// Creates or updates a SQL virtual machine. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The SQL virtual machine. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Creates or updates a SQL virtual machine. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The SQL virtual machine. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmData data, CancellationToken cancellationToken = default) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContent content, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVmName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); + uri.AppendPath(sqlVirtualMachineName, true); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - _userAgent.Apply(message); + request.Method = RequestMethod.Patch; + request.Headers.SetValue("Content-Type", "application/json"); + request.Headers.SetValue("Accept", "application/json"); + request.Content = content; return message; } - /// Deletes a SQL virtual machine. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sqlVmName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Deletes a SQL virtual machine. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string sqlVmName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); + uri.AppendPath(sqlVirtualMachineName, true); uri.AppendQuery("api-version", _apiVersion, true); - return uri; + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Delete; + return message; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmPatch patch) + internal HttpMessage CreateGetByResourceGroupRequest(string subscriptionId, string resourceGroupName, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); + uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// Updates a SQL virtual machine. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The SQL virtual machine. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVmName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates a SQL virtual machine. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The SQL virtual machine. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmPatch patch, CancellationToken cancellationToken = default) + internal HttpMessage CreateNextGetByResourceGroupRequest(Uri nextPage, string subscriptionId, string resourceGroupName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVmName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateGetAllRequest(string subscriptionId, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); return message; } - /// Gets all SQL virtual machines in a resource group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + internal HttpMessage CreateNextGetAllRequest(Uri nextPage, string subscriptionId, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets all SQL virtual machines in a resource group. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Get; + request.Headers.SetValue("Accept", "application/json"); + return message; } - internal RequestUriBuilder CreateRedeployRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName) + internal HttpMessage CreateStartAssessmentRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContext context) { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); - uri.AppendPath("/redeploy", false); + uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath("/startAssessment", false); uri.AppendQuery("api-version", _apiVersion, true); - return uri; + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + return message; } - internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourceGroupName, string sqlVmName) + internal HttpMessage CreateFetchDCAssessmentRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContent content, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); - uri.AppendPath("/redeploy", false); + uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath("/fetchDCAssessment", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - _userAgent.Apply(message); + request.Method = RequestMethod.Post; + request.Headers.SetValue("Content-Type", "application/json"); + request.Content = content; return message; } - /// Uninstalls and reinstalls the SQL Iaas Extension. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task RedeployAsync(string subscriptionId, string resourceGroupName, string sqlVmName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - - using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, sqlVmName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Uninstalls and reinstalls the SQL Iaas Extension. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Redeploy(string subscriptionId, string resourceGroupName, string sqlVmName, CancellationToken cancellationToken = default) + internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContext context) { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - - using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, sqlVmName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateStartAssessmentRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName) - { - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); - uri.AppendPath("/startAssessment", false); + uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath("/redeploy", false); uri.AppendQuery("api-version", _apiVersion, true); - return uri; + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; + request.Uri = uri; + request.Method = RequestMethod.Post; + return message; } - internal HttpMessage CreateStartAssessmentRequest(string subscriptionId, string resourceGroupName, string sqlVmName) + internal HttpMessage CreateGetSqlVmsBySqlVmGroupRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVmName, true); - uri.AppendPath("/startAssessment", false); + uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); + uri.AppendPath(sqlVirtualMachineGroupName, true); + uri.AppendPath("/sqlVirtualMachines", false); uri.AppendQuery("api-version", _apiVersion, true); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - _userAgent.Apply(message); - return message; - } - - /// Starts Assessment on SQL virtual machine. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task StartAssessmentAsync(string subscriptionId, string resourceGroupName, string sqlVmName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - - using var message = CreateStartAssessmentRequest(subscriptionId, resourceGroupName, sqlVmName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Starts Assessment on SQL virtual machine. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response StartAssessment(string subscriptionId, string resourceGroupName, string sqlVmName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - - using var message = CreateStartAssessmentRequest(subscriptionId, resourceGroupName, sqlVmName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListBySqlVmGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListBySqlVmGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Headers.SetValue("Accept", "application/json"); return message; } - /// Gets the list of sql virtual machines in a SQL virtual machine group. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListBySqlVmGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateListBySqlVmGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVmGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the list of sql virtual machines in a SQL virtual machine group. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// Name of the SQL virtual machine group. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListBySqlVmGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - - using var message = CreateListBySqlVmGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVmGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateNextGetSqlVmsBySqlVmGroupRequest(Uri nextPage, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + RawRequestUriBuilder uri = new RawRequestUriBuilder(); + uri.Reset(nextPage); + HttpMessage message = Pipeline.CreateMessage(); + Request request = message.Request; request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets all SQL virtual machines in a subscription. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets all SQL virtual machines in a subscription. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - return uri; - } - - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); + request.Headers.SetValue("Accept", "application/json"); return message; } - - /// Gets all SQL virtual machines in a resource group. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets all SQL virtual machines in a resource group. - /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. - /// Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SqlVmListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs index 848b0e2394d3..0e9858e521a2 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs @@ -8,12 +8,13 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using Autorest.CSharp.Core; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.SqlVirtualMachine @@ -25,73 +26,88 @@ namespace Azure.ResourceManager.SqlVirtualMachine /// public partial class SqlVmCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _sqlVmSqlVirtualMachinesClientDiagnostics; - private readonly SqlVirtualMachinesRestOperations _sqlVmSqlVirtualMachinesRestClient; + private readonly ClientDiagnostics _sqlVirtualMachinesClientDiagnostics; + private readonly SqlVirtualMachines _sqlVirtualMachinesRestClient; + private readonly ClientDiagnostics _sqlVirtualMachineTroubleshootClientDiagnostics; + private readonly SqlVirtualMachineTroubleshoot _sqlVirtualMachineTroubleshootRestClient; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of SqlVmCollection for mocking. protected SqlVmCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. + /// The identifier of the resource that is the target of operations. internal SqlVmCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _sqlVmSqlVirtualMachinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVmResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(SqlVmResource.ResourceType, out string sqlVmSqlVirtualMachinesApiVersion); - _sqlVmSqlVirtualMachinesRestClient = new SqlVirtualMachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlVmSqlVirtualMachinesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif + TryGetApiVersion(SqlVmResource.ResourceType, out string sqlVmApiVersion); + _sqlVirtualMachinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVmResource.ResourceType.Namespace, Diagnostics); + _sqlVirtualMachinesRestClient = new SqlVirtualMachines(_sqlVirtualMachinesClientDiagnostics, Pipeline, Endpoint, sqlVmApiVersion ?? "2023-10-01"); + _sqlVirtualMachineTroubleshootClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVmResource.ResourceType.Namespace, Diagnostics); + _sqlVirtualMachineTroubleshootRestClient = new SqlVirtualMachineTroubleshoot(_sqlVirtualMachineTroubleshootClientDiagnostics, Pipeline, Endpoint, sqlVmApiVersion ?? "2023-10-01"); + ValidateResourceId(id); } + /// + [Conditional("DEBUG")] internal static void ValidateResourceId(ResourceIdentifier id) { if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), id); + } } /// /// Creates or updates a SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_CreateOrUpdate + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachines_CreateOrUpdate. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The SQL virtual machine. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sqlVmName, SqlVmData data, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sqlVirtualMachineName, SqlVmData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.CreateOrUpdate"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, data, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(new SqlVmOperationSource(Client), _sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, _sqlVmSqlVirtualMachinesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, data).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, SqlVmData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new SqlVmOperationSource(Client), + _sqlVirtualMachinesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -105,42 +121,51 @@ public virtual async Task> CreateOrUpdateAsync(WaitU /// Creates or updates a SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Operation Id - /// SqlVirtualMachines_CreateOrUpdate + /// Operation Id. + /// SqlVirtualMachines_CreateOrUpdate. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The SQL virtual machine. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sqlVmName, SqlVmData data, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sqlVirtualMachineName, SqlVmData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.CreateOrUpdate"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.CreateOrUpdate"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, data, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(new SqlVmOperationSource(Client), _sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, _sqlVmSqlVirtualMachinesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, data).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, SqlVmData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new SqlVmOperationSource(Client), + _sqlVirtualMachinesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletion(cancellationToken); + } return operation; } catch (Exception e) @@ -154,39 +179,43 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s /// Gets a SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Operation Id. + /// SqlVirtualMachines_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetAsync(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Get"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Get"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SqlVmData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -200,39 +229,43 @@ public virtual async Task> GetAsync(string sqlVmName, st /// Gets a SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachines_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Get(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Get"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Get"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SqlVmData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -246,50 +279,44 @@ public virtual Response Get(string sqlVmName, string expand = nul /// Gets all SQL virtual machines in a resource group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines. /// /// - /// Operation Id - /// SqlVirtualMachines_ListByResourceGroup + /// Operation Id. + /// SqlVirtualMachines_ListByResourceGroup. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. + /// A collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVmSqlVirtualMachinesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVmSqlVirtualMachinesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlVmResource(Client, SqlVmData.DeserializeSqlVmData(e)), _sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, "SqlVmCollection.GetAll", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new SqlVirtualMachinesGetByResourceGroupAsyncCollectionResultOfT(_sqlVirtualMachinesRestClient, Id.SubscriptionId, Id.ResourceGroupName, context), data => new SqlVmResource(Client, data)); } /// /// Gets all SQL virtual machines in a resource group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines - /// - /// - /// Operation Id - /// SqlVirtualMachines_ListByResourceGroup + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachines_ListByResourceGroup. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// @@ -297,46 +324,62 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cancel /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVmSqlVirtualMachinesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVmSqlVirtualMachinesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlVmResource(Client, SqlVmData.DeserializeSqlVmData(e)), _sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, "SqlVmCollection.GetAll", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new SqlVirtualMachinesGetByResourceGroupCollectionResultOfT(_sqlVirtualMachinesRestClient, Id.SubscriptionId, Id.ResourceGroupName, context), data => new SqlVmResource(Client, data)); } /// /// Checks to see if the resource exists in azure. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Operation Id. + /// SqlVirtualMachines_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> ExistsAsync(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Exists"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Exists"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(SqlVmData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((SqlVmData)null, result); + break; + default: + throw new RequestFailedException(result); + } return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -350,37 +393,51 @@ public virtual async Task> ExistsAsync(string sqlVmName, string e /// Checks to see if the resource exists in azure. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Operation Id. + /// SqlVirtualMachines_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Exists(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Exists"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Exists"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken: cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(SqlVmData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((SqlVmData)null, result); + break; + default: + throw new RequestFailedException(result); + } return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -394,39 +451,55 @@ public virtual Response Exists(string sqlVmName, string expand = null, Can /// Tries to get details for this resource from the service. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachines_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetIfExistsAsync(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.GetIfExists"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.GetIfExists"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(SqlVmData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((SqlVmData)null, result); + break; + default: + throw new RequestFailedException(result); + } if (response.Value == null) + { return new NoValueResponse(response.GetRawResponse()); + } return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -440,39 +513,55 @@ public virtual async Task> GetIfExistsAsync(stri /// Tries to get details for this resource from the service. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Operation Id. + /// SqlVirtualMachines_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual NullableResponse GetIfExists(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.GetIfExists"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.GetIfExists"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken: cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(SqlVmData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((SqlVmData)null, result); + break; + default: + throw new RequestFailedException(result); + } if (response.Value == null) + { return new NoValueResponse(response.GetRawResponse()); + } return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -492,6 +581,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } + /// The cancellation token to use. IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.Serialization.cs index 74628ccb3bc2..410c5a94560e 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.Serialization.cs @@ -8,19 +8,25 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.Net; using System.Text; using System.Text.Json; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { - public partial class SqlVmData : IUtf8JsonSerializable, IJsonModel + /// A SQL virtual machine. + public partial class SqlVmData : TrackedResourceData, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal SqlVmData() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -32,371 +38,160 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); ((IJsonModel)Identity).Write(writer, options); } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(VirtualMachineResourceId)) - { - writer.WritePropertyName("virtualMachineResourceId"u8); - writer.WriteStringValue(VirtualMachineResourceId); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); - } - if (Optional.IsDefined(SqlImageOffer)) - { - writer.WritePropertyName("sqlImageOffer"u8); - writer.WriteStringValue(SqlImageOffer); - } - if (Optional.IsDefined(SqlServerLicenseType)) - { - writer.WritePropertyName("sqlServerLicenseType"u8); - writer.WriteStringValue(SqlServerLicenseType.Value.ToString()); - } - if (Optional.IsDefined(SqlManagement)) - { - writer.WritePropertyName("sqlManagement"u8); - writer.WriteStringValue(SqlManagement.Value.ToString()); - } - if (Optional.IsDefined(SqlImageSku)) - { - writer.WritePropertyName("sqlImageSku"u8); - writer.WriteStringValue(SqlImageSku.Value.ToString()); - } - if (Optional.IsDefined(SqlVmGroupResourceId)) - { - writer.WritePropertyName("sqlVirtualMachineGroupResourceId"u8); - writer.WriteStringValue(SqlVmGroupResourceId); - } - if (Optional.IsDefined(WindowsServerFailoverClusterDomainCredentials)) - { - writer.WritePropertyName("wsfcDomainCredentials"u8); - writer.WriteObjectValue(WindowsServerFailoverClusterDomainCredentials, options); - } - if (Optional.IsDefined(WindowsServerFailoverClusterStaticIP)) - { - writer.WritePropertyName("wsfcStaticIp"u8); - writer.WriteStringValue(WindowsServerFailoverClusterStaticIP.ToString()); - } - if (Optional.IsDefined(AutoPatchingSettings)) - { - writer.WritePropertyName("autoPatchingSettings"u8); - writer.WriteObjectValue(AutoPatchingSettings, options); - } - if (Optional.IsDefined(AutoBackupSettings)) - { - writer.WritePropertyName("autoBackupSettings"u8); - writer.WriteObjectValue(AutoBackupSettings, options); - } - if (Optional.IsDefined(KeyVaultCredentialSettings)) - { - writer.WritePropertyName("keyVaultCredentialSettings"u8); - writer.WriteObjectValue(KeyVaultCredentialSettings, options); - } - if (Optional.IsDefined(ServerConfigurationsManagementSettings)) - { - writer.WritePropertyName("serverConfigurationsManagementSettings"u8); - writer.WriteObjectValue(ServerConfigurationsManagementSettings, options); - } - if (Optional.IsDefined(StorageConfigurationSettings)) - { - writer.WritePropertyName("storageConfigurationSettings"u8); - writer.WriteObjectValue(StorageConfigurationSettings, options); - } - if (Optional.IsDefined(AssessmentSettings)) - { - writer.WritePropertyName("assessmentSettings"u8); - writer.WriteObjectValue(AssessmentSettings, options); - } - writer.WriteEndObject(); } - SqlVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (SqlVmData)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmData)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlVmData(document.RootElement, options); } - internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - ManagedServiceIdentity identity = default; - IDictionary tags = default; - AzureLocation location = default; ResourceIdentifier id = default; string name = default; - ResourceType type = default; + ResourceType resourceType = default; SystemData systemData = default; - ResourceIdentifier virtualMachineResourceId = default; - string provisioningState = default; - string sqlImageOffer = default; - SqlServerLicenseType? sqlServerLicenseType = default; - SqlManagementMode? sqlManagement = default; - SqlImageSku? sqlImageSku = default; - ResourceIdentifier sqlVmGroupResourceId = default; - WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = default; - IPAddress windowsServerFailoverClusterStaticIP = default; - SqlVmAutoPatchingSettings autoPatchingSettings = default; - SqlVmAutoBackupSettings autoBackupSettings = default; - SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = default; - SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default; - SqlVmStorageConfigurationSettings storageConfigurationSettings = default; - SqlVmAssessmentSettings assessmentSettings = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IDictionary tags = default; + AzureLocation location = default; + SqlVirtualMachineProperties properties = default; + ManagedServiceIdentity identity = default; + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("identity"u8)) + if (prop.NameEquals("id"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), options, AzureResourceManagerSqlVirtualMachineContext.Default); + id = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("tags"u8)) + if (prop.NameEquals("name"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; + name = prop.Value.GetString(); continue; } - if (property.NameEquals("location"u8)) + if (prop.NameEquals("type"u8)) { - location = new AzureLocation(property.Value.GetString()); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ResourceType(prop.Value.GetString()); continue; } - if (property.NameEquals("id"u8)) + if (prop.NameEquals("systemData"u8)) { - id = new ResourceIdentifier(property.Value.GetString()); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerSqlVirtualMachineContext.Default); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("tags"u8)) { - name = property.Value.GetString(); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + tags = dictionary; continue; } - if (property.NameEquals("type"u8)) + if (prop.NameEquals("location"u8)) { - type = new ResourceType(property.Value.GetString()); + location = new AzureLocation(prop.Value.GetString()); continue; } - if (property.NameEquals("systemData"u8)) + if (prop.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerSqlVirtualMachineContext.Default); + properties = SqlVirtualMachineProperties.DeserializeSqlVirtualMachineProperties(prop.Value, options); continue; } - if (property.NameEquals("properties"u8)) + if (prop.NameEquals("identity"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - property.ThrowNonNullablePropertyIsNull(); continue; } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("virtualMachineResourceId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - virtualMachineResourceId = new ResourceIdentifier(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - provisioningState = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("sqlImageOffer"u8)) - { - sqlImageOffer = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("sqlServerLicenseType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlServerLicenseType = new SqlServerLicenseType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("sqlManagement"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlManagement = new SqlManagementMode(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("sqlImageSku"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlImageSku = new SqlImageSku(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("sqlVirtualMachineGroupResourceId"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlVmGroupResourceId = new ResourceIdentifier(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("wsfcDomainCredentials"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - windowsServerFailoverClusterDomainCredentials = WindowsServerFailoverClusterDomainCredentials.DeserializeWindowsServerFailoverClusterDomainCredentials(property0.Value, options); - continue; - } - if (property0.NameEquals("wsfcStaticIp"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - windowsServerFailoverClusterStaticIP = IPAddress.Parse(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("autoPatchingSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - autoPatchingSettings = SqlVmAutoPatchingSettings.DeserializeSqlVmAutoPatchingSettings(property0.Value, options); - continue; - } - if (property0.NameEquals("autoBackupSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - autoBackupSettings = SqlVmAutoBackupSettings.DeserializeSqlVmAutoBackupSettings(property0.Value, options); - continue; - } - if (property0.NameEquals("keyVaultCredentialSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - keyVaultCredentialSettings = SqlVmKeyVaultCredentialSettings.DeserializeSqlVmKeyVaultCredentialSettings(property0.Value, options); - continue; - } - if (property0.NameEquals("serverConfigurationsManagementSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - serverConfigurationsManagementSettings = SqlServerConfigurationsManagementSettings.DeserializeSqlServerConfigurationsManagementSettings(property0.Value, options); - continue; - } - if (property0.NameEquals("storageConfigurationSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storageConfigurationSettings = SqlVmStorageConfigurationSettings.DeserializeSqlVmStorageConfigurationSettings(property0.Value, options); - continue; - } - if (property0.NameEquals("assessmentSettings"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - assessmentSettings = SqlVmAssessmentSettings.DeserializeSqlVmAssessmentSettings(property0.Value, options); - continue; - } - } + identity = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerSqlVirtualMachineContext.Default); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new SqlVmData( id, name, - type, + resourceType, systemData, + additionalBinaryDataProperties, tags ?? new ChangeTrackingDictionary(), location, - identity, - virtualMachineResourceId, - provisioningState, - sqlImageOffer, - sqlServerLicenseType, - sqlManagement, - sqlImageSku, - sqlVmGroupResourceId, - windowsServerFailoverClusterDomainCredentials, - windowsServerFailoverClusterStaticIP, - autoPatchingSettings, - autoBackupSettings, - keyVaultCredentialSettings, - serverConfigurationsManagementSettings, - storageConfigurationSettings, - assessmentSettings, - serializedAdditionalRawData); + properties, + identity); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -406,15 +201,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) } } - SqlVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (SqlVmData)PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlVmData(document.RootElement, options); } default: @@ -422,6 +222,26 @@ SqlVmData IPersistableModel.Create(BinaryData data, ModelReaderWriter } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(SqlVmData sqlVmData) + { + if (sqlVmData == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sqlVmData, ModelSerializationExtensions.WireOptions); + return content; + } + + /// The to deserialize the from. + internal static SqlVmData FromResponse(Response response) + { + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSqlVmData(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs index 1f874cdf34d5..0bff59c3c784 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs @@ -14,131 +14,364 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - /// - /// A class representing the SqlVm data model. - /// A SQL virtual machine. - /// + /// A SQL virtual machine. public partial class SqlVmData : TrackedResourceData { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . - /// The location. + /// The geo-location where the resource lives. public SqlVmData(AzureLocation location) : base(location) { } /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Azure Active Directory identity of the server. Current supported identity types: None, SystemAssigned. - /// ARM Resource id of underlying virtual machine created from SQL marketplace image. - /// Provisioning state to track the async operation status. - /// SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016. - /// SQL Server license type. - /// SQL Server Management type. - /// SQL Server edition type. - /// ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of. - /// 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. - /// Auto patching settings for applying critical security updates to SQL virtual machine. - /// Auto backup settings for SQL Server. - /// Key vault credential settings. - /// SQL Server configuration management settings. - /// Storage Configuration Settings. - /// Assessment Settings. - /// Keeps track of any properties unknown to the library. - internal SqlVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, SqlServerLicenseType? sqlServerLicenseType, SqlManagementMode? sqlManagement, SqlImageSku? sqlImageSku, ResourceIdentifier sqlVmGroupResourceId, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, IPAddress windowsServerFailoverClusterStaticIP, SqlVmAutoPatchingSettings autoPatchingSettings, SqlVmAutoBackupSettings autoBackupSettings, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, SqlVmStorageConfigurationSettings storageConfigurationSettings, SqlVmAssessmentSettings assessmentSettings, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Keeps track of any properties unknown to the library. + /// Resource tags. + /// The geo-location where the resource lives. + /// Resource properties. + /// DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server. + internal SqlVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, SqlVirtualMachineProperties properties, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) { + _additionalBinaryDataProperties = additionalBinaryDataProperties; + Properties = properties; Identity = identity; - VirtualMachineResourceId = virtualMachineResourceId; - ProvisioningState = provisioningState; - SqlImageOffer = sqlImageOffer; - SqlServerLicenseType = sqlServerLicenseType; - SqlManagement = sqlManagement; - SqlImageSku = sqlImageSku; - SqlVmGroupResourceId = sqlVmGroupResourceId; - WindowsServerFailoverClusterDomainCredentials = windowsServerFailoverClusterDomainCredentials; - WindowsServerFailoverClusterStaticIP = windowsServerFailoverClusterStaticIP; - AutoPatchingSettings = autoPatchingSettings; - AutoBackupSettings = autoBackupSettings; - KeyVaultCredentialSettings = keyVaultCredentialSettings; - ServerConfigurationsManagementSettings = serverConfigurationsManagementSettings; - StorageConfigurationSettings = storageConfigurationSettings; - AssessmentSettings = assessmentSettings; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SqlVmData() - { - } - - /// Azure Active Directory identity of the server. Current supported identity types: None, SystemAssigned. + } + + /// Resource properties. + internal SqlVirtualMachineProperties Properties { get; set; } + + /// DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server. public ManagedServiceIdentity Identity { get; set; } + /// ARM Resource id of underlying virtual machine created from SQL marketplace image. - public ResourceIdentifier VirtualMachineResourceId { get; set; } + public ResourceIdentifier VirtualMachineResourceId + { + get + { + return Properties is null ? default : Properties.VirtualMachineResourceId; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.VirtualMachineResourceId = value; + } + } + /// Provisioning state to track the async operation status. - public string ProvisioningState { get; } + public string ProvisioningState + { + get + { + return Properties is null ? default : Properties.ProvisioningState; + } + } + /// SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016. - public string SqlImageOffer { get; set; } + public string SqlImageOffer + { + get + { + return Properties is null ? default : Properties.SqlImageOffer; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.SqlImageOffer = value; + } + } + /// SQL Server license type. - public SqlServerLicenseType? SqlServerLicenseType { get; set; } - /// SQL Server Management type. - public SqlManagementMode? SqlManagement { get; set; } + public SqlServerLicenseType? SqlServerLicenseType + { + get + { + return Properties is null ? default : Properties.SqlServerLicenseType; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.SqlServerLicenseType = value.Value; + } + } + + /// SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it. + public SqlManagementMode? SqlManagement + { + get + { + return Properties is null ? default : Properties.SqlManagement; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.SqlManagement = value.Value; + } + } + + /// SQL IaaS Agent least privilege mode. + public LeastPrivilegeMode? LeastPrivilegeMode + { + get + { + return Properties is null ? default : Properties.LeastPrivilegeMode; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.LeastPrivilegeMode = value.Value; + } + } + /// SQL Server edition type. - public SqlImageSku? SqlImageSku { get; set; } + public SqlImageSku? SqlImageSku + { + get + { + return Properties is null ? default : Properties.SqlImageSku; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.SqlImageSku = value.Value; + } + } + /// ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of. - public ResourceIdentifier SqlVmGroupResourceId { get; set; } + public ResourceIdentifier SqlVmGroupResourceId + { + get + { + return Properties is null ? default : Properties.SqlVmGroupResourceId; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.SqlVmGroupResourceId = value; + } + } + /// Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. - public WindowsServerFailoverClusterDomainCredentials WindowsServerFailoverClusterDomainCredentials { get; set; } + public WindowsServerFailoverClusterDomainCredentials WindowsServerFailoverClusterDomainCredentials + { + get + { + return Properties is null ? default : Properties.WindowsServerFailoverClusterDomainCredentials; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.WindowsServerFailoverClusterDomainCredentials = value; + } + } + /// Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. - public IPAddress WindowsServerFailoverClusterStaticIP { get; set; } + public IPAddress WindowsServerFailoverClusterStaticIP + { + get + { + return Properties is null ? default : Properties.WindowsServerFailoverClusterStaticIP; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.WindowsServerFailoverClusterStaticIP = value; + } + } + /// Auto patching settings for applying critical security updates to SQL virtual machine. - public SqlVmAutoPatchingSettings AutoPatchingSettings { get; set; } + public SqlVmAutoPatchingSettings AutoPatchingSettings + { + get + { + return Properties is null ? default : Properties.AutoPatchingSettings; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.AutoPatchingSettings = value; + } + } + /// Auto backup settings for SQL Server. - public SqlVmAutoBackupSettings AutoBackupSettings { get; set; } + public SqlVmAutoBackupSettings AutoBackupSettings + { + get + { + return Properties is null ? default : Properties.AutoBackupSettings; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.AutoBackupSettings = value; + } + } + /// Key vault credential settings. - public SqlVmKeyVaultCredentialSettings KeyVaultCredentialSettings { get; set; } + public SqlVmKeyVaultCredentialSettings KeyVaultCredentialSettings + { + get + { + return Properties is null ? default : Properties.KeyVaultCredentialSettings; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.KeyVaultCredentialSettings = value; + } + } + /// SQL Server configuration management settings. - public SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get; set; } + public SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings + { + get + { + return Properties is null ? default : Properties.ServerConfigurationsManagementSettings; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.ServerConfigurationsManagementSettings = value; + } + } + /// Storage Configuration Settings. - public SqlVmStorageConfigurationSettings StorageConfigurationSettings { get; set; } - /// Assessment Settings. - public SqlVmAssessmentSettings AssessmentSettings { get; set; } + public SqlVmStorageConfigurationSettings StorageConfigurationSettings + { + get + { + return Properties is null ? default : Properties.StorageConfigurationSettings; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.StorageConfigurationSettings = value; + } + } + + /// Troubleshooting status. + public TroubleshootingStatus TroubleshootingStatus + { + get + { + return Properties is null ? default : Properties.TroubleshootingStatus; + } + } + + /// SQL best practices Assessment Settings. + public SqlVmAssessmentSettings AssessmentSettings + { + get + { + return Properties is null ? default : Properties.AssessmentSettings; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.AssessmentSettings = value; + } + } + + /// Enable automatic upgrade of Sql IaaS extension Agent. + public bool? EnableAutomaticUpgrade + { + get + { + return Properties is null ? default : Properties.EnableAutomaticUpgrade; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.EnableAutomaticUpgrade = value.Value; + } + } + + /// Additional VM Patching solution enabled on the Virtual Machine. + public AdditionalOsPatch? AdditionalVmPatch + { + get + { + return Properties is null ? default : Properties.AdditionalVmPatch; + } + } + + /// Virtual Machine Identity details used for Sql IaaS extension configurations. + public VirtualMachineIdentity VirtualMachineIdentitySettings + { + get + { + return Properties is null ? default : Properties.VirtualMachineIdentitySettings; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineProperties(); + } + Properties.VirtualMachineIdentitySettings = value; + } + } + + /// Operating System of the current SQL Virtual Machine. + public OsType? OsType + { + get + { + return Properties is null ? default : Properties.OsType; + } + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupCollection.cs index e5a33c4d0266..84c829f10336 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupCollection.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupCollection.cs @@ -8,12 +8,13 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using Autorest.CSharp.Core; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.SqlVirtualMachine @@ -25,73 +26,88 @@ namespace Azure.ResourceManager.SqlVirtualMachine /// public partial class SqlVmGroupCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _sqlVmGroupSqlVmGroupsClientDiagnostics; - private readonly SqlVirtualMachineGroupsRestOperations _sqlVmGroupSqlVmGroupsRestClient; + private readonly ClientDiagnostics _sqlVirtualMachineGroupsClientDiagnostics; + private readonly SqlVirtualMachineGroups _sqlVirtualMachineGroupsRestClient; + private readonly ClientDiagnostics _sqlVirtualMachinesClientDiagnostics; + private readonly SqlVirtualMachines _sqlVirtualMachinesRestClient; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of SqlVmGroupCollection for mocking. protected SqlVmGroupCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. + /// The identifier of the resource that is the target of operations. internal SqlVmGroupCollection(ArmClient client, ResourceIdentifier id) : base(client, id) { - _sqlVmGroupSqlVmGroupsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVmGroupResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(SqlVmGroupResource.ResourceType, out string sqlVmGroupSqlVmGroupsApiVersion); - _sqlVmGroupSqlVmGroupsRestClient = new SqlVirtualMachineGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlVmGroupSqlVmGroupsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif + TryGetApiVersion(SqlVmGroupResource.ResourceType, out string sqlVmGroupApiVersion); + _sqlVirtualMachineGroupsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVmGroupResource.ResourceType.Namespace, Diagnostics); + _sqlVirtualMachineGroupsRestClient = new SqlVirtualMachineGroups(_sqlVirtualMachineGroupsClientDiagnostics, Pipeline, Endpoint, sqlVmGroupApiVersion ?? "2023-10-01"); + _sqlVirtualMachinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVmGroupResource.ResourceType.Namespace, Diagnostics); + _sqlVirtualMachinesRestClient = new SqlVirtualMachines(_sqlVirtualMachinesClientDiagnostics, Pipeline, Endpoint, sqlVmGroupApiVersion ?? "2023-10-01"); + ValidateResourceId(id); } + /// + [Conditional("DEBUG")] internal static void ValidateResourceId(ResourceIdentifier id) { if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), id); + } } /// /// Creates or updates a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_CreateOrUpdate + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachineGroups_CreateOrUpdate. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The SQL virtual machine group. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sqlVmGroupName, SqlVmGroupData data, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sqlVirtualMachineGroupName, SqlVmGroupData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.CreateOrUpdate"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, data, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(new SqlVmGroupOperationSource(Client), _sqlVmGroupSqlVmGroupsClientDiagnostics, Pipeline, _sqlVmGroupSqlVmGroupsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, data).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, SqlVmGroupData.ToRequestContent(data), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new SqlVmGroupOperationSource(Client), + _sqlVirtualMachineGroupsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -105,42 +121,51 @@ public virtual async Task> CreateOrUpdateAsync( /// Creates or updates a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_CreateOrUpdate + /// Operation Id. + /// SqlVirtualMachineGroups_CreateOrUpdate. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The SQL virtual machine group. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sqlVmGroupName, SqlVmGroupData data, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sqlVirtualMachineGroupName, SqlVmGroupData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); Argument.AssertNotNull(data, nameof(data)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.CreateOrUpdate"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.CreateOrUpdate"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, data, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(new SqlVmGroupOperationSource(Client), _sqlVmGroupSqlVmGroupsClientDiagnostics, Pipeline, _sqlVmGroupSqlVmGroupsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, data).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, SqlVmGroupData.ToRequestContent(data), context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new SqlVmGroupOperationSource(Client), + _sqlVirtualMachineGroupsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletion(cancellationToken); + } return operation; } catch (Exception e) @@ -154,38 +179,42 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// Gets a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Get + /// Operation Id. + /// SqlVirtualMachineGroups_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string sqlVmGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetAsync(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Get"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Get"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -199,38 +228,42 @@ public virtual async Task> GetAsync(string sqlVmGro /// Gets a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachineGroups_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string sqlVmGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Get(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Get"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Get"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -244,50 +277,44 @@ public virtual Response Get(string sqlVmGroupName, Cancellat /// Gets all SQL virtual machine groups in a resource group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_ListByResourceGroup + /// Operation Id. + /// SqlVirtualMachineGroups_ListByResourceGroup. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. + /// A collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVmGroupSqlVmGroupsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVmGroupSqlVmGroupsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlVmGroupResource(Client, SqlVmGroupData.DeserializeSqlVmGroupData(e)), _sqlVmGroupSqlVmGroupsClientDiagnostics, Pipeline, "SqlVmGroupCollection.GetAll", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new SqlVirtualMachineGroupsGetByResourceGroupAsyncCollectionResultOfT(_sqlVirtualMachineGroupsRestClient, Id.SubscriptionId, Id.ResourceGroupName, context), data => new SqlVmGroupResource(Client, data)); } /// /// Gets all SQL virtual machine groups in a resource group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_ListByResourceGroup + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachineGroups_ListByResourceGroup. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// @@ -295,45 +322,61 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVmGroupSqlVmGroupsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVmGroupSqlVmGroupsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlVmGroupResource(Client, SqlVmGroupData.DeserializeSqlVmGroupData(e)), _sqlVmGroupSqlVmGroupsClientDiagnostics, Pipeline, "SqlVmGroupCollection.GetAll", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new SqlVirtualMachineGroupsGetByResourceGroupCollectionResultOfT(_sqlVirtualMachineGroupsRestClient, Id.SubscriptionId, Id.ResourceGroupName, context), data => new SqlVmGroupResource(Client, data)); } /// /// Checks to see if the resource exists in azure. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Get + /// Operation Id. + /// SqlVirtualMachineGroups_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string sqlVmGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> ExistsAsync(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Exists"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Exists"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((SqlVmGroupData)null, result); + break; + default: + throw new RequestFailedException(result); + } return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -347,36 +390,50 @@ public virtual async Task> ExistsAsync(string sqlVmGroupName, Can /// Checks to see if the resource exists in azure. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Get + /// Operation Id. + /// SqlVirtualMachineGroups_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string sqlVmGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Exists(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Exists"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Exists"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken: cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((SqlVmGroupData)null, result); + break; + default: + throw new RequestFailedException(result); + } return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -390,38 +447,54 @@ public virtual Response Exists(string sqlVmGroupName, CancellationToken ca /// Tries to get details for this resource from the service. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Default Api Version - /// 2022-02-01 + /// Operation Id. + /// SqlVirtualMachineGroups_Get. /// /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string sqlVmGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetIfExistsAsync(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.GetIfExists"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.GetIfExists"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((SqlVmGroupData)null, result); + break; + default: + throw new RequestFailedException(result); + } if (response.Value == null) + { return new NoValueResponse(response.GetRawResponse()); + } return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -435,38 +508,54 @@ public virtual async Task> GetIfExistsAsync /// Tries to get details for this resource from the service. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Get + /// Operation Id. + /// SqlVirtualMachineGroups_Get. /// /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// + /// Default Api Version. + /// 2023-10-01. /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string sqlVmGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual NullableResponse GetIfExists(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.GetIfExists"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.GetIfExists"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken: cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + Pipeline.Send(message, context.CancellationToken); + Response result = message.Response; + Response response = default; + switch (result.Status) + { + case 200: + response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); + break; + case 404: + response = Response.FromValue((SqlVmGroupData)null, result); + break; + default: + throw new RequestFailedException(result); + } if (response.Value == null) + { return new NoValueResponse(response.GetRawResponse()); + } return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -486,6 +575,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } + /// The cancellation token to use. IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.Serialization.cs index b5c42f3bab5d..1d19069956d0 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.Serialization.cs @@ -10,16 +10,23 @@ using System.Collections.Generic; using System.Text; using System.Text.Json; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { - public partial class SqlVmGroupData : IUtf8JsonSerializable, IJsonModel + /// A SQL virtual machine group. + public partial class SqlVmGroupData : TrackedResourceData, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + /// Initializes a new instance of for deserialization. + internal SqlVmGroupData() + { + } + /// The JSON writer. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); @@ -31,227 +38,144 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOp /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmGroupData)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + if (Optional.IsDefined(Properties)) { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); } - if (Optional.IsDefined(SqlImageOffer)) - { - writer.WritePropertyName("sqlImageOffer"u8); - writer.WriteStringValue(SqlImageOffer); - } - if (Optional.IsDefined(SqlImageSku)) - { - writer.WritePropertyName("sqlImageSku"u8); - writer.WriteStringValue(SqlImageSku.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(ScaleType)) - { - writer.WritePropertyName("scaleType"u8); - writer.WriteStringValue(ScaleType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(ClusterManagerType)) - { - writer.WritePropertyName("clusterManagerType"u8); - writer.WriteStringValue(ClusterManagerType.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(ClusterConfiguration)) - { - writer.WritePropertyName("clusterConfiguration"u8); - writer.WriteStringValue(ClusterConfiguration.Value.ToString()); - } - if (Optional.IsDefined(WindowsServerFailoverClusterDomainProfile)) - { - writer.WritePropertyName("wsfcDomainProfile"u8); - writer.WriteObjectValue(WindowsServerFailoverClusterDomainProfile, options); - } - writer.WriteEndObject(); } - SqlVmGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + /// The JSON reader. + /// The client options for reading and writing models. + SqlVmGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (SqlVmGroupData)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ResourceData JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { throw new FormatException($"The model {nameof(SqlVmGroupData)} does not support reading '{format}' format."); } - using JsonDocument document = JsonDocument.ParseValue(ref reader); return DeserializeSqlVmGroupData(document.RootElement, options); } - internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, ModelReaderWriterOptions options = null) + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, ModelReaderWriterOptions options) { - options ??= ModelSerializationExtensions.WireOptions; - if (element.ValueKind == JsonValueKind.Null) { return null; } - IDictionary tags = default; - AzureLocation location = default; ResourceIdentifier id = default; string name = default; - ResourceType type = default; + ResourceType resourceType = default; SystemData systemData = default; - string provisioningState = default; - string sqlImageOffer = default; - SqlVmGroupImageSku? sqlImageSku = default; - SqlVmGroupScaleType? scaleType = default; - SqlVmClusterManagerType? clusterManagerType = default; - SqlVmClusterConfiguration? clusterConfiguration = default; - WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IDictionary tags = default; + AzureLocation location = default; + SqlVirtualMachineGroupProperties properties = default; + foreach (var prop in element.EnumerateObject()) { - if (property.NameEquals("tags"u8)) + if (prop.NameEquals("id"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location"u8)) - { - location = new AzureLocation(property.Value.GetString()); + id = new ResourceIdentifier(prop.Value.GetString()); continue; } - if (property.NameEquals("id"u8)) + if (prop.NameEquals("name"u8)) { - id = new ResourceIdentifier(property.Value.GetString()); + name = prop.Value.GetString(); continue; } - if (property.NameEquals("name"u8)) + if (prop.NameEquals("type"u8)) { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new ResourceType(property.Value.GetString()); + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceType = new ResourceType(prop.Value.GetString()); continue; } - if (property.NameEquals("systemData"u8)) + if (prop.NameEquals("systemData"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(property.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerSqlVirtualMachineContext.Default); + systemData = ModelReaderWriter.Read(new BinaryData(Encoding.UTF8.GetBytes(prop.Value.GetRawText())), ModelSerializationExtensions.WireOptions, AzureResourceManagerSqlVirtualMachineContext.Default); continue; } - if (property.NameEquals("properties"u8)) + if (prop.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + if (prop.Value.ValueKind == JsonValueKind.Null) { - property.ThrowNonNullablePropertyIsNull(); continue; } - foreach (var property0 in property.Value.EnumerateObject()) + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) { - if (property0.NameEquals("provisioningState"u8)) - { - provisioningState = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("sqlImageOffer"u8)) - { - sqlImageOffer = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("sqlImageSku"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlImageSku = new SqlVmGroupImageSku(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("scaleType"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - scaleType = new SqlVmGroupScaleType(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("clusterManagerType"u8)) + if (prop0.Value.ValueKind == JsonValueKind.Null) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterManagerType = new SqlVmClusterManagerType(property0.Value.GetString()); - continue; + dictionary.Add(prop0.Name, null); } - if (property0.NameEquals("clusterConfiguration"u8)) + else { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - clusterConfiguration = new SqlVmClusterConfiguration(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("wsfcDomainProfile"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - windowsServerFailoverClusterDomainProfile = WindowsServerFailoverClusterDomainProfile.DeserializeWindowsServerFailoverClusterDomainProfile(property0.Value, options); - continue; + dictionary.Add(prop0.Name, prop0.Value.GetString()); } } + tags = dictionary; + continue; + } + if (prop.NameEquals("location"u8)) + { + location = new AzureLocation(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("properties"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = SqlVirtualMachineGroupProperties.DeserializeSqlVirtualMachineGroupProperties(prop.Value, options); continue; } if (options.Format != "W") { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - serializedAdditionalRawData = rawDataDictionary; return new SqlVmGroupData( id, name, - type, + resourceType, systemData, + additionalBinaryDataProperties, tags ?? new ChangeTrackingDictionary(), location, - provisioningState, - sqlImageOffer, - sqlImageSku, - scaleType, - clusterManagerType, - clusterConfiguration, - windowsServerFailoverClusterDomainProfile, - serializedAdditionalRawData); + properties); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": @@ -261,15 +185,20 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti } } - SqlVmGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + /// The data to parse. + /// The client options for reading and writing models. + SqlVmGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (SqlVmGroupData)PersistableModelCreateCore(data, options); + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ResourceData PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); return DeserializeSqlVmGroupData(document.RootElement, options); } default: @@ -277,6 +206,26 @@ SqlVmGroupData IPersistableModel.Create(BinaryData data, ModelRe } } + /// The client options for reading and writing models. string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + internal static RequestContent ToRequestContent(SqlVmGroupData sqlVmGroupData) + { + if (sqlVmGroupData == null) + { + return null; + } + Utf8JsonRequestContent content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sqlVmGroupData, ModelSerializationExtensions.WireOptions); + return content; + } + + /// The to deserialize the from. + internal static SqlVmGroupData FromResponse(Response response) + { + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSqlVmGroupData(document.RootElement, ModelSerializationExtensions.WireOptions); + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs index 8c7e18368dd0..99b5d65f9bb1 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs @@ -13,95 +13,121 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - /// - /// A class representing the SqlVmGroup data model. - /// A SQL virtual machine group. - /// + /// A SQL virtual machine group. public partial class SqlVmGroupData : TrackedResourceData { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . - /// The location. + /// The geo-location where the resource lives. public SqlVmGroupData(AzureLocation location) : base(location) { } /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Provisioning state to track the async operation status. - /// SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016. - /// SQL image sku. - /// Scale type. - /// Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type. - /// Cluster type. - /// Cluster Active Directory domain profile. - /// Keeps track of any properties unknown to the library. - internal SqlVmGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string provisioningState, string sqlImageOffer, SqlVmGroupImageSku? sqlImageSku, SqlVmGroupScaleType? scaleType, SqlVmClusterManagerType? clusterManagerType, SqlVmClusterConfiguration? clusterConfiguration, WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + /// The name of the resource. + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// Keeps track of any properties unknown to the library. + /// Resource tags. + /// The geo-location where the resource lives. + /// Resource properties. + internal SqlVmGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, SqlVirtualMachineGroupProperties properties) : base(id, name, resourceType, systemData, tags, location) { - ProvisioningState = provisioningState; - SqlImageOffer = sqlImageOffer; - SqlImageSku = sqlImageSku; - ScaleType = scaleType; - ClusterManagerType = clusterManagerType; - ClusterConfiguration = clusterConfiguration; - WindowsServerFailoverClusterDomainProfile = windowsServerFailoverClusterDomainProfile; - _serializedAdditionalRawData = serializedAdditionalRawData; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + Properties = properties; } - /// Initializes a new instance of for deserialization. - internal SqlVmGroupData() + /// Resource properties. + internal SqlVirtualMachineGroupProperties Properties { get; set; } + + /// Provisioning state to track the async operation status. + public string ProvisioningState { + get + { + return Properties is null ? default : Properties.ProvisioningState; + } } - /// Provisioning state to track the async operation status. - public string ProvisioningState { get; } /// SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016. - public string SqlImageOffer { get; set; } + public string SqlImageOffer + { + get + { + return Properties is null ? default : Properties.SqlImageOffer; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineGroupProperties(); + } + Properties.SqlImageOffer = value; + } + } + /// SQL image sku. - public SqlVmGroupImageSku? SqlImageSku { get; set; } + public SqlVmGroupImageSku? SqlImageSku + { + get + { + return Properties is null ? default : Properties.SqlImageSku; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineGroupProperties(); + } + Properties.SqlImageSku = value.Value; + } + } + /// Scale type. - public SqlVmGroupScaleType? ScaleType { get; } + public SqlVmGroupScaleType? ScaleType + { + get + { + return Properties is null ? default : Properties.ScaleType; + } + } + /// Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type. - public SqlVmClusterManagerType? ClusterManagerType { get; } + public SqlVmClusterManagerType? ClusterManagerType + { + get + { + return Properties is null ? default : Properties.ClusterManagerType; + } + } + /// Cluster type. - public SqlVmClusterConfiguration? ClusterConfiguration { get; } + public SqlVmClusterConfiguration? ClusterConfiguration + { + get + { + return Properties is null ? default : Properties.ClusterConfiguration; + } + } + /// Cluster Active Directory domain profile. - public WindowsServerFailoverClusterDomainProfile WindowsServerFailoverClusterDomainProfile { get; set; } + public WindowsServerFailoverClusterDomainProfile WindowsServerFailoverClusterDomainProfile + { + get + { + return Properties is null ? default : Properties.WindowsServerFailoverClusterDomainProfile; + } + set + { + if (Properties is null) + { + Properties = new SqlVirtualMachineGroupProperties(); + } + Properties.WindowsServerFailoverClusterDomainProfile = value; + } + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs index a09afdec9cce..98d515bcba65 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs @@ -11,19 +11,29 @@ namespace Azure.ResourceManager.SqlVirtualMachine { + /// public partial class SqlVmGroupResource : IJsonModel { - private static SqlVmGroupData s_dataDeserializationInstance; - private static SqlVmGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + private static IJsonModel s_dataDeserializationInstance; + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new SqlVmGroupData(); + + /// The writer to serialize the model to. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVmGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + /// The reader for deserializing the model. + /// The client options for reading and writing models. + SqlVmGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options); + /// The client options for reading and writing models. BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlVirtualMachineContext.Default); + /// The binary data to be processed. + /// The client options for reading and writing models. SqlVmGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlVirtualMachineContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs index e5dfc8efed83..151812b61d00 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs @@ -7,50 +7,39 @@ using System; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; -using Autorest.CSharp.Core; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; using Azure.ResourceManager.Resources; using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { /// - /// A Class representing a SqlVmGroup along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetSqlVmGroupResource method. - /// Otherwise you can get one from its parent resource using the GetSqlVmGroup method. + /// A class representing a SqlVmGroup along with the instance operations that can be performed on it. + /// If you have a you can construct a from an instance of using the GetResource method. + /// Otherwise you can get one from its parent resource using the GetSqlVmGroups method. /// public partial class SqlVmGroupResource : ArmResource { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The sqlVmGroupName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmGroupName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVmGroupName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _sqlVmGroupSqlVmGroupsClientDiagnostics; - private readonly SqlVirtualMachineGroupsRestOperations _sqlVmGroupSqlVmGroupsRestClient; - private readonly ClientDiagnostics _sqlVmSqlVirtualMachinesClientDiagnostics; - private readonly SqlVirtualMachinesRestOperations _sqlVmSqlVirtualMachinesRestClient; + private readonly ClientDiagnostics _sqlVirtualMachineGroupsClientDiagnostics; + private readonly SqlVirtualMachineGroups _sqlVirtualMachineGroupsRestClient; + private readonly ClientDiagnostics _sqlVirtualMachinesClientDiagnostics; + private readonly SqlVirtualMachines _sqlVirtualMachinesRestClient; private readonly SqlVmGroupData _data; - /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups"; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of SqlVmGroupResource for mocking. protected SqlVmGroupResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The resource that is the target of operations. internal SqlVmGroupResource(ArmClient client, SqlVmGroupData data) : this(client, data.Id) @@ -59,145 +48,94 @@ internal SqlVmGroupResource(ArmClient client, SqlVmGroupData data) : this(client _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal SqlVmGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _sqlVmGroupSqlVmGroupsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string sqlVmGroupSqlVmGroupsApiVersion); - _sqlVmGroupSqlVmGroupsRestClient = new SqlVirtualMachineGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlVmGroupSqlVmGroupsApiVersion); - _sqlVmSqlVirtualMachinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVmResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(SqlVmResource.ResourceType, out string sqlVmSqlVirtualMachinesApiVersion); - _sqlVmSqlVirtualMachinesRestClient = new SqlVirtualMachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlVmSqlVirtualMachinesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif + TryGetApiVersion(ResourceType, out string sqlVmGroupApiVersion); + _sqlVirtualMachineGroupsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", ResourceType.Namespace, Diagnostics); + _sqlVirtualMachineGroupsRestClient = new SqlVirtualMachineGroups(_sqlVirtualMachineGroupsClientDiagnostics, Pipeline, Endpoint, sqlVmGroupApiVersion ?? "2023-10-01"); + _sqlVirtualMachinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", ResourceType.Namespace, Diagnostics); + _sqlVirtualMachinesRestClient = new SqlVirtualMachines(_sqlVirtualMachinesClientDiagnostics, Pipeline, Endpoint, sqlVmGroupApiVersion ?? "2023-10-01"); + ValidateResourceId(id); } /// Gets whether or not the current instance has data. public virtual bool HasData { get; } /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. public virtual SqlVmGroupData Data { get { if (!HasData) + { throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + } return _data; } } - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets a collection of AvailabilityGroupListenerResources in the SqlVmGroup. - /// An object representing collection of AvailabilityGroupListenerResources and their operations over a AvailabilityGroupListenerResource. - public virtual AvailabilityGroupListenerCollection GetAvailabilityGroupListeners() - { - return GetCachedClient(client => new AvailabilityGroupListenerCollection(client, Id)); - } - - /// - /// Gets an availability group listener. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} - /// - /// - /// Operation Id - /// AvailabilityGroupListeners_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the availability group listener. - /// The child resources to include in the response. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetAvailabilityGroupListenerAsync(string availabilityGroupListenerName, string expand = null, CancellationToken cancellationToken = default) + /// Generate the resource identifier for this resource. + /// The subscriptionId. + /// The resourceGroupName. + /// The sqlVirtualMachineGroupName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { - return await GetAvailabilityGroupListeners().GetAsync(availabilityGroupListenerName, expand, cancellationToken).ConfigureAwait(false); + string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}"; + return new ResourceIdentifier(resourceId); } - /// - /// Gets an availability group listener. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName} - /// - /// - /// Operation Id - /// AvailabilityGroupListeners_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// Name of the availability group listener. - /// The child resources to include in the response. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetAvailabilityGroupListener(string availabilityGroupListenerName, string expand = null, CancellationToken cancellationToken = default) + /// + [Conditional("DEBUG")] + internal static void ValidateResourceId(ResourceIdentifier id) { - return GetAvailabilityGroupListeners().Get(availabilityGroupListenerName, expand, cancellationToken); + if (id.ResourceType != ResourceType) + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), id); + } } /// /// Gets a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Get + /// Operation Id. + /// SqlVirtualMachineGroups_Get. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The cancellation token to use. public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Get"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Get"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -211,33 +149,41 @@ public virtual async Task> GetAsync(CancellationTok /// Gets a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Get + /// Operation Id. + /// SqlVirtualMachineGroups_Get. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The cancellation token to use. public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Get"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Get"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -248,38 +194,55 @@ public virtual Response Get(CancellationToken cancellationTo } /// - /// Deletes a SQL virtual machine group. + /// Updates SQL virtual machine group tags. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Delete + /// Operation Id. + /// SqlVirtualMachineGroups_Update. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The SQL virtual machine group. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlVmGroupPatch sqlVmGroupPatch, CancellationToken cancellationToken = default) { - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Delete"); + Argument.AssertNotNull(sqlVmGroupPatch, nameof(sqlVmGroupPatch)); + + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Update"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(_sqlVmGroupSqlVmGroupsClientDiagnostics, Pipeline, _sqlVmGroupSqlVmGroupsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmGroupPatch.ToRequestContent(sqlVmGroupPatch), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new SqlVmGroupOperationSource(Client), + _sqlVirtualMachineGroupsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -290,38 +253,55 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell } /// - /// Deletes a SQL virtual machine group. + /// Updates SQL virtual machine group tags. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Delete + /// Operation Id. + /// SqlVirtualMachineGroups_Update. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The SQL virtual machine group. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmGroupPatch sqlVmGroupPatch, CancellationToken cancellationToken = default) { - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Delete"); + Argument.AssertNotNull(sqlVmGroupPatch, nameof(sqlVmGroupPatch)); + + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Update"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(_sqlVmGroupSqlVmGroupsClientDiagnostics, Pipeline, _sqlVmGroupSqlVmGroupsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmGroupPatch.ToRequestContent(sqlVmGroupPatch), context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new SqlVmGroupOperationSource(Client), + _sqlVirtualMachineGroupsClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + { + operation.WaitForCompletion(cancellationToken); + } return operation; } catch (Exception e) @@ -332,42 +312,45 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Updates SQL virtual machine group tags. + /// Deletes a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Update + /// Operation Id. + /// SqlVirtualMachineGroups_Delete. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The SQL virtual machine group. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlVmGroupPatch patch, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Update"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Delete"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(new SqlVmGroupOperationSource(Client), _sqlVmGroupSqlVmGroupsClientDiagnostics, Pipeline, _sqlVmGroupSqlVmGroupsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineGroupsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + { + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -378,42 +361,45 @@ public virtual async Task> UpdateAsync(WaitUnti } /// - /// Updates SQL virtual machine group tags. + /// Deletes a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}. /// /// - /// Operation Id - /// SqlVirtualMachineGroups_Update + /// Operation Id. + /// SqlVirtualMachineGroups_Delete. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The SQL virtual machine group. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmGroupPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Update"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Delete"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(new SqlVmGroupOperationSource(Client), _sqlVmGroupSqlVmGroupsClientDiagnostics, Pipeline, _sqlVmGroupSqlVmGroupsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineGroupsClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); + { + operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -427,50 +413,52 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SqlV /// Gets the list of sql virtual machines in a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines. /// /// - /// Operation Id - /// SqlVirtualMachines_ListBySqlVmGroup + /// Operation Id. + /// SqlVirtualMachineGroups_ListBySqlVmGroup. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. + /// A collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetSqlVmsBySqlVmGroupAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVmSqlVirtualMachinesRestClient.CreateListBySqlVmGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVmSqlVirtualMachinesRestClient.CreateListBySqlVmGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlVmResource(Client, SqlVmData.DeserializeSqlVmData(e)), _sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, "SqlVmGroupResource.GetSqlVmsBySqlVmGroup", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new AsyncPageableWrapper(new SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT(_sqlVirtualMachinesRestClient, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context), data => new SqlVmResource(Client, data)); } /// /// Gets the list of sql virtual machines in a SQL virtual machine group. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines. /// /// - /// Operation Id - /// SqlVirtualMachines_ListBySqlVmGroup + /// Operation Id. + /// SqlVirtualMachineGroups_ListBySqlVmGroup. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -478,32 +466,14 @@ public virtual AsyncPageable GetSqlVmsBySqlVmGroupAsync(Cancellat /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetSqlVmsBySqlVmGroup(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVmSqlVirtualMachinesRestClient.CreateListBySqlVmGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVmSqlVirtualMachinesRestClient.CreateListBySqlVmGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlVmResource(Client, SqlVmData.DeserializeSqlVmData(e)), _sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, "SqlVmGroupResource.GetSqlVmsBySqlVmGroup", "value", "nextLink", cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + return new PageableWrapper(new SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT(_sqlVirtualMachinesRestClient, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context), data => new SqlVmResource(Client, data)); } - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// + /// Add a tag to the current resource. /// The key for the tag. /// The value for the tag. /// The cancellation token to use. @@ -513,28 +483,34 @@ public virtual async Task> AddTagAsync(string key, Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.AddTag"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.AddTag"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new SqlVmGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); + return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmGroupPatch(); - foreach (var tag in current.Tags) + SqlVmGroupData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + SqlVmGroupPatch patch = new SqlVmGroupPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -545,27 +521,7 @@ public virtual async Task> AddTagAsync(string key, } } - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// + /// Add a tag to the current resource. /// The key for the tag. /// The value for the tag. /// The cancellation token to use. @@ -575,28 +531,34 @@ public virtual Response AddTag(string key, string value, Can Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.AddTag"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.AddTag"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - var originalTags = GetTagResource().Get(cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new SqlVmGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); + return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmGroupPatch(); - foreach (var tag in current.Tags) + SqlVmGroupData current = Get(cancellationToken: cancellationToken).Value.Data; + SqlVmGroupPatch patch = new SqlVmGroupPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -607,53 +569,39 @@ public virtual Response AddTag(string key, string value, Can } } - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. + /// Replace the tags on the resource with the given set. + /// The tags to set on the resource. /// The cancellation token to use. /// is null. public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.SetTags"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.SetTags"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new SqlVmGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); + return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmGroupPatch(); + SqlVmGroupData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + SqlVmGroupPatch patch = new SqlVmGroupPatch(); patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -664,53 +612,39 @@ public virtual async Task> SetTagsAsync(IDictionary } } - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. + /// Replace the tags on the resource with the given set. + /// The tags to set on the resource. /// The cancellation token to use. /// is null. public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.SetTags"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.SetTags"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); + GetTagResource().Delete(WaitUntil.Completed, cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new SqlVmGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); + return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmGroupPatch(); + SqlVmGroupData current = Get(cancellationToken: cancellationToken).Value.Data; + SqlVmGroupPatch patch = new SqlVmGroupPatch(); patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -721,27 +655,7 @@ public virtual Response SetTags(IDictionary } } - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// + /// Removes a tag by key from the resource. /// The key for the tag. /// The cancellation token to use. /// is null. @@ -749,28 +663,34 @@ public virtual async Task> RemoveTagAsync(string ke { Argument.AssertNotNull(key, nameof(key)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.RemoveTag"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.RemoveTag"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new SqlVmGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); + return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmGroupPatch(); - foreach (var tag in current.Tags) + SqlVmGroupData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + SqlVmGroupPatch patch = new SqlVmGroupPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -781,27 +701,7 @@ public virtual async Task> RemoveTagAsync(string ke } } - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName} - /// - /// - /// Operation Id - /// SqlVirtualMachineGroups_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// + /// Removes a tag by key from the resource. /// The key for the tag. /// The cancellation token to use. /// is null. @@ -809,28 +709,34 @@ public virtual Response RemoveTag(string key, CancellationTo { Argument.AssertNotNull(key, nameof(key)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.RemoveTag"); + using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.RemoveTag"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - var originalTags = GetTagResource().Get(cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new SqlVmGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); + return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmGroupPatch(); - foreach (var tag in current.Tags) + SqlVmGroupData current = Get(cancellationToken: cancellationToken).Value.Data; + SqlVmGroupPatch patch = new SqlVmGroupPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -840,5 +746,40 @@ public virtual Response RemoveTag(string key, CancellationTo throw; } } + + /// Gets a collection of AvailabilityGroupListeners in the . + /// An object representing collection of AvailabilityGroupListeners and their operations over a AvailabilityGroupListenerResource. + public virtual AvailabilityGroupListenerCollection GetAvailabilityGroupListeners() + { + return GetCachedClient(client => new AvailabilityGroupListenerCollection(client, Id)); + } + + /// Gets an availability group listener. + /// Name of the availability group listener. + /// The child resources to include in the response. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAvailabilityGroupListenerAsync(string availabilityGroupListenerName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); + + return await GetAvailabilityGroupListeners().GetAsync(availabilityGroupListenerName, expand, cancellationToken).ConfigureAwait(false); + } + + /// Gets an availability group listener. + /// Name of the availability group listener. + /// The child resources to include in the response. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAvailabilityGroupListener(string availabilityGroupListenerName, string expand = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); + + return GetAvailabilityGroupListeners().Get(availabilityGroupListenerName, expand, cancellationToken); + } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs index 597819481e86..ada8649d8c31 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs @@ -11,19 +11,29 @@ namespace Azure.ResourceManager.SqlVirtualMachine { + /// public partial class SqlVmResource : IJsonModel { - private static SqlVmData s_dataDeserializationInstance; - private static SqlVmData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + private static IJsonModel s_dataDeserializationInstance; + private static IJsonModel DataDeserializationInstance => s_dataDeserializationInstance ??= new SqlVmData(); + + /// The writer to serialize the model to. + /// The client options for reading and writing models. void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + /// The reader for deserializing the model. + /// The client options for reading and writing models. + SqlVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => DataDeserializationInstance.Create(ref reader, options); + /// The client options for reading and writing models. BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlVirtualMachineContext.Default); + /// The binary data to be processed. + /// The client options for reading and writing models. SqlVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlVirtualMachineContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => DataDeserializationInstance.GetFormatFromOptions(options); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs index 1b32290f49c4..c4cfe1337a20 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs @@ -7,47 +7,39 @@ using System; using System.Collections.Generic; -using System.Globalization; +using System.Diagnostics; using System.Threading; using System.Threading.Tasks; +using Azure; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager; using Azure.ResourceManager.Resources; using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { /// - /// A Class representing a SqlVm along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetSqlVmResource method. - /// Otherwise you can get one from its parent resource using the GetSqlVm method. + /// A class representing a SqlVm along with the instance operations that can be performed on it. + /// If you have a you can construct a from an instance of using the GetResource method. + /// Otherwise you can get one from its parent resource using the GetSqlVms method. /// public partial class SqlVmResource : ArmResource { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The sqlVmName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVmName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _sqlVmSqlVirtualMachinesClientDiagnostics; - private readonly SqlVirtualMachinesRestOperations _sqlVmSqlVirtualMachinesRestClient; + private readonly ClientDiagnostics _sqlVirtualMachinesClientDiagnostics; + private readonly SqlVirtualMachines _sqlVirtualMachinesRestClient; + private readonly ClientDiagnostics _sqlVirtualMachineTroubleshootClientDiagnostics; + private readonly SqlVirtualMachineTroubleshoot _sqlVirtualMachineTroubleshootRestClient; private readonly SqlVmData _data; - /// Gets the resource type for the operations. public static readonly ResourceType ResourceType = "Microsoft.SqlVirtualMachine/sqlVirtualMachines"; - /// Initializes a new instance of the class for mocking. + /// Initializes a new instance of SqlVmResource for mocking. protected SqlVmResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The resource that is the target of operations. internal SqlVmResource(ArmClient client, SqlVmData data) : this(client, data.Id) @@ -56,72 +48,95 @@ internal SqlVmResource(ArmClient client, SqlVmData data) : this(client, data.Id) _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of class. /// The client parameters to use in these operations. /// The identifier of the resource that is the target of operations. internal SqlVmResource(ArmClient client, ResourceIdentifier id) : base(client, id) { - _sqlVmSqlVirtualMachinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string sqlVmSqlVirtualMachinesApiVersion); - _sqlVmSqlVirtualMachinesRestClient = new SqlVirtualMachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlVmSqlVirtualMachinesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif + TryGetApiVersion(ResourceType, out string sqlVmApiVersion); + _sqlVirtualMachinesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", ResourceType.Namespace, Diagnostics); + _sqlVirtualMachinesRestClient = new SqlVirtualMachines(_sqlVirtualMachinesClientDiagnostics, Pipeline, Endpoint, sqlVmApiVersion ?? "2023-10-01"); + _sqlVirtualMachineTroubleshootClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", ResourceType.Namespace, Diagnostics); + _sqlVirtualMachineTroubleshootRestClient = new SqlVirtualMachineTroubleshoot(_sqlVirtualMachineTroubleshootClientDiagnostics, Pipeline, Endpoint, sqlVmApiVersion ?? "2023-10-01"); + ValidateResourceId(id); } /// Gets whether or not the current instance has data. public virtual bool HasData { get; } /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. public virtual SqlVmData Data { get { if (!HasData) + { throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + } return _data; } } + /// Generate the resource identifier for this resource. + /// The subscriptionId. + /// The resourceGroupName. + /// The sqlVirtualMachineName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) + { + string resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}"; + return new ResourceIdentifier(resourceId); + } + + /// + [Conditional("DEBUG")] internal static void ValidateResourceId(ResourceIdentifier id) { if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + { + throw new ArgumentException(string.Format("Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), id); + } } /// /// Gets a SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Operation Id. + /// SqlVirtualMachines_Get. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The child resources to include in the response. /// The cancellation token to use. - public virtual async Task> GetAsync(string expand = null, CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(string expand = default, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Get"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Get"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SqlVmData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -135,34 +150,42 @@ public virtual async Task> GetAsync(string expand = null /// Gets a SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Operation Id. + /// SqlVirtualMachines_Get. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// The child resources to include in the response. /// The cancellation token to use. - public virtual Response Get(string expand = null, CancellationToken cancellationToken = default) + public virtual Response Get(string expand = default, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Get"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Get"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SqlVmData.FromResponse(result), result); if (response.Value == null) + { throw new RequestFailedException(response.GetRawResponse()); + } return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -172,24 +195,142 @@ public virtual Response Get(string expand = null, CancellationTok } } + /// + /// Updates SQL virtual machine tags. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. + /// + /// + /// Operation Id. + /// SqlVirtualMachines_Update. + /// + /// + /// Default Api Version. + /// 2023-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The SQL virtual machine. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlVmPatch sqlVmPatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(sqlVmPatch, nameof(sqlVmPatch)); + + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmPatch.ToRequestContent(sqlVmPatch), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new SqlVmOperationSource(Client), + _sqlVirtualMachinesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates SQL virtual machine tags. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. + /// + /// + /// Operation Id. + /// SqlVirtualMachines_Update. + /// + /// + /// Default Api Version. + /// 2023-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The SQL virtual machine. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmPatch sqlVmPatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(sqlVmPatch, nameof(sqlVmPatch)); + + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Update"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmPatch.ToRequestContent(sqlVmPatch), context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new SqlVmOperationSource(Client), + _sqlVirtualMachinesClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Deletes a SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Operation Id - /// SqlVirtualMachines_Delete + /// Operation Id. + /// SqlVirtualMachines_Delete. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -197,14 +338,21 @@ public virtual Response Get(string expand = null, CancellationTok /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Delete"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Delete"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(_sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, _sqlVmSqlVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachinesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -218,20 +366,20 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// Deletes a SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}. /// /// - /// Operation Id - /// SqlVirtualMachines_Delete + /// Operation Id. + /// SqlVirtualMachines_Delete. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -239,14 +387,21 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// The cancellation token to use. public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Delete"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Delete"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(_sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, _sqlVmSqlVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachinesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -257,42 +412,49 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Updates a SQL virtual machine. + /// Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/fetchDCAssessment. /// /// - /// Operation Id - /// SqlVirtualMachines_Update + /// Operation Id. + /// SqlVirtualMachines_FetchDCAssessment. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The SQL virtual machine. + /// Disk Config Assessment property. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlVmPatch patch, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task FetchDCAssessmentAsync(WaitUntil waitUntil, SqlVmDiskConfigAssessmentContent sqlVmDiskConfigAssessmentContent, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(sqlVmDiskConfigAssessmentContent, nameof(sqlVmDiskConfigAssessmentContent)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Update"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.FetchDCAssessment"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(new SqlVmOperationSource(Client), _sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, _sqlVmSqlVirtualMachinesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateFetchDCAssessmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmDiskConfigAssessmentContent.ToRequestContent(sqlVmDiskConfigAssessmentContent), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachinesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + { + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -303,42 +465,49 @@ public virtual async Task> UpdateAsync(WaitUntil wai } /// - /// Updates a SQL virtual machine. + /// Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/fetchDCAssessment. /// /// - /// Operation Id - /// SqlVirtualMachines_Update + /// Operation Id. + /// SqlVirtualMachines_FetchDCAssessment. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The SQL virtual machine. + /// Disk Config Assessment property. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmPatch patch, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation FetchDCAssessment(WaitUntil waitUntil, SqlVmDiskConfigAssessmentContent sqlVmDiskConfigAssessmentContent, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(sqlVmDiskConfigAssessmentContent, nameof(sqlVmDiskConfigAssessmentContent)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Update"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.FetchDCAssessment"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(new SqlVmOperationSource(Client), _sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, _sqlVmSqlVirtualMachinesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateFetchDCAssessmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmDiskConfigAssessmentContent.ToRequestContent(sqlVmDiskConfigAssessmentContent), context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachinesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); + { + operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -349,23 +518,23 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmPatc } /// - /// Uninstalls and reinstalls the SQL Iaas Extension. + /// Uninstalls and reinstalls the SQL IaaS Extension. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy. /// /// - /// Operation Id - /// SqlVirtualMachines_Redeploy + /// Operation Id. + /// SqlVirtualMachines_Redeploy. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -373,14 +542,21 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmPatc /// The cancellation token to use. public virtual async Task RedeployAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Redeploy"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Redeploy"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.RedeployAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(_sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, _sqlVmSqlVirtualMachinesRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachinesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -391,23 +567,23 @@ public virtual async Task RedeployAsync(WaitUntil waitUntil, Cance } /// - /// Uninstalls and reinstalls the SQL Iaas Extension. + /// Uninstalls and reinstalls the SQL IaaS Extension. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy. /// /// - /// Operation Id - /// SqlVirtualMachines_Redeploy + /// Operation Id. + /// SqlVirtualMachines_Redeploy. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -415,14 +591,21 @@ public virtual async Task RedeployAsync(WaitUntil waitUntil, Cance /// The cancellation token to use. public virtual ArmOperation Redeploy(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Redeploy"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Redeploy"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Redeploy(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(_sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, _sqlVmSqlVirtualMachinesRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachinesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -433,23 +616,23 @@ public virtual ArmOperation Redeploy(WaitUntil waitUntil, CancellationToken canc } /// - /// Starts Assessment on SQL virtual machine. + /// Starts SQL best practices Assessment on SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment. /// /// - /// Operation Id - /// SqlVirtualMachines_StartAssessment + /// Operation Id. + /// SqlVirtualMachines_StartAssessment. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -457,14 +640,21 @@ public virtual ArmOperation Redeploy(WaitUntil waitUntil, CancellationToken canc /// The cancellation token to use. public virtual async Task StartAssessmentAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.StartAssessment"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.StartAssessment"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.StartAssessmentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new SqlVirtualMachineArmOperation(_sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, _sqlVmSqlVirtualMachinesRestClient.CreateStartAssessmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateStartAssessmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachinesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + } return operation; } catch (Exception e) @@ -475,23 +665,23 @@ public virtual async Task StartAssessmentAsync(WaitUntil waitUntil } /// - /// Starts Assessment on SQL virtual machine. + /// Starts SQL best practices Assessment on SQL virtual machine. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment. /// /// - /// Operation Id - /// SqlVirtualMachines_StartAssessment + /// Operation Id. + /// SqlVirtualMachines_StartAssessment. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// @@ -499,14 +689,21 @@ public virtual async Task StartAssessmentAsync(WaitUntil waitUntil /// The cancellation token to use. public virtual ArmOperation StartAssessment(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.StartAssessment"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.StartAssessment"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.StartAssessment(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new SqlVirtualMachineArmOperation(_sqlVmSqlVirtualMachinesClientDiagnostics, Pipeline, _sqlVmSqlVirtualMachinesRestClient.CreateStartAssessmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateStartAssessmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachinesClientDiagnostics, Pipeline, message.Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) + { operation.WaitForCompletionResponse(cancellationToken); + } return operation; } catch (Exception e) @@ -517,26 +714,124 @@ public virtual ArmOperation StartAssessment(WaitUntil waitUntil, CancellationTok } /// - /// Add a tag to the current resource. + /// Starts SQL virtual machine troubleshooting. /// /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/troubleshoot. /// /// - /// Operation Id - /// SqlVirtualMachines_Get + /// Operation Id. + /// SqlVirtualMachines_Troubleshoot. /// /// - /// Default Api Version - /// 2022-02-01 + /// Default Api Version. + /// 2023-10-01. /// /// - /// Resource - /// + /// Resource. + /// . /// /// /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The SQL virtual machine troubleshooting entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> TroubleshootAsync(WaitUntil waitUntil, SqlVmTroubleshooting sqlVmTroubleshooting, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(sqlVmTroubleshooting, nameof(sqlVmTroubleshooting)); + + using DiagnosticScope scope = _sqlVirtualMachineTroubleshootClientDiagnostics.CreateScope("SqlVmResource.Troubleshoot"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineTroubleshootRestClient.CreateTroubleshootRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmTroubleshooting.ToRequestContent(sqlVmTroubleshooting), context); + Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new SqlVmTroubleshootingOperationSource(), + _sqlVirtualMachineTroubleshootClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts SQL virtual machine troubleshooting. + /// + /// + /// Request Path. + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/troubleshoot. + /// + /// + /// Operation Id. + /// SqlVirtualMachines_Troubleshoot. + /// + /// + /// Default Api Version. + /// 2023-10-01. + /// + /// + /// Resource. + /// . + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The SQL virtual machine troubleshooting entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Troubleshoot(WaitUntil waitUntil, SqlVmTroubleshooting sqlVmTroubleshooting, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(sqlVmTroubleshooting, nameof(sqlVmTroubleshooting)); + + using DiagnosticScope scope = _sqlVirtualMachineTroubleshootClientDiagnostics.CreateScope("SqlVmResource.Troubleshoot"); + scope.Start(); + try + { + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachineTroubleshootRestClient.CreateTroubleshootRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmTroubleshooting.ToRequestContent(sqlVmTroubleshooting), context); + Response response = Pipeline.ProcessMessage(message, context); + SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( + new SqlVmTroubleshootingOperationSource(), + _sqlVirtualMachineTroubleshootClientDiagnostics, + Pipeline, + message.Request, + response, + OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + { + operation.WaitForCompletion(cancellationToken); + } + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Add a tag to the current resource. /// The key for the tag. /// The value for the tag. /// The cancellation token to use. @@ -546,28 +841,34 @@ public virtual async Task> AddTagAsync(string key, strin Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.AddTag"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.AddTag"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new SqlVmResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, default, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SqlVmData.FromResponse(result), result); + return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmPatch(); - foreach (var tag in current.Tags) + SqlVmData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + SqlVmPatch patch = new SqlVmPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -578,27 +879,7 @@ public virtual async Task> AddTagAsync(string key, strin } } - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// + /// Add a tag to the current resource. /// The key for the tag. /// The value for the tag. /// The cancellation token to use. @@ -608,28 +889,34 @@ public virtual Response AddTag(string key, string value, Cancella Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.AddTag"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.AddTag"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - var originalTags = GetTagResource().Get(cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); - return Response.FromValue(new SqlVmResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, default, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SqlVmData.FromResponse(result), result); + return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmPatch(); - foreach (var tag in current.Tags) + SqlVmData current = Get(cancellationToken: cancellationToken).Value.Data; + SqlVmPatch patch = new SqlVmPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -640,53 +927,39 @@ public virtual Response AddTag(string key, string value, Cancella } } - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. + /// Replace the tags on the resource with the given set. + /// The tags to set on the resource. /// The cancellation token to use. /// is null. public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.SetTags"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.SetTags"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new SqlVmResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, default, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SqlVmData.FromResponse(result), result); + return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmPatch(); + SqlVmData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + SqlVmPatch patch = new SqlVmPatch(); patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -697,53 +970,39 @@ public virtual async Task> SetTagsAsync(IDictionary - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// - /// The set of tags to use as replacement. + /// Replace the tags on the resource with the given set. + /// The tags to set on the resource. /// The cancellation token to use. /// is null. public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.SetTags"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.SetTags"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); + GetTagResource().Delete(WaitUntil.Completed, cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); - return Response.FromValue(new SqlVmResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, default, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SqlVmData.FromResponse(result), result); + return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmPatch(); + SqlVmData current = Get(cancellationToken: cancellationToken).Value.Data; + SqlVmPatch patch = new SqlVmPatch(); patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -754,27 +1013,7 @@ public virtual Response SetTags(IDictionary tags, } } - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// + /// Removes a tag by key from the resource. /// The key for the tag. /// The cancellation token to use. /// is null. @@ -782,28 +1021,34 @@ public virtual async Task> RemoveTagAsync(string key, Ca { Argument.AssertNotNull(key, nameof(key)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.RemoveTag"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.RemoveTag"); scope.Start(); try { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + if (await CanUseTagResourceAsync(cancellationToken).ConfigureAwait(false)) { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + Response originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new SqlVmResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken).ConfigureAwait(false); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, default, context); + Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + Response response = Response.FromValue(SqlVmData.FromResponse(result), result); + return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } else { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmPatch(); - foreach (var tag in current.Tags) + SqlVmData current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + SqlVmPatch patch = new SqlVmPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + ArmOperation result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); } } @@ -814,27 +1059,7 @@ public virtual async Task> RemoveTagAsync(string key, Ca } } - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName} - /// - /// - /// Operation Id - /// SqlVirtualMachines_Get - /// - /// - /// Default Api Version - /// 2022-02-01 - /// - /// - /// Resource - /// - /// - /// - /// + /// Removes a tag by key from the resource. /// The key for the tag. /// The cancellation token to use. /// is null. @@ -842,28 +1067,34 @@ public virtual Response RemoveTag(string key, CancellationToken c { Argument.AssertNotNull(key, nameof(key)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.RemoveTag"); + using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.RemoveTag"); scope.Start(); try { - if (CanUseTagResource(cancellationToken: cancellationToken)) + if (CanUseTagResource(cancellationToken)) { - var originalTags = GetTagResource().Get(cancellationToken); + Response originalTags = GetTagResource().Get(cancellationToken); originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); - return Response.FromValue(new SqlVmResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken); + RequestContext context = new RequestContext + { + CancellationToken = cancellationToken + }; + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, default, context); + Response result = Pipeline.ProcessMessage(message, context); + Response response = Response.FromValue(SqlVmData.FromResponse(result), result); + return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); } else { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmPatch(); - foreach (var tag in current.Tags) + SqlVmData current = Get(cancellationToken: cancellationToken).Value.Data; + SqlVmPatch patch = new SqlVmPatch(); + foreach (KeyValuePair tag in current.Tags) { patch.Tags.Add(tag); } patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + ArmOperation result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/autorest.md b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/autorest.md.bak similarity index 100% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/autorest.md rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/autorest.md.bak diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml new file mode 100644 index 000000000000..54032c2a6dcf --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/SqlVirtualMachine +commit: 113b466bf76cd86da547beee5300d2ef5210cfb3 +repo: Azure/azure-rest-api-specs +emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json" diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tspCodeModel.json b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tspCodeModel.json new file mode 100644 index 000000000000..79efc70a979c --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tspCodeModel.json @@ -0,0 +1,27279 @@ +{ + "name": "Azure.ResourceManager.SqlVirtualMachine", + "apiVersions": [ + "2023-10-01" + ], + "enums": [ + { + "$id": "1", + "kind": "enum", + "name": "OperationOrigin", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationOrigin", + "valueType": { + "$id": "2", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "3", + "kind": "enumvalue", + "name": "user", + "value": "user", + "valueType": { + "$ref": "2" + }, + "enumType": { + "$ref": "1" + }, + "decorators": [] + }, + { + "$id": "4", + "kind": "enumvalue", + "name": "system", + "value": "system", + "valueType": { + "$ref": "2" + }, + "enumType": { + "$ref": "1" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "The intended executor of the operation.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json", + "decorators": [] + }, + { + "$id": "5", + "kind": "enum", + "name": "AvailabilityGroupReplicaRole", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Role", + "valueType": { + "$id": "6", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "7", + "kind": "enumvalue", + "name": "Primary", + "value": "Primary", + "valueType": { + "$ref": "6" + }, + "enumType": { + "$ref": "5" + }, + "decorators": [] + }, + { + "$id": "8", + "kind": "enumvalue", + "name": "Secondary", + "value": "Secondary", + "valueType": { + "$ref": "6" + }, + "enumType": { + "$ref": "5" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Replica Role in availability group.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "9", + "kind": "enum", + "name": "AvailabilityGroupReplicaCommitMode", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Commit", + "valueType": { + "$id": "10", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "11", + "kind": "enumvalue", + "name": "Synchronous_Commit", + "value": "Synchronous_Commit", + "valueType": { + "$ref": "10" + }, + "enumType": { + "$ref": "9" + }, + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "Asynchronous_Commit", + "value": "Asynchronous_Commit", + "valueType": { + "$ref": "10" + }, + "enumType": { + "$ref": "9" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Replica commit mode in availability group.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "13", + "kind": "enum", + "name": "AvailabilityGroupReplicaFailoverMode", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Failover", + "valueType": { + "$id": "14", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "15", + "kind": "enumvalue", + "name": "Automatic", + "value": "Automatic", + "valueType": { + "$ref": "14" + }, + "enumType": { + "$ref": "13" + }, + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$ref": "14" + }, + "enumType": { + "$ref": "13" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Replica failover mode in availability group.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "17", + "kind": "enum", + "name": "ReadableSecondaryMode", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ReadableSecondary", + "valueType": { + "$id": "18", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "19", + "kind": "enumvalue", + "name": "No", + "value": "No", + "valueType": { + "$ref": "18" + }, + "enumType": { + "$ref": "17" + }, + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", + "name": "All", + "value": "All", + "valueType": { + "$ref": "18" + }, + "enumType": { + "$ref": "17" + }, + "decorators": [] + }, + { + "$id": "21", + "kind": "enumvalue", + "name": "Read_Only", + "value": "Read_Only", + "valueType": { + "$ref": "18" + }, + "enumType": { + "$ref": "17" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Replica readable secondary mode in availability group.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "22", + "kind": "enum", + "name": "createdByType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "24", + "kind": "enumvalue", + "name": "User", + "value": "User", + "valueType": { + "$ref": "23" + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by a user.", + "decorators": [] + }, + { + "$id": "25", + "kind": "enumvalue", + "name": "Application", + "value": "Application", + "valueType": { + "$ref": "23" + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by an application.", + "decorators": [] + }, + { + "$id": "26", + "kind": "enumvalue", + "name": "ManagedIdentity", + "value": "ManagedIdentity", + "valueType": { + "$ref": "23" + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by a managed identity.", + "decorators": [] + }, + { + "$id": "27", + "kind": "enumvalue", + "name": "Key", + "value": "Key", + "valueType": { + "$ref": "23" + }, + "enumType": { + "$ref": "22" + }, + "doc": "The entity was created by a key.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "The kind of entity that created the resource.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "28", + "kind": "enum", + "name": "ResourceProvisioningState", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "30", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$ref": "29" + }, + "enumType": { + "$ref": "28" + }, + "doc": "Resource has been created.", + "decorators": [] + }, + { + "$id": "31", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$ref": "29" + }, + "enumType": { + "$ref": "28" + }, + "doc": "Resource creation failed.", + "decorators": [] + }, + { + "$id": "32", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$ref": "29" + }, + "enumType": { + "$ref": "28" + }, + "doc": "Resource creation was canceled.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "The provisioning state of a resource type.", + "isFixed": false, + "isFlags": false, + "usage": "LroPolling", + "decorators": [] + }, + { + "$id": "33", + "kind": "enum", + "name": "SqlServerLicenseType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlServerLicenseType", + "valueType": { + "$id": "34", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "35", + "kind": "enumvalue", + "name": "Payg", + "value": "PAYG", + "valueType": { + "$ref": "34" + }, + "enumType": { + "$ref": "33" + }, + "decorators": [] + }, + { + "$id": "36", + "kind": "enumvalue", + "name": "Ahub", + "value": "AHUB", + "valueType": { + "$ref": "34" + }, + "enumType": { + "$ref": "33" + }, + "decorators": [] + }, + { + "$id": "37", + "kind": "enumvalue", + "name": "DR", + "value": "DR", + "valueType": { + "$ref": "34" + }, + "enumType": { + "$ref": "33" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "SQL Server license type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "38", + "kind": "enum", + "name": "SqlManagementMode", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlManagementMode", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "40", + "kind": "enumvalue", + "name": "Full", + "value": "Full", + "valueType": { + "$ref": "39" + }, + "enumType": { + "$ref": "38" + }, + "decorators": [] + }, + { + "$id": "41", + "kind": "enumvalue", + "name": "LightWeight", + "value": "LightWeight", + "valueType": { + "$ref": "39" + }, + "enumType": { + "$ref": "38" + }, + "decorators": [] + }, + { + "$id": "42", + "kind": "enumvalue", + "name": "NoAgent", + "value": "NoAgent", + "valueType": { + "$ref": "39" + }, + "enumType": { + "$ref": "38" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "43", + "kind": "enum", + "name": "LeastPrivilegeMode", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LeastPrivilegeMode", + "valueType": { + "$id": "44", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "45", + "kind": "enumvalue", + "name": "Enabled", + "value": "Enabled", + "valueType": { + "$ref": "44" + }, + "enumType": { + "$ref": "43" + }, + "decorators": [] + }, + { + "$id": "46", + "kind": "enumvalue", + "name": "NotSet", + "value": "NotSet", + "valueType": { + "$ref": "44" + }, + "enumType": { + "$ref": "43" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "SQL IaaS Agent least privilege mode.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "47", + "kind": "enum", + "name": "SqlImageSku", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlImageSku", + "valueType": { + "$id": "48", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "49", + "kind": "enumvalue", + "name": "Developer", + "value": "Developer", + "valueType": { + "$ref": "48" + }, + "enumType": { + "$ref": "47" + }, + "decorators": [] + }, + { + "$id": "50", + "kind": "enumvalue", + "name": "Express", + "value": "Express", + "valueType": { + "$ref": "48" + }, + "enumType": { + "$ref": "47" + }, + "decorators": [] + }, + { + "$id": "51", + "kind": "enumvalue", + "name": "Standard", + "value": "Standard", + "valueType": { + "$ref": "48" + }, + "enumType": { + "$ref": "47" + }, + "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "Enterprise", + "value": "Enterprise", + "valueType": { + "$ref": "48" + }, + "enumType": { + "$ref": "47" + }, + "decorators": [] + }, + { + "$id": "53", + "kind": "enumvalue", + "name": "Web", + "value": "Web", + "valueType": { + "$ref": "48" + }, + "enumType": { + "$ref": "47" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "SQL Server edition type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "54", + "kind": "enum", + "name": "SqlVmAutoPatchingDayOfWeek", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.DayOfWeek", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "56", + "kind": "enumvalue", + "name": "Everyday", + "value": "Everyday", + "valueType": { + "$ref": "55" + }, + "enumType": { + "$ref": "54" + }, + "decorators": [] + }, + { + "$id": "57", + "kind": "enumvalue", + "name": "Monday", + "value": "Monday", + "valueType": { + "$ref": "55" + }, + "enumType": { + "$ref": "54" + }, + "decorators": [] + }, + { + "$id": "58", + "kind": "enumvalue", + "name": "Tuesday", + "value": "Tuesday", + "valueType": { + "$ref": "55" + }, + "enumType": { + "$ref": "54" + }, + "decorators": [] + }, + { + "$id": "59", + "kind": "enumvalue", + "name": "Wednesday", + "value": "Wednesday", + "valueType": { + "$ref": "55" + }, + "enumType": { + "$ref": "54" + }, + "decorators": [] + }, + { + "$id": "60", + "kind": "enumvalue", + "name": "Thursday", + "value": "Thursday", + "valueType": { + "$ref": "55" + }, + "enumType": { + "$ref": "54" + }, + "decorators": [] + }, + { + "$id": "61", + "kind": "enumvalue", + "name": "Friday", + "value": "Friday", + "valueType": { + "$ref": "55" + }, + "enumType": { + "$ref": "54" + }, + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "Saturday", + "value": "Saturday", + "valueType": { + "$ref": "55" + }, + "enumType": { + "$ref": "54" + }, + "decorators": [] + }, + { + "$id": "63", + "kind": "enumvalue", + "name": "Sunday", + "value": "Sunday", + "valueType": { + "$ref": "55" + }, + "enumType": { + "$ref": "54" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Day of week to apply the patch on.", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "64", + "kind": "enum", + "name": "AdditionalVmPatch", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AdditionalVmPatch", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "66", + "kind": "enumvalue", + "name": "NotSet", + "value": "NotSet", + "valueType": { + "$ref": "65" + }, + "enumType": { + "$ref": "64" + }, + "decorators": [] + }, + { + "$id": "67", + "kind": "enumvalue", + "name": "MicrosoftUpdate", + "value": "MicrosoftUpdate", + "valueType": { + "$ref": "65" + }, + "enumType": { + "$ref": "64" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Additional Patch to be enable or enabled on the SQL Virtual Machine.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "68", + "kind": "enum", + "name": "SqVmBackupScheduleType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.BackupScheduleType", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "70", + "kind": "enumvalue", + "name": "Manual", + "value": "Manual", + "valueType": { + "$ref": "69" + }, + "enumType": { + "$ref": "68" + }, + "decorators": [] + }, + { + "$id": "71", + "kind": "enumvalue", + "name": "Automated", + "value": "Automated", + "valueType": { + "$ref": "69" + }, + "enumType": { + "$ref": "68" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Backup schedule type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "72", + "kind": "enum", + "name": "SqlVmFullBackupFrequency", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.FullBackupFrequencyType", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "74", + "kind": "enumvalue", + "name": "Daily", + "value": "Daily", + "valueType": { + "$ref": "73" + }, + "enumType": { + "$ref": "72" + }, + "decorators": [] + }, + { + "$id": "75", + "kind": "enumvalue", + "name": "Weekly", + "value": "Weekly", + "valueType": { + "$ref": "73" + }, + "enumType": { + "$ref": "72" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Frequency of full backups. In both cases, full backups begin during the next scheduled time window.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "76", + "kind": "enum", + "name": "SqlVmAutoBackupDayOfWeek", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupDaysOfWeek", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "78", + "kind": "enumvalue", + "name": "Monday", + "value": "Monday", + "valueType": { + "$ref": "77" + }, + "enumType": { + "$ref": "76" + }, + "decorators": [] + }, + { + "$id": "79", + "kind": "enumvalue", + "name": "Tuesday", + "value": "Tuesday", + "valueType": { + "$ref": "77" + }, + "enumType": { + "$ref": "76" + }, + "decorators": [] + }, + { + "$id": "80", + "kind": "enumvalue", + "name": "Wednesday", + "value": "Wednesday", + "valueType": { + "$ref": "77" + }, + "enumType": { + "$ref": "76" + }, + "decorators": [] + }, + { + "$id": "81", + "kind": "enumvalue", + "name": "Thursday", + "value": "Thursday", + "valueType": { + "$ref": "77" + }, + "enumType": { + "$ref": "76" + }, + "decorators": [] + }, + { + "$id": "82", + "kind": "enumvalue", + "name": "Friday", + "value": "Friday", + "valueType": { + "$ref": "77" + }, + "enumType": { + "$ref": "76" + }, + "decorators": [] + }, + { + "$id": "83", + "kind": "enumvalue", + "name": "Saturday", + "value": "Saturday", + "valueType": { + "$ref": "77" + }, + "enumType": { + "$ref": "76" + }, + "decorators": [] + }, + { + "$id": "84", + "kind": "enumvalue", + "name": "Sunday", + "value": "Sunday", + "valueType": { + "$ref": "77" + }, + "enumType": { + "$ref": "76" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "85", + "kind": "enum", + "name": "SqlServerConnectivityType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ConnectivityType", + "valueType": { + "$id": "86", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "87", + "kind": "enumvalue", + "name": "Local", + "value": "LOCAL", + "valueType": { + "$ref": "86" + }, + "enumType": { + "$ref": "85" + }, + "decorators": [] + }, + { + "$id": "88", + "kind": "enumvalue", + "name": "Private", + "value": "PRIVATE", + "valueType": { + "$ref": "86" + }, + "enumType": { + "$ref": "85" + }, + "decorators": [] + }, + { + "$id": "89", + "kind": "enumvalue", + "name": "Public", + "value": "PUBLIC", + "valueType": { + "$ref": "86" + }, + "enumType": { + "$ref": "85" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "SQL Server connectivity option.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "90", + "kind": "enum", + "name": "SqlWorkloadType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlWorkloadType", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "92", + "kind": "enumvalue", + "name": "General", + "value": "GENERAL", + "valueType": { + "$ref": "91" + }, + "enumType": { + "$ref": "90" + }, + "decorators": [] + }, + { + "$id": "93", + "kind": "enumvalue", + "name": "Oltp", + "value": "OLTP", + "valueType": { + "$ref": "91" + }, + "enumType": { + "$ref": "90" + }, + "decorators": [] + }, + { + "$id": "94", + "kind": "enumvalue", + "name": "DW", + "value": "DW", + "valueType": { + "$ref": "91" + }, + "enumType": { + "$ref": "90" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "SQL Server workload type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "95", + "kind": "enum", + "name": "SqlVmDiskConfigurationType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.DiskConfigurationType", + "valueType": { + "$id": "96", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "97", + "kind": "enumvalue", + "name": "New", + "value": "NEW", + "valueType": { + "$ref": "96" + }, + "enumType": { + "$ref": "95" + }, + "decorators": [] + }, + { + "$id": "98", + "kind": "enumvalue", + "name": "Extend", + "value": "EXTEND", + "valueType": { + "$ref": "96" + }, + "enumType": { + "$ref": "95" + }, + "decorators": [] + }, + { + "$id": "99", + "kind": "enumvalue", + "name": "Add", + "value": "ADD", + "valueType": { + "$ref": "96" + }, + "enumType": { + "$ref": "95" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Disk configuration to apply to SQL Server.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "100", + "kind": "enum", + "name": "SqlVmStorageWorkloadType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageWorkloadType", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "102", + "kind": "enumvalue", + "name": "General", + "value": "GENERAL", + "valueType": { + "$ref": "101" + }, + "enumType": { + "$ref": "100" + }, + "decorators": [] + }, + { + "$id": "103", + "kind": "enumvalue", + "name": "Oltp", + "value": "OLTP", + "valueType": { + "$ref": "101" + }, + "enumType": { + "$ref": "100" + }, + "decorators": [] + }, + { + "$id": "104", + "kind": "enumvalue", + "name": "DW", + "value": "DW", + "valueType": { + "$ref": "101" + }, + "enumType": { + "$ref": "100" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Storage workload type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "105", + "kind": "enum", + "name": "TroubleshootingScenario", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingScenario", + "valueType": { + "$id": "106", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "107", + "kind": "enumvalue", + "name": "UnhealthyReplica", + "value": "UnhealthyReplica", + "valueType": { + "$ref": "106" + }, + "enumType": { + "$ref": "105" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "SQL VM troubleshooting scenario.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "108", + "kind": "enum", + "name": "SqlVmAssessmentDayOfWeek", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AssessmentDayOfWeek", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "110", + "kind": "enumvalue", + "name": "Monday", + "value": "Monday", + "valueType": { + "$ref": "109" + }, + "enumType": { + "$ref": "108" + }, + "decorators": [] + }, + { + "$id": "111", + "kind": "enumvalue", + "name": "Tuesday", + "value": "Tuesday", + "valueType": { + "$ref": "109" + }, + "enumType": { + "$ref": "108" + }, + "decorators": [] + }, + { + "$id": "112", + "kind": "enumvalue", + "name": "Wednesday", + "value": "Wednesday", + "valueType": { + "$ref": "109" + }, + "enumType": { + "$ref": "108" + }, + "decorators": [] + }, + { + "$id": "113", + "kind": "enumvalue", + "name": "Thursday", + "value": "Thursday", + "valueType": { + "$ref": "109" + }, + "enumType": { + "$ref": "108" + }, + "decorators": [] + }, + { + "$id": "114", + "kind": "enumvalue", + "name": "Friday", + "value": "Friday", + "valueType": { + "$ref": "109" + }, + "enumType": { + "$ref": "108" + }, + "decorators": [] + }, + { + "$id": "115", + "kind": "enumvalue", + "name": "Saturday", + "value": "Saturday", + "valueType": { + "$ref": "109" + }, + "enumType": { + "$ref": "108" + }, + "decorators": [] + }, + { + "$id": "116", + "kind": "enumvalue", + "name": "Sunday", + "value": "Sunday", + "valueType": { + "$ref": "109" + }, + "enumType": { + "$ref": "108" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Day of the week to run assessment.", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "117", + "kind": "enum", + "name": "AdditionalOsPatch", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AdditionalOsPatch", + "valueType": { + "$id": "118", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "119", + "kind": "enumvalue", + "name": "WU", + "value": "WU", + "valueType": { + "$ref": "118" + }, + "enumType": { + "$ref": "117" + }, + "decorators": [] + }, + { + "$id": "120", + "kind": "enumvalue", + "name": "WUMU", + "value": "WUMU", + "valueType": { + "$ref": "118" + }, + "enumType": { + "$ref": "117" + }, + "decorators": [] + }, + { + "$id": "121", + "kind": "enumvalue", + "name": "WSUS", + "value": "WSUS", + "valueType": { + "$ref": "118" + }, + "enumType": { + "$ref": "117" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Additional VM Patching solution enabled on the Virtual Machine", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "122", + "kind": "enum", + "name": "VmIdentityType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.VmIdentityType", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "124", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$ref": "123" + }, + "enumType": { + "$ref": "122" + }, + "decorators": [] + }, + { + "$id": "125", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$ref": "123" + }, + "enumType": { + "$ref": "122" + }, + "decorators": [] + }, + { + "$id": "126", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$ref": "123" + }, + "enumType": { + "$ref": "122" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Identity type of the virtual machine. Specify None to opt-out of Managed Identities.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "127", + "kind": "enum", + "name": "OsType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OsType", + "valueType": { + "$id": "128", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "129", + "kind": "enumvalue", + "name": "Windows", + "value": "Windows", + "valueType": { + "$ref": "128" + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + }, + { + "$id": "130", + "kind": "enumvalue", + "name": "Linux", + "value": "Linux", + "valueType": { + "$ref": "128" + }, + "enumType": { + "$ref": "127" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Operating System of the current SQL Virtual Machine.", + "isFixed": true, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "131", + "kind": "enum", + "name": "ManagedServiceIdentityType", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", + "valueType": { + "$id": "132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "133", + "kind": "enumvalue", + "name": "None", + "value": "None", + "valueType": { + "$ref": "132" + }, + "enumType": { + "$ref": "131" + }, + "doc": "No managed identity.", + "decorators": [] + }, + { + "$id": "134", + "kind": "enumvalue", + "name": "SystemAssigned", + "value": "SystemAssigned", + "valueType": { + "$ref": "132" + }, + "enumType": { + "$ref": "131" + }, + "doc": "System assigned managed identity.", + "decorators": [] + }, + { + "$id": "135", + "kind": "enumvalue", + "name": "UserAssigned", + "value": "UserAssigned", + "valueType": { + "$ref": "132" + }, + "enumType": { + "$ref": "131" + }, + "doc": "User assigned managed identity.", + "decorators": [] + }, + { + "$id": "136", + "kind": "enumvalue", + "name": "SystemAssigned,UserAssigned", + "value": "SystemAssigned,UserAssigned", + "valueType": { + "$ref": "132" + }, + "enumType": { + "$ref": "131" + }, + "doc": "System and user assigned managed identity.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "137", + "kind": "enum", + "name": "SqlVmGroupImageSku", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmGroupImageSku", + "valueType": { + "$id": "138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "139", + "kind": "enumvalue", + "name": "Developer", + "value": "Developer", + "valueType": { + "$ref": "138" + }, + "enumType": { + "$ref": "137" + }, + "decorators": [] + }, + { + "$id": "140", + "kind": "enumvalue", + "name": "Enterprise", + "value": "Enterprise", + "valueType": { + "$ref": "138" + }, + "enumType": { + "$ref": "137" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "SQL image sku.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "141", + "kind": "enum", + "name": "SqlVmGroupScaleType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ScaleType", + "valueType": { + "$id": "142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "143", + "kind": "enumvalue", + "name": "HA", + "value": "HA", + "valueType": { + "$ref": "142" + }, + "enumType": { + "$ref": "141" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Scale type.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "144", + "kind": "enum", + "name": "SqlVmClusterManagerType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ClusterManagerType", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "146", + "kind": "enumvalue", + "name": "WindowsServerFailoverCluster", + "value": "WSFC", + "valueType": { + "$ref": "145" + }, + "enumType": { + "$ref": "144" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "147", + "kind": "enum", + "name": "SqlVmClusterConfiguration", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ClusterConfiguration", + "valueType": { + "$id": "148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "149", + "kind": "enumvalue", + "name": "Domainful", + "value": "Domainful", + "valueType": { + "$ref": "148" + }, + "enumType": { + "$ref": "147" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Cluster type.", + "isFixed": false, + "isFlags": false, + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "150", + "kind": "enum", + "name": "SqlVmClusterSubnetType", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ClusterSubnetType", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "152", + "kind": "enumvalue", + "name": "SingleSubnet", + "value": "SingleSubnet", + "valueType": { + "$ref": "151" + }, + "enumType": { + "$ref": "150" + }, + "decorators": [] + }, + { + "$id": "153", + "kind": "enumvalue", + "name": "MultiSubnet", + "value": "MultiSubnet", + "valueType": { + "$ref": "151" + }, + "enumType": { + "$ref": "150" + }, + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "Cluster subnet type.", + "isFixed": false, + "isFlags": false, + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "decorators": [] + }, + { + "$id": "154", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Versions", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "156", + "kind": "enumvalue", + "name": "v2023_10_01", + "value": "2023-10-01", + "valueType": { + "$ref": "155" + }, + "enumType": { + "$ref": "154" + }, + "doc": "The 2023-10-01 API version.", + "decorators": [] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "The available API versions.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "constants": [ + { + "$id": "157", + "kind": "constant", + "name": "listContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "158", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "159", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "160", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "161", + "kind": "constant", + "name": "createOrUpdateContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "162", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "163", + "kind": "constant", + "name": "createOrUpdateContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "164", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "165", + "kind": "constant", + "name": "createOrUpdateContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "166", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "167", + "kind": "constant", + "name": "createOrUpdateContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "168", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "169", + "kind": "constant", + "name": "listByGroupContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "170", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "171", + "kind": "constant", + "name": "getContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "172", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "173", + "kind": "constant", + "name": "createOrUpdateContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "174", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "175", + "kind": "constant", + "name": "createOrUpdateContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "176", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "177", + "kind": "constant", + "name": "createOrUpdateContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "178", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "179", + "kind": "constant", + "name": "createOrUpdateContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "180", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "181", + "kind": "constant", + "name": "updateContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "183", + "kind": "constant", + "name": "updateContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "185", + "kind": "constant", + "name": "updateContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "186", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "187", + "kind": "constant", + "name": "updateContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "188", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "189", + "kind": "constant", + "name": "listByResourceGroupContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "190", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "191", + "kind": "constant", + "name": "listContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "193", + "kind": "constant", + "name": "fetchDCAssessmentContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "194", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "195", + "kind": "constant", + "name": "fetchDCAssessmentContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "196", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "197", + "kind": "constant", + "name": "listBySqlVmGroupContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "198", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "199", + "kind": "constant", + "name": "getContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "200", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "201", + "kind": "constant", + "name": "createOrUpdateContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "202", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "203", + "kind": "constant", + "name": "createOrUpdateContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "204", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "205", + "kind": "constant", + "name": "createOrUpdateContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "206", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "207", + "kind": "constant", + "name": "createOrUpdateContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "208", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "209", + "kind": "constant", + "name": "updateContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "210", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "211", + "kind": "constant", + "name": "updateContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "213", + "kind": "constant", + "name": "updateContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "214", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "215", + "kind": "constant", + "name": "updateContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "216", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "217", + "kind": "constant", + "name": "listByResourceGroupContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "218", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "219", + "kind": "constant", + "name": "listContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "220", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "221", + "kind": "constant", + "name": "troubleshootContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "222", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "223", + "kind": "constant", + "name": "troubleshootContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "224", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "225", + "kind": "constant", + "name": "troubleshootContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "226", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "227", + "kind": "constant", + "name": "troubleshootContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "228", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "229", + "kind": "model", + "name": "OperationListResult", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationListResult", + "usage": "Output,Json", + "doc": "Virtual machine resource id for response.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "230", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The Operation items on this page", + "type": { + "$id": "231", + "kind": "array", + "name": "ArrayOperation", + "valueType": { + "$id": "232", + "kind": "model", + "name": "Info", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation", + "usage": "Output,Json", + "doc": "Result of the request to list SQL operations.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "233", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operation being performed on this particular object.\"", + "type": { + "$id": "234", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation.name", + "serializationOptions": { + "json": { + "name": "name" + } + }, + "isHttpMetadata": false + }, + { + "$id": "235", + "kind": "property", + "name": "display", + "serializedName": "display", + "doc": "he localized display information for this particular operation / action.", + "type": { + "$id": "236", + "kind": "model", + "name": "OperationDisplay", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationDisplay", + "usage": "Output,Json", + "doc": "Display metadata associated with the operation.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "237", + "kind": "property", + "name": "provider", + "serializedName": "provider", + "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", + "type": { + "$id": "238", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationDisplay.provider", + "serializationOptions": { + "json": { + "name": "provider" + } + }, + "isHttpMetadata": false + }, + { + "$id": "239", + "kind": "property", + "name": "resource", + "serializedName": "resource", + "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", + "type": { + "$id": "240", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationDisplay.resource", + "serializationOptions": { + "json": { + "name": "resource" + } + }, + "isHttpMetadata": false + }, + { + "$id": "241", + "kind": "property", + "name": "operation", + "serializedName": "operation", + "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", + "type": { + "$id": "242", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationDisplay.operation", + "serializationOptions": { + "json": { + "name": "operation" + } + }, + "isHttpMetadata": false + }, + { + "$id": "243", + "kind": "property", + "name": "description", + "serializedName": "description", + "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + "type": { + "$id": "244", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationDisplay.description", + "serializationOptions": { + "json": { + "name": "description" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation.display", + "serializationOptions": { + "json": { + "name": "display" + } + }, + "isHttpMetadata": false + }, + { + "$id": "245", + "kind": "property", + "name": "origin", + "serializedName": "origin", + "doc": "The intended executor of the operation.\"", + "type": { + "$ref": "1" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation.origin", + "serializationOptions": { + "json": { + "name": "origin" + } + }, + "isHttpMetadata": false + }, + { + "$id": "246", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Additional descriptions for the operation.", + "type": { + "$id": "247", + "kind": "dict", + "keyType": { + "$id": "248", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "249", + "kind": "model", + "name": "OperationProperty", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation.property.anonymous", + "usage": "Output,Json", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation.properties", + "serializationOptions": { + "json": { + "name": "properties" + } + }, + "isHttpMetadata": false + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationListResult.value", + "serializationOptions": { + "json": { + "name": "value" + } + }, + "isHttpMetadata": false + }, + { + "$id": "250", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "251", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "252", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationListResult.nextLink", + "serializationOptions": { + "json": { + "name": "nextLink" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$ref": "232" + }, + { + "$ref": "236" + }, + { + "$ref": "249" + }, + { + "$id": "253", + "kind": "model", + "name": "ErrorResponse", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "usage": "Json,Exception", + "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "summary": "Error response", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "254", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "The error object.", + "type": { + "$id": "255", + "kind": "model", + "name": "ErrorDetail", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "usage": "Json,Exception,LroPolling", + "doc": "The error detail.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "256", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "The error code.", + "type": { + "$id": "257", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", + "serializationOptions": { + "json": { + "name": "code" + } + }, + "isHttpMetadata": false + }, + { + "$id": "258", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "The error message.", + "type": { + "$id": "259", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", + "serializationOptions": { + "json": { + "name": "message" + } + }, + "isHttpMetadata": false + }, + { + "$id": "260", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The error target.", + "type": { + "$id": "261", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", + "serializationOptions": { + "json": { + "name": "target" + } + }, + "isHttpMetadata": false + }, + { + "$id": "262", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "The error details.", + "type": { + "$id": "263", + "kind": "array", + "name": "ArrayErrorDetail", + "valueType": { + "$ref": "255" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", + "serializationOptions": { + "json": { + "name": "details" + } + }, + "isHttpMetadata": false + }, + { + "$id": "264", + "kind": "property", + "name": "additionalInfo", + "serializedName": "additionalInfo", + "doc": "The error additional info.", + "type": { + "$id": "265", + "kind": "array", + "name": "ArrayErrorAdditionalInfo", + "valueType": { + "$id": "266", + "kind": "model", + "name": "ErrorAdditionalInfo", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "usage": "Json,Exception,LroPolling", + "doc": "The resource management error additional info.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "267", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The additional info type.", + "type": { + "$id": "268", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", + "serializationOptions": { + "json": { + "name": "type" + } + }, + "isHttpMetadata": false + }, + { + "$id": "269", + "kind": "property", + "name": "info", + "serializedName": "info", + "doc": "The additional info.", + "type": { + "$id": "270", + "kind": "unknown", + "name": "unknown", + "crossLanguageDefinitionId": "", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", + "serializationOptions": { + "json": { + "name": "info" + } + }, + "isHttpMetadata": false + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", + "serializationOptions": { + "json": { + "name": "additionalInfo" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", + "serializationOptions": { + "json": { + "name": "error" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$ref": "255" + }, + { + "$ref": "266" + }, + { + "$id": "271", + "kind": "model", + "name": "AvailabilityGroupListener", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListener", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A SQL Server availability group listener.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, + { + "name": "Azure.ResourceManager.Private.@armResourceInternal", + "arguments": {} + }, + { + "name": "TypeSpec.Rest.@parentResource", + "arguments": {} + } + ], + "baseModel": { + "$id": "272", + "kind": "model", + "name": "ProxyResource", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", + "summary": "Proxy Resource", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "baseModel": { + "$id": "273", + "kind": "model", + "name": "Resource", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", + "summary": "Resource", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "274", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + "type": { + "$id": "275", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "276", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", + "serializationOptions": { + "json": { + "name": "id" + } + }, + "isHttpMetadata": false + }, + { + "$id": "277", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the resource", + "type": { + "$id": "278", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", + "serializationOptions": { + "json": { + "name": "name" + } + }, + "isHttpMetadata": false + }, + { + "$id": "279", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", + "type": { + "$id": "280", + "kind": "string", + "name": "armResourceType", + "crossLanguageDefinitionId": "Azure.Core.armResourceType", + "baseType": { + "$id": "281", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", + "serializationOptions": { + "json": { + "name": "type" + } + }, + "isHttpMetadata": false + }, + { + "$id": "282", + "kind": "property", + "name": "systemData", + "serializedName": "systemData", + "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", + "type": { + "$id": "283", + "kind": "model", + "name": "SystemData", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Metadata pertaining to creation and last modification of the resource.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "284", + "kind": "property", + "name": "createdBy", + "serializedName": "createdBy", + "doc": "The identity that created the resource.", + "type": { + "$id": "285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", + "serializationOptions": { + "json": { + "name": "createdBy" + } + }, + "isHttpMetadata": false + }, + { + "$id": "286", + "kind": "property", + "name": "createdByType", + "serializedName": "createdByType", + "doc": "The type of identity that created the resource.", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", + "serializationOptions": { + "json": { + "name": "createdByType" + } + }, + "isHttpMetadata": false + }, + { + "$id": "287", + "kind": "property", + "name": "createdAt", + "serializedName": "createdAt", + "doc": "The timestamp of resource creation (UTC).", + "type": { + "$id": "288", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "289", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", + "serializationOptions": { + "json": { + "name": "createdAt" + } + }, + "isHttpMetadata": false + }, + { + "$id": "290", + "kind": "property", + "name": "lastModifiedBy", + "serializedName": "lastModifiedBy", + "doc": "The identity that last modified the resource.", + "type": { + "$id": "291", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", + "serializationOptions": { + "json": { + "name": "lastModifiedBy" + } + }, + "isHttpMetadata": false + }, + { + "$id": "292", + "kind": "property", + "name": "lastModifiedByType", + "serializedName": "lastModifiedByType", + "doc": "The type of identity that last modified the resource.", + "type": { + "$ref": "22" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", + "serializationOptions": { + "json": { + "name": "lastModifiedByType" + } + }, + "isHttpMetadata": false + }, + { + "$id": "293", + "kind": "property", + "name": "lastModifiedAt", + "serializedName": "lastModifiedAt", + "doc": "The timestamp of resource last modification (UTC)", + "type": { + "$id": "294", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", + "serializationOptions": { + "json": { + "name": "lastModifiedAt" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", + "serializationOptions": { + "json": { + "name": "systemData" + } + }, + "isHttpMetadata": false + } + ] + }, + "properties": [] + }, + "properties": [ + { + "$id": "296", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Resource properties.", + "type": { + "$id": "297", + "kind": "model", + "name": "AvailabilityGroupListenerProperties", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of an availability group listener.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "298", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning state to track the async operation status.", + "type": { + "$id": "299", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.provisioningState", + "serializationOptions": { + "json": { + "name": "provisioningState" + } + }, + "isHttpMetadata": false + }, + { + "$id": "300", + "kind": "property", + "name": "availabilityGroupName", + "serializedName": "availabilityGroupName", + "doc": "Name of the availability group.", + "type": { + "$id": "301", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.availabilityGroupName", + "serializationOptions": { + "json": { + "name": "availabilityGroupName" + } + }, + "isHttpMetadata": false + }, + { + "$id": "302", + "kind": "property", + "name": "loadBalancerConfigurations", + "serializedName": "loadBalancerConfigurations", + "doc": "List of load balancer configurations for an availability group listener.", + "type": { + "$id": "303", + "kind": "array", + "name": "ArrayLoadBalancerConfiguration", + "valueType": { + "$id": "304", + "kind": "model", + "name": "AvailabilityGroupListenerLoadBalancerConfiguration", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A load balancer configuration for an availability group listener.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "305", + "kind": "property", + "name": "PrivateIPAddress", + "serializedName": "privateIpAddress", + "doc": "Private IP address.", + "type": { + "$id": "306", + "kind": "model", + "name": "AvailabilityGroupListenerPrivateIPAddress", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.PrivateIPAddress", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A private IP address bound to the availability group listener.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "307", + "kind": "property", + "name": "IPAddress", + "serializedName": "ipAddress", + "doc": "Private IP address bound to the availability group listener.", + "type": { + "$id": "308", + "kind": "string", + "name": "ipV4Address", + "crossLanguageDefinitionId": "Azure.Core.ipV4Address", + "baseType": { + "$id": "309", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.PrivateIPAddress.ipAddress", + "serializationOptions": { + "json": { + "name": "ipAddress" + } + }, + "isHttpMetadata": false + }, + { + "$id": "310", + "kind": "property", + "name": "subnetResourceId", + "serializedName": "subnetResourceId", + "doc": "Subnet used to include private IP.", + "type": { + "$id": "311", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "312", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.PrivateIPAddress.subnetResourceId", + "serializationOptions": { + "json": { + "name": "subnetResourceId" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration.privateIpAddress", + "serializationOptions": { + "json": { + "name": "privateIpAddress" + } + }, + "isHttpMetadata": false + }, + { + "$id": "313", + "kind": "property", + "name": "PublicIPAddressResourceId", + "serializedName": "publicIpAddressResourceId", + "doc": "Resource id of the public IP.", + "type": { + "$id": "314", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "315", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration.publicIpAddressResourceId", + "serializationOptions": { + "json": { + "name": "publicIpAddressResourceId" + } + }, + "isHttpMetadata": false + }, + { + "$id": "316", + "kind": "property", + "name": "loadBalancerResourceId", + "serializedName": "loadBalancerResourceId", + "doc": "Resource id of the load balancer.", + "type": { + "$id": "317", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "318", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration.loadBalancerResourceId", + "serializationOptions": { + "json": { + "name": "loadBalancerResourceId" + } + }, + "isHttpMetadata": false + }, + { + "$id": "319", + "kind": "property", + "name": "probePort", + "serializedName": "probePort", + "doc": "Probe port.", + "type": { + "$id": "320", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration.probePort", + "serializationOptions": { + "json": { + "name": "probePort" + } + }, + "isHttpMetadata": false + }, + { + "$id": "321", + "kind": "property", + "name": "SqlVmInstances", + "serializedName": "sqlVirtualMachineInstances", + "doc": "List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.", + "type": { + "$id": "322", + "kind": "array", + "name": "Array", + "valueType": { + "$id": "323", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "324", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration.sqlVirtualMachineInstances", + "serializationOptions": { + "json": { + "name": "sqlVirtualMachineInstances" + } + }, + "isHttpMetadata": false + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.loadBalancerConfigurations", + "serializationOptions": { + "json": { + "name": "loadBalancerConfigurations" + } + }, + "isHttpMetadata": false + }, + { + "$id": "325", + "kind": "property", + "name": "MultiSubnetIPConfigurations", + "serializedName": "multiSubnetIpConfigurations", + "doc": "List of multi subnet IP configurations for an AG listener.", + "type": { + "$id": "326", + "kind": "array", + "name": "ArrayMultiSubnetIpConfiguration", + "valueType": { + "$id": "327", + "kind": "model", + "name": "MultiSubnetIPConfiguration", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.MultiSubnetIpConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Multi subnet ip configuration for an availability group listener.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "328", + "kind": "property", + "name": "PrivateIPAddress", + "serializedName": "privateIpAddress", + "doc": "Private IP address.", + "type": { + "$ref": "306" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.MultiSubnetIpConfiguration.privateIpAddress", + "serializationOptions": { + "json": { + "name": "privateIpAddress" + } + }, + "isHttpMetadata": false + }, + { + "$id": "329", + "kind": "property", + "name": "SqlVmInstance", + "serializedName": "sqlVirtualMachineInstance", + "doc": "SQL virtual machine instance resource id that are enrolled into the availability group listener.", + "type": { + "$id": "330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.MultiSubnetIpConfiguration.sqlVirtualMachineInstance", + "serializationOptions": { + "json": { + "name": "sqlVirtualMachineInstance" + } + }, + "isHttpMetadata": false + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.multiSubnetIpConfigurations", + "serializationOptions": { + "json": { + "name": "multiSubnetIpConfigurations" + } + }, + "isHttpMetadata": false + }, + { + "$id": "331", + "kind": "property", + "name": "createDefaultAvailabilityGroupIfNotExist", + "serializedName": "createDefaultAvailabilityGroupIfNotExist", + "doc": "Create a default availability group if it does not exist.", + "type": { + "$id": "332", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.createDefaultAvailabilityGroupIfNotExist", + "serializationOptions": { + "json": { + "name": "createDefaultAvailabilityGroupIfNotExist" + } + }, + "isHttpMetadata": false + }, + { + "$id": "333", + "kind": "property", + "name": "port", + "serializedName": "port", + "doc": "Listener port.", + "type": { + "$id": "334", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.port", + "serializationOptions": { + "json": { + "name": "port" + } + }, + "isHttpMetadata": false + }, + { + "$id": "335", + "kind": "property", + "name": "availabilityGroupConfiguration", + "serializedName": "availabilityGroupConfiguration", + "doc": "Availability Group configuration.", + "type": { + "$id": "336", + "kind": "model", + "name": "AvailabilityGroupConfiguration", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgConfiguration", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Availability group configuration.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "337", + "kind": "property", + "name": "replicas", + "serializedName": "replicas", + "doc": "Replica configurations.", + "type": { + "$id": "338", + "kind": "array", + "name": "ArrayAgReplica", + "valueType": { + "$id": "339", + "kind": "model", + "name": "AvailabilityGroupReplica", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Availability group replica configuration.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "340", + "kind": "property", + "name": "SqlVmInstanceId", + "serializedName": "sqlVirtualMachineInstanceId", + "doc": "Sql VirtualMachine Instance Id.", + "type": { + "$id": "341", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "342", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica.sqlVirtualMachineInstanceId", + "serializationOptions": { + "json": { + "name": "sqlVirtualMachineInstanceId" + } + }, + "isHttpMetadata": false + }, + { + "$id": "343", + "kind": "property", + "name": "role", + "serializedName": "role", + "doc": "Replica Role in availability group.", + "type": { + "$ref": "5" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica.role", + "serializationOptions": { + "json": { + "name": "role" + } + }, + "isHttpMetadata": false + }, + { + "$id": "344", + "kind": "property", + "name": "commit", + "serializedName": "commit", + "doc": "Replica commit mode in availability group.", + "type": { + "$ref": "9" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica.commit", + "serializationOptions": { + "json": { + "name": "commit" + } + }, + "isHttpMetadata": false + }, + { + "$id": "345", + "kind": "property", + "name": "failover", + "serializedName": "failover", + "doc": "Replica failover mode in availability group.", + "type": { + "$ref": "13" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica.failover", + "serializationOptions": { + "json": { + "name": "failover" + } + }, + "isHttpMetadata": false + }, + { + "$id": "346", + "kind": "property", + "name": "readableSecondary", + "serializedName": "readableSecondary", + "doc": "Replica readable secondary mode in availability group.", + "type": { + "$ref": "17" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica.readableSecondary", + "serializationOptions": { + "json": { + "name": "readableSecondary" + } + }, + "isHttpMetadata": false + } + ] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgConfiguration.replicas", + "serializationOptions": { + "json": { + "name": "replicas" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.availabilityGroupConfiguration", + "serializationOptions": { + "json": { + "name": "availabilityGroupConfiguration" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [ + { + "name": "Azure.ResourceManager.@flattenProperty", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListener.properties", + "serializationOptions": { + "json": { + "name": "properties" + } + }, + "isHttpMetadata": false + }, + { + "$id": "347", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the availability group listener.", + "type": { + "$id": "348", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListener.name", + "serializationOptions": { + "json": { + "name": "name" + } + }, + "isHttpMetadata": true + } + ] + }, + { + "$ref": "297" + }, + { + "$ref": "304" + }, + { + "$ref": "306" + }, + { + "$ref": "327" + }, + { + "$ref": "336" + }, + { + "$ref": "339" + }, + { + "$ref": "272" + }, + { + "$ref": "273" + }, + { + "$ref": "283" + }, + { + "$id": "349", + "kind": "model", + "name": "ArmOperationStatusResourceProvisioningState", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", + "usage": "LroPolling", + "doc": "Standard Azure Resource Manager operation status response", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "350", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The operation status", + "type": { + "$ref": "28" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", + "serializationOptions": { + "json": { + "name": "status" + } + }, + "isHttpMetadata": false + }, + { + "$id": "351", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The unique identifier for the operationStatus resource", + "type": { + "$id": "352", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", + "serializationOptions": { + "json": { + "name": "id" + } + }, + "isHttpMetadata": true + }, + { + "$id": "353", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of the operationStatus resource", + "type": { + "$id": "354", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", + "serializationOptions": { + "json": { + "name": "name" + } + }, + "isHttpMetadata": false + }, + { + "$id": "355", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Operation start time", + "type": { + "$id": "356", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "357", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", + "serializationOptions": { + "json": { + "name": "startTime" + } + }, + "isHttpMetadata": false + }, + { + "$id": "358", + "kind": "property", + "name": "endTime", + "serializedName": "endTime", + "doc": "Operation complete time", + "type": { + "$id": "359", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "360", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", + "serializationOptions": { + "json": { + "name": "endTime" + } + }, + "isHttpMetadata": false + }, + { + "$id": "361", + "kind": "property", + "name": "percentComplete", + "serializedName": "percentComplete", + "doc": "The progress made toward completing the operation", + "type": { + "$id": "362", + "kind": "float64", + "name": "float64", + "crossLanguageDefinitionId": "TypeSpec.float64", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", + "serializationOptions": { + "json": { + "name": "percentComplete" + } + }, + "isHttpMetadata": false + }, + { + "$id": "363", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Errors that occurred if the operation ended with Canceled or Failed status", + "type": { + "$ref": "255" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", + "serializationOptions": { + "json": { + "name": "error" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "364", + "kind": "model", + "name": "AvailabilityGroupListenerListResult", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a AvailabilityGroupListener list operation.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "365", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The AvailabilityGroupListener items on this page", + "type": { + "$id": "366", + "kind": "array", + "name": "ArrayAvailabilityGroupListener", + "valueType": { + "$ref": "271" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "json": { + "name": "value" + } + }, + "isHttpMetadata": false + }, + { + "$id": "367", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "368", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "369", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "json": { + "name": "nextLink" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "370", + "kind": "model", + "name": "SqlVm", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachine", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A SQL virtual machine.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, + { + "name": "Azure.ResourceManager.Private.@armResourceInternal", + "arguments": {} + } + ], + "baseModel": { + "$id": "371", + "kind": "model", + "name": "TrackedResource", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", + "summary": "Tracked Resource", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "baseModel": { + "$ref": "273" + }, + "properties": [ + { + "$id": "372", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$id": "373", + "kind": "dict", + "keyType": { + "$id": "374", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "375", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", + "serializationOptions": { + "json": { + "name": "tags" + } + }, + "isHttpMetadata": false + }, + { + "$id": "376", + "kind": "property", + "name": "location", + "serializedName": "location", + "doc": "The geo-location where the resource lives", + "type": { + "$id": "377", + "kind": "string", + "name": "azureLocation", + "crossLanguageDefinitionId": "Azure.Core.azureLocation", + "baseType": { + "$id": "378", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", + "serializationOptions": { + "json": { + "name": "location" + } + }, + "isHttpMetadata": false + } + ] + }, + "properties": [ + { + "$id": "379", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Resource properties.", + "type": { + "$id": "380", + "kind": "model", + "name": "SqlVirtualMachineProperties", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The SQL virtual machine properties.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "381", + "kind": "property", + "name": "virtualMachineResourceId", + "serializedName": "virtualMachineResourceId", + "doc": "ARM Resource id of underlying virtual machine created from SQL marketplace image.", + "type": { + "$id": "382", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "383", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.virtualMachineResourceId", + "serializationOptions": { + "json": { + "name": "virtualMachineResourceId" + } + }, + "isHttpMetadata": false + }, + { + "$id": "384", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning state to track the async operation status.", + "type": { + "$id": "385", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.provisioningState", + "serializationOptions": { + "json": { + "name": "provisioningState" + } + }, + "isHttpMetadata": false + }, + { + "$id": "386", + "kind": "property", + "name": "sqlImageOffer", + "serializedName": "sqlImageOffer", + "doc": "SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.", + "type": { + "$id": "387", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.sqlImageOffer", + "serializationOptions": { + "json": { + "name": "sqlImageOffer" + } + }, + "isHttpMetadata": false + }, + { + "$id": "388", + "kind": "property", + "name": "sqlServerLicenseType", + "serializedName": "sqlServerLicenseType", + "doc": "SQL Server license type.", + "type": { + "$ref": "33" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.sqlServerLicenseType", + "serializationOptions": { + "json": { + "name": "sqlServerLicenseType" + } + }, + "isHttpMetadata": false + }, + { + "$id": "389", + "kind": "property", + "name": "sqlManagement", + "serializedName": "sqlManagement", + "doc": "SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it.", + "type": { + "$ref": "38" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.sqlManagement", + "serializationOptions": { + "json": { + "name": "sqlManagement" + } + }, + "isHttpMetadata": false + }, + { + "$id": "390", + "kind": "property", + "name": "leastPrivilegeMode", + "serializedName": "leastPrivilegeMode", + "doc": "SQL IaaS Agent least privilege mode.", + "type": { + "$ref": "43" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.leastPrivilegeMode", + "serializationOptions": { + "json": { + "name": "leastPrivilegeMode" + } + }, + "isHttpMetadata": false + }, + { + "$id": "391", + "kind": "property", + "name": "sqlImageSku", + "serializedName": "sqlImageSku", + "doc": "SQL Server edition type.", + "type": { + "$ref": "47" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.sqlImageSku", + "serializationOptions": { + "json": { + "name": "sqlImageSku" + } + }, + "isHttpMetadata": false + }, + { + "$id": "392", + "kind": "property", + "name": "SqlVmGroupResourceId", + "serializedName": "sqlVirtualMachineGroupResourceId", + "doc": "ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of.", + "type": { + "$id": "393", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "394", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.sqlVirtualMachineGroupResourceId", + "serializationOptions": { + "json": { + "name": "sqlVirtualMachineGroupResourceId" + } + }, + "isHttpMetadata": false + }, + { + "$id": "395", + "kind": "property", + "name": "WindowsServerFailoverClusterDomainCredentials", + "serializedName": "wsfcDomainCredentials", + "doc": "Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.", + "type": { + "$id": "396", + "kind": "model", + "name": "WindowsServerFailoverClusterDomainCredentials", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainCredentials", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "397", + "kind": "property", + "name": "clusterBootstrapAccountPassword", + "serializedName": "clusterBootstrapAccountPassword", + "doc": "Cluster bootstrap account password.", + "type": { + "$id": "398", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainCredentials.clusterBootstrapAccountPassword", + "serializationOptions": { + "json": { + "name": "clusterBootstrapAccountPassword" + } + }, + "isHttpMetadata": false + }, + { + "$id": "399", + "kind": "property", + "name": "clusterOperatorAccountPassword", + "serializedName": "clusterOperatorAccountPassword", + "doc": "Cluster operator account password.", + "type": { + "$id": "400", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainCredentials.clusterOperatorAccountPassword", + "serializationOptions": { + "json": { + "name": "clusterOperatorAccountPassword" + } + }, + "isHttpMetadata": false + }, + { + "$id": "401", + "kind": "property", + "name": "sqlServiceAccountPassword", + "serializedName": "sqlServiceAccountPassword", + "doc": "SQL service account password.", + "type": { + "$id": "402", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainCredentials.sqlServiceAccountPassword", + "serializationOptions": { + "json": { + "name": "sqlServiceAccountPassword" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.wsfcDomainCredentials", + "serializationOptions": { + "json": { + "name": "wsfcDomainCredentials" + } + }, + "isHttpMetadata": false + }, + { + "$id": "403", + "kind": "property", + "name": "WindowsServerFailoverClusterStaticIP", + "serializedName": "wsfcStaticIp", + "doc": "Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.", + "type": { + "$id": "404", + "kind": "string", + "name": "ipV4Address", + "crossLanguageDefinitionId": "Azure.Core.ipV4Address", + "baseType": { + "$id": "405", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.wsfcStaticIp", + "serializationOptions": { + "json": { + "name": "wsfcStaticIp" + } + }, + "isHttpMetadata": false + }, + { + "$id": "406", + "kind": "property", + "name": "autoPatchingSettings", + "serializedName": "autoPatchingSettings", + "doc": "Auto patching settings for applying critical security updates to SQL virtual machine.", + "type": { + "$id": "407", + "kind": "model", + "name": "SqlVmAutoPatchingSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set a patching window during which Windows and SQL patches will be applied.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "408", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "doc": "Enable or disable autopatching on SQL virtual machine.", + "type": { + "$id": "409", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings.enable", + "serializationOptions": { + "json": { + "name": "enable" + } + }, + "isHttpMetadata": false + }, + { + "$id": "410", + "kind": "property", + "name": "dayOfWeek", + "serializedName": "dayOfWeek", + "doc": "Day of week to apply the patch on.", + "type": { + "$ref": "54" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings.dayOfWeek", + "serializationOptions": { + "json": { + "name": "dayOfWeek" + } + }, + "isHttpMetadata": false + }, + { + "$id": "411", + "kind": "property", + "name": "maintenanceWindowStartingHour", + "serializedName": "maintenanceWindowStartingHour", + "doc": "Hour of the day when patching is initiated. Local VM time.", + "type": { + "$id": "412", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings.maintenanceWindowStartingHour", + "serializationOptions": { + "json": { + "name": "maintenanceWindowStartingHour" + } + }, + "isHttpMetadata": false + }, + { + "$id": "413", + "kind": "property", + "name": "MaintenanceWindowDurationInMinutes", + "serializedName": "maintenanceWindowDuration", + "doc": "Duration of patching.", + "type": { + "$id": "414", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings.maintenanceWindowDuration", + "serializationOptions": { + "json": { + "name": "maintenanceWindowDuration" + } + }, + "isHttpMetadata": false + }, + { + "$id": "415", + "kind": "property", + "name": "additionalVmPatch", + "serializedName": "additionalVmPatch", + "doc": "Additional Patch to be enable or enabled on the SQL Virtual Machine.", + "type": { + "$ref": "64" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings.additionalVmPatch", + "serializationOptions": { + "json": { + "name": "additionalVmPatch" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.autoPatchingSettings", + "serializationOptions": { + "json": { + "name": "autoPatchingSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "416", + "kind": "property", + "name": "autoBackupSettings", + "serializedName": "autoBackupSettings", + "doc": "Auto backup settings for SQL Server.", + "type": { + "$id": "417", + "kind": "model", + "name": "SqlVmAutoBackupSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Configure backups for databases in your SQL virtual machine.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "418", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "doc": "Enable or disable autobackup on SQL virtual machine.", + "type": { + "$id": "419", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.enable", + "serializationOptions": { + "json": { + "name": "enable" + } + }, + "isHttpMetadata": false + }, + { + "$id": "420", + "kind": "property", + "name": "IsEncryptionEnabled", + "serializedName": "enableEncryption", + "doc": "Enable or disable encryption for backup on SQL virtual machine.", + "type": { + "$id": "421", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.enableEncryption", + "serializationOptions": { + "json": { + "name": "enableEncryption" + } + }, + "isHttpMetadata": false + }, + { + "$id": "422", + "kind": "property", + "name": "RetentionPeriodInDays", + "serializedName": "retentionPeriod", + "doc": "Retention period of backup: 1-90 days.", + "type": { + "$id": "423", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.retentionPeriod", + "serializationOptions": { + "json": { + "name": "retentionPeriod" + } + }, + "isHttpMetadata": false + }, + { + "$id": "424", + "kind": "property", + "name": "storageAccountUrl", + "serializedName": "storageAccountUrl", + "doc": "Storage account url where backup will be taken to.", + "type": { + "$id": "425", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.storageAccountUrl", + "serializationOptions": { + "json": { + "name": "storageAccountUrl" + } + }, + "isHttpMetadata": false + }, + { + "$id": "426", + "kind": "property", + "name": "storageContainerName", + "serializedName": "storageContainerName", + "doc": "Storage container name where backup will be taken to.", + "type": { + "$id": "427", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.storageContainerName", + "serializationOptions": { + "json": { + "name": "storageContainerName" + } + }, + "isHttpMetadata": false + }, + { + "$id": "428", + "kind": "property", + "name": "storageAccessKey", + "serializedName": "storageAccessKey", + "doc": "Storage account key where backup will be taken to.", + "type": { + "$id": "429", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.storageAccessKey", + "serializationOptions": { + "json": { + "name": "storageAccessKey" + } + }, + "isHttpMetadata": false + }, + { + "$id": "430", + "kind": "property", + "name": "password", + "serializedName": "password", + "doc": "Password for encryption on backup.", + "type": { + "$id": "431", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.password", + "serializationOptions": { + "json": { + "name": "password" + } + }, + "isHttpMetadata": false + }, + { + "$id": "432", + "kind": "property", + "name": "AreSystemDbsIncludedInBackup", + "serializedName": "backupSystemDbs", + "doc": "Include or exclude system databases from auto backup.", + "type": { + "$id": "433", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.backupSystemDbs", + "serializationOptions": { + "json": { + "name": "backupSystemDbs" + } + }, + "isHttpMetadata": false + }, + { + "$id": "434", + "kind": "property", + "name": "backupScheduleType", + "serializedName": "backupScheduleType", + "doc": "Backup schedule type.", + "type": { + "$ref": "68" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.backupScheduleType", + "serializationOptions": { + "json": { + "name": "backupScheduleType" + } + }, + "isHttpMetadata": false + }, + { + "$id": "435", + "kind": "property", + "name": "fullBackupFrequency", + "serializedName": "fullBackupFrequency", + "doc": "Frequency of full backups. In both cases, full backups begin during the next scheduled time window.", + "type": { + "$ref": "72" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.fullBackupFrequency", + "serializationOptions": { + "json": { + "name": "fullBackupFrequency" + } + }, + "isHttpMetadata": false + }, + { + "$id": "436", + "kind": "property", + "name": "daysOfWeek", + "serializedName": "daysOfWeek", + "doc": "Days of the week for the backups when FullBackupFrequency is set to Weekly.", + "type": { + "$id": "437", + "kind": "array", + "name": "ArrayAutoBackupDaysOfWeek", + "valueType": { + "$ref": "76" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.daysOfWeek", + "serializationOptions": { + "json": { + "name": "daysOfWeek" + } + }, + "isHttpMetadata": false + }, + { + "$id": "438", + "kind": "property", + "name": "FullBackupStartHour", + "serializedName": "fullBackupStartTime", + "doc": "Start time of a given day during which full backups can take place. 0-23 hours.", + "type": { + "$id": "439", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.fullBackupStartTime", + "serializationOptions": { + "json": { + "name": "fullBackupStartTime" + } + }, + "isHttpMetadata": false + }, + { + "$id": "440", + "kind": "property", + "name": "fullBackupWindowHours", + "serializedName": "fullBackupWindowHours", + "doc": "Duration of the time window of a given day during which full backups can take place. 1-23 hours.", + "type": { + "$id": "441", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.fullBackupWindowHours", + "serializationOptions": { + "json": { + "name": "fullBackupWindowHours" + } + }, + "isHttpMetadata": false + }, + { + "$id": "442", + "kind": "property", + "name": "logBackupFrequency", + "serializedName": "logBackupFrequency", + "doc": "Frequency of log backups. 5-60 minutes.", + "type": { + "$id": "443", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.logBackupFrequency", + "serializationOptions": { + "json": { + "name": "logBackupFrequency" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.autoBackupSettings", + "serializationOptions": { + "json": { + "name": "autoBackupSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "444", + "kind": "property", + "name": "keyVaultCredentialSettings", + "serializedName": "keyVaultCredentialSettings", + "doc": "Key vault credential settings.", + "type": { + "$id": "445", + "kind": "model", + "name": "SqlVmKeyVaultCredentialSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Configure your SQL virtual machine to be able to connect to the Azure Key Vault service.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "446", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "doc": "Enable or disable key vault credential setting.", + "type": { + "$id": "447", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings.enable", + "serializationOptions": { + "json": { + "name": "enable" + } + }, + "isHttpMetadata": false + }, + { + "$id": "448", + "kind": "property", + "name": "credentialName", + "serializedName": "credentialName", + "doc": "Credential name.", + "type": { + "$id": "449", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings.credentialName", + "serializationOptions": { + "json": { + "name": "credentialName" + } + }, + "isHttpMetadata": false + }, + { + "$id": "450", + "kind": "property", + "name": "azureKeyVaultUrl", + "serializedName": "azureKeyVaultUrl", + "doc": "Azure Key Vault url.", + "type": { + "$id": "451", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings.azureKeyVaultUrl", + "serializationOptions": { + "json": { + "name": "azureKeyVaultUrl" + } + }, + "isHttpMetadata": false + }, + { + "$id": "452", + "kind": "property", + "name": "servicePrincipalName", + "serializedName": "servicePrincipalName", + "doc": "Service principal name to access key vault.", + "type": { + "$id": "453", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings.servicePrincipalName", + "serializationOptions": { + "json": { + "name": "servicePrincipalName" + } + }, + "isHttpMetadata": false + }, + { + "$id": "454", + "kind": "property", + "name": "servicePrincipalSecret", + "serializedName": "servicePrincipalSecret", + "doc": "Service principal name secret to access key vault.", + "type": { + "$id": "455", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings.servicePrincipalSecret", + "serializationOptions": { + "json": { + "name": "servicePrincipalSecret" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.keyVaultCredentialSettings", + "serializationOptions": { + "json": { + "name": "keyVaultCredentialSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "456", + "kind": "property", + "name": "serverConfigurationsManagementSettings", + "serializedName": "serverConfigurationsManagementSettings", + "doc": "SQL Server configuration management settings.", + "type": { + "$id": "457", + "kind": "model", + "name": "SqlServerConfigurationsManagementSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set the connectivity, storage and workload settings.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "458", + "kind": "property", + "name": "sqlConnectivityUpdateSettings", + "serializedName": "sqlConnectivityUpdateSettings", + "doc": "SQL connectivity type settings.", + "type": { + "$id": "459", + "kind": "model", + "name": "SqlConnectivityUpdateSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlConnectivityUpdateSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set the access level and network port settings for SQL Server.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "460", + "kind": "property", + "name": "connectivityType", + "serializedName": "connectivityType", + "doc": "SQL Server connectivity option.", + "type": { + "$ref": "85" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlConnectivityUpdateSettings.connectivityType", + "serializationOptions": { + "json": { + "name": "connectivityType" + } + }, + "isHttpMetadata": false + }, + { + "$id": "461", + "kind": "property", + "name": "port", + "serializedName": "port", + "doc": "SQL Server port.", + "type": { + "$id": "462", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlConnectivityUpdateSettings.port", + "serializationOptions": { + "json": { + "name": "port" + } + }, + "isHttpMetadata": false + }, + { + "$id": "463", + "kind": "property", + "name": "sqlAuthUpdateUserName", + "serializedName": "sqlAuthUpdateUserName", + "doc": "SQL Server sysadmin login to create.", + "type": { + "$id": "464", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlConnectivityUpdateSettings.sqlAuthUpdateUserName", + "serializationOptions": { + "json": { + "name": "sqlAuthUpdateUserName" + } + }, + "isHttpMetadata": false + }, + { + "$id": "465", + "kind": "property", + "name": "sqlAuthUpdatePassword", + "serializedName": "sqlAuthUpdatePassword", + "doc": "SQL Server sysadmin login password.", + "type": { + "$id": "466", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlConnectivityUpdateSettings.sqlAuthUpdatePassword", + "serializationOptions": { + "json": { + "name": "sqlAuthUpdatePassword" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.sqlConnectivityUpdateSettings", + "serializationOptions": { + "json": { + "name": "sqlConnectivityUpdateSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "467", + "kind": "property", + "name": "sqlWorkloadTypeUpdateSettings", + "serializedName": "sqlWorkloadTypeUpdateSettings", + "doc": "SQL workload type settings.", + "type": { + "$id": "468", + "kind": "model", + "name": "SqlWorkloadTypeUpdateSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlWorkloadTypeUpdateSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set workload type to optimize storage for SQL Server.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "469", + "kind": "property", + "name": "sqlWorkloadType", + "serializedName": "sqlWorkloadType", + "doc": "SQL Server workload type.", + "type": { + "$ref": "90" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlWorkloadTypeUpdateSettings.sqlWorkloadType", + "serializationOptions": { + "json": { + "name": "sqlWorkloadType" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings", + "serializationOptions": { + "json": { + "name": "sqlWorkloadTypeUpdateSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "470", + "kind": "property", + "name": "sqlStorageUpdateSettings", + "serializedName": "sqlStorageUpdateSettings", + "doc": "SQL storage update settings.", + "type": { + "$id": "471", + "kind": "model", + "name": "SqlStorageUpdateSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlStorageUpdateSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set disk storage settings for SQL Server.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "472", + "kind": "property", + "name": "diskCount", + "serializedName": "diskCount", + "doc": "Virtual machine disk count.", + "type": { + "$id": "473", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlStorageUpdateSettings.diskCount", + "serializationOptions": { + "json": { + "name": "diskCount" + } + }, + "isHttpMetadata": false + }, + { + "$id": "474", + "kind": "property", + "name": "startingDeviceId", + "serializedName": "startingDeviceId", + "doc": "Device id of the first disk to be updated.", + "type": { + "$id": "475", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlStorageUpdateSettings.startingDeviceId", + "serializationOptions": { + "json": { + "name": "startingDeviceId" + } + }, + "isHttpMetadata": false + }, + { + "$id": "476", + "kind": "property", + "name": "diskConfigurationType", + "serializedName": "diskConfigurationType", + "doc": "Disk configuration to apply to SQL Server.", + "type": { + "$ref": "95" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlStorageUpdateSettings.diskConfigurationType", + "serializationOptions": { + "json": { + "name": "diskConfigurationType" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.sqlStorageUpdateSettings", + "serializationOptions": { + "json": { + "name": "sqlStorageUpdateSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "477", + "kind": "property", + "name": "additionalFeaturesServerConfigurations", + "serializedName": "additionalFeaturesServerConfigurations", + "doc": "Additional SQL feature settings.", + "type": { + "$id": "478", + "kind": "model", + "name": "AdditionalFeaturesServerConfigurations", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AdditionalFeaturesServerConfigurations", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Additional SQL Server feature settings.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "479", + "kind": "property", + "name": "isRServicesEnabled", + "serializedName": "isRServicesEnabled", + "doc": "Enable or disable R services (SQL 2016 onwards).", + "type": { + "$id": "480", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AdditionalFeaturesServerConfigurations.isRServicesEnabled", + "serializationOptions": { + "json": { + "name": "isRServicesEnabled" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.additionalFeaturesServerConfigurations", + "serializationOptions": { + "json": { + "name": "additionalFeaturesServerConfigurations" + } + }, + "isHttpMetadata": false + }, + { + "$id": "481", + "kind": "property", + "name": "sqlInstanceSettings", + "serializedName": "sqlInstanceSettings", + "doc": "SQL Instance settings.", + "type": { + "$id": "482", + "kind": "model", + "name": "SqlInstanceSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set the server/instance-level settings for SQL Server.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "483", + "kind": "property", + "name": "collation", + "serializedName": "collation", + "doc": "SQL Server Collation.", + "type": { + "$id": "484", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.collation", + "serializationOptions": { + "json": { + "name": "collation" + } + }, + "isHttpMetadata": false + }, + { + "$id": "485", + "kind": "property", + "name": "maxDop", + "serializedName": "maxDop", + "doc": "SQL Server MAXDOP.", + "type": { + "$id": "486", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.maxDop", + "serializationOptions": { + "json": { + "name": "maxDop" + } + }, + "isHttpMetadata": false + }, + { + "$id": "487", + "kind": "property", + "name": "isOptimizeForAdHocWorkloadsEnabled", + "serializedName": "isOptimizeForAdHocWorkloadsEnabled", + "doc": "SQL Server Optimize for Adhoc workloads.", + "type": { + "$id": "488", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.isOptimizeForAdHocWorkloadsEnabled", + "serializationOptions": { + "json": { + "name": "isOptimizeForAdHocWorkloadsEnabled" + } + }, + "isHttpMetadata": false + }, + { + "$id": "489", + "kind": "property", + "name": "MinServerMemoryInMB", + "serializedName": "minServerMemoryMB", + "doc": "SQL Server minimum memory.", + "type": { + "$id": "490", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.minServerMemoryMB", + "serializationOptions": { + "json": { + "name": "minServerMemoryMB" + } + }, + "isHttpMetadata": false + }, + { + "$id": "491", + "kind": "property", + "name": "MaxServerMemoryInMB", + "serializedName": "maxServerMemoryMB", + "doc": "SQL Server maximum memory.", + "type": { + "$id": "492", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.maxServerMemoryMB", + "serializationOptions": { + "json": { + "name": "maxServerMemoryMB" + } + }, + "isHttpMetadata": false + }, + { + "$id": "493", + "kind": "property", + "name": "isLpimEnabled", + "serializedName": "isLpimEnabled", + "doc": "SQL Server LPIM.", + "type": { + "$id": "494", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.isLpimEnabled", + "serializationOptions": { + "json": { + "name": "isLpimEnabled" + } + }, + "isHttpMetadata": false + }, + { + "$id": "495", + "kind": "property", + "name": "isIfiEnabled", + "serializedName": "isIfiEnabled", + "doc": "SQL Server IFI.", + "type": { + "$id": "496", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.isIfiEnabled", + "serializationOptions": { + "json": { + "name": "isIfiEnabled" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.sqlInstanceSettings", + "serializationOptions": { + "json": { + "name": "sqlInstanceSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "497", + "kind": "property", + "name": "azureAdAuthenticationSettings", + "serializedName": "azureAdAuthenticationSettings", + "doc": "Azure AD authentication Settings.", + "type": { + "$id": "498", + "kind": "model", + "name": "AADAuthenticationSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AADAuthenticationSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Enable AAD authentication for SQL VM.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "499", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client Id of the Managed Identity to query Microsoft Graph API. An empty string must be used for the system assigned Managed Identity", + "type": { + "$id": "500", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AADAuthenticationSettings.clientId", + "serializationOptions": { + "json": { + "name": "clientId" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.azureAdAuthenticationSettings", + "serializationOptions": { + "json": { + "name": "azureAdAuthenticationSettings" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.serverConfigurationsManagementSettings", + "serializationOptions": { + "json": { + "name": "serverConfigurationsManagementSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "501", + "kind": "property", + "name": "storageConfigurationSettings", + "serializedName": "storageConfigurationSettings", + "doc": "Storage Configuration Settings.", + "type": { + "$id": "502", + "kind": "model", + "name": "SqlVmStorageConfigurationSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Storage Configurations for SQL Data, Log and TempDb.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "503", + "kind": "property", + "name": "sqlDataSettings", + "serializedName": "sqlDataSettings", + "doc": "SQL Server Data Storage Settings.", + "type": { + "$id": "504", + "kind": "model", + "name": "SqlStorageSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLStorageSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set disk storage settings for SQL Server.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "505", + "kind": "property", + "name": "Luns", + "serializedName": "luns", + "doc": "Logical Unit Numbers for the disks.", + "type": { + "$id": "506", + "kind": "array", + "name": "Array1", + "valueType": { + "$id": "507", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLStorageSettings.luns", + "serializationOptions": { + "json": { + "name": "luns" + } + }, + "isHttpMetadata": false + }, + { + "$id": "508", + "kind": "property", + "name": "defaultFilePath", + "serializedName": "defaultFilePath", + "doc": "SQL Server default file path", + "type": { + "$id": "509", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLStorageSettings.defaultFilePath", + "serializationOptions": { + "json": { + "name": "defaultFilePath" + } + }, + "isHttpMetadata": false + }, + { + "$id": "510", + "kind": "property", + "name": "useStoragePool", + "serializedName": "useStoragePool", + "doc": "Use storage pool to build a drive if true or not provided", + "type": { + "$id": "511", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLStorageSettings.useStoragePool", + "serializationOptions": { + "json": { + "name": "useStoragePool" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.sqlDataSettings", + "serializationOptions": { + "json": { + "name": "sqlDataSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "512", + "kind": "property", + "name": "sqlLogSettings", + "serializedName": "sqlLogSettings", + "doc": "SQL Server Log Storage Settings.", + "type": { + "$ref": "504" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.sqlLogSettings", + "serializationOptions": { + "json": { + "name": "sqlLogSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "513", + "kind": "property", + "name": "SqlTempDBSettings", + "serializedName": "sqlTempDbSettings", + "doc": "SQL Server TempDb Storage Settings.", + "type": { + "$id": "514", + "kind": "model", + "name": "SqlTempDBSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set tempDb storage settings for SQL Server.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "515", + "kind": "property", + "name": "dataFileSize", + "serializedName": "dataFileSize", + "doc": "SQL Server tempdb data file size", + "type": { + "$id": "516", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.dataFileSize", + "serializationOptions": { + "json": { + "name": "dataFileSize" + } + }, + "isHttpMetadata": false + }, + { + "$id": "517", + "kind": "property", + "name": "dataGrowth", + "serializedName": "dataGrowth", + "doc": "SQL Server tempdb data file autoGrowth size", + "type": { + "$id": "518", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.dataGrowth", + "serializationOptions": { + "json": { + "name": "dataGrowth" + } + }, + "isHttpMetadata": false + }, + { + "$id": "519", + "kind": "property", + "name": "logFileSize", + "serializedName": "logFileSize", + "doc": "SQL Server tempdb log file size", + "type": { + "$id": "520", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.logFileSize", + "serializationOptions": { + "json": { + "name": "logFileSize" + } + }, + "isHttpMetadata": false + }, + { + "$id": "521", + "kind": "property", + "name": "logGrowth", + "serializedName": "logGrowth", + "doc": "SQL Server tempdb log file autoGrowth size", + "type": { + "$id": "522", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.logGrowth", + "serializationOptions": { + "json": { + "name": "logGrowth" + } + }, + "isHttpMetadata": false + }, + { + "$id": "523", + "kind": "property", + "name": "dataFileCount", + "serializedName": "dataFileCount", + "doc": "SQL Server tempdb data file count", + "type": { + "$id": "524", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.dataFileCount", + "serializationOptions": { + "json": { + "name": "dataFileCount" + } + }, + "isHttpMetadata": false + }, + { + "$id": "525", + "kind": "property", + "name": "persistFolder", + "serializedName": "persistFolder", + "doc": "SQL Server tempdb persist folder choice", + "type": { + "$id": "526", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.persistFolder", + "serializationOptions": { + "json": { + "name": "persistFolder" + } + }, + "isHttpMetadata": false + }, + { + "$id": "527", + "kind": "property", + "name": "persistFolderPath", + "serializedName": "persistFolderPath", + "doc": "SQL Server tempdb persist folder location", + "type": { + "$id": "528", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.persistFolderPath", + "serializationOptions": { + "json": { + "name": "persistFolderPath" + } + }, + "isHttpMetadata": false + }, + { + "$id": "529", + "kind": "property", + "name": "LogicalUnitNumbers", + "serializedName": "luns", + "doc": "Logical Unit Numbers for the disks.", + "type": { + "$ref": "506" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.luns", + "serializationOptions": { + "json": { + "name": "luns" + } + }, + "isHttpMetadata": false + }, + { + "$id": "530", + "kind": "property", + "name": "defaultFilePath", + "serializedName": "defaultFilePath", + "doc": "SQL Server default file path", + "type": { + "$id": "531", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.defaultFilePath", + "serializationOptions": { + "json": { + "name": "defaultFilePath" + } + }, + "isHttpMetadata": false + }, + { + "$id": "532", + "kind": "property", + "name": "useStoragePool", + "serializedName": "useStoragePool", + "doc": "Use storage pool to build a drive if true or not provided", + "type": { + "$id": "533", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.useStoragePool", + "serializationOptions": { + "json": { + "name": "useStoragePool" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.sqlTempDbSettings", + "serializationOptions": { + "json": { + "name": "sqlTempDbSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "534", + "kind": "property", + "name": "IsSqlSystemDBOnDataDisk", + "serializedName": "sqlSystemDbOnDataDisk", + "doc": "SQL Server SystemDb Storage on DataPool if true.", + "type": { + "$id": "535", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.sqlSystemDbOnDataDisk", + "serializationOptions": { + "json": { + "name": "sqlSystemDbOnDataDisk" + } + }, + "isHttpMetadata": false + }, + { + "$id": "536", + "kind": "property", + "name": "diskConfigurationType", + "serializedName": "diskConfigurationType", + "doc": "Disk configuration to apply to SQL Server.", + "type": { + "$ref": "95" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.diskConfigurationType", + "serializationOptions": { + "json": { + "name": "diskConfigurationType" + } + }, + "isHttpMetadata": false + }, + { + "$id": "537", + "kind": "property", + "name": "storageWorkloadType", + "serializedName": "storageWorkloadType", + "doc": "Storage workload type.", + "type": { + "$ref": "100" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.storageWorkloadType", + "serializationOptions": { + "json": { + "name": "storageWorkloadType" + } + }, + "isHttpMetadata": false + }, + { + "$id": "538", + "kind": "property", + "name": "enableStorageConfigBlade", + "serializedName": "enableStorageConfigBlade", + "doc": "Enable SQL IaaS Agent storage configuration blade in Azure Portal.", + "type": { + "$id": "539", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.enableStorageConfigBlade", + "serializationOptions": { + "json": { + "name": "enableStorageConfigBlade" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.storageConfigurationSettings", + "serializationOptions": { + "json": { + "name": "storageConfigurationSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "540", + "kind": "property", + "name": "troubleshootingStatus", + "serializedName": "troubleshootingStatus", + "doc": "Troubleshooting status", + "type": { + "$id": "541", + "kind": "model", + "name": "TroubleshootingStatus", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus", + "usage": "Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Status of last troubleshooting operation on this SQL VM", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "542", + "kind": "property", + "name": "rootCause", + "serializedName": "rootCause", + "doc": "Root cause of the issue", + "type": { + "$id": "543", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.rootCause", + "serializationOptions": { + "json": { + "name": "rootCause" + } + }, + "isHttpMetadata": false + }, + { + "$id": "544", + "kind": "property", + "name": "lastTriggerTimeUtc", + "serializedName": "lastTriggerTimeUtc", + "doc": "Last troubleshooting trigger time in UTC timezone", + "type": { + "$id": "545", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "546", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.lastTriggerTimeUtc", + "serializationOptions": { + "json": { + "name": "lastTriggerTimeUtc" + } + }, + "isHttpMetadata": false + }, + { + "$id": "547", + "kind": "property", + "name": "startTimeUtc", + "serializedName": "startTimeUtc", + "doc": "Start time in UTC timezone.", + "type": { + "$id": "548", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "549", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.startTimeUtc", + "serializationOptions": { + "json": { + "name": "startTimeUtc" + } + }, + "isHttpMetadata": false + }, + { + "$id": "550", + "kind": "property", + "name": "endTimeUtc", + "serializedName": "endTimeUtc", + "doc": "End time in UTC timezone.", + "type": { + "$id": "551", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "552", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.endTimeUtc", + "serializationOptions": { + "json": { + "name": "endTimeUtc" + } + }, + "isHttpMetadata": false + }, + { + "$id": "553", + "kind": "property", + "name": "troubleshootingScenario", + "serializedName": "troubleshootingScenario", + "doc": "SQL VM troubleshooting scenario.", + "type": { + "$ref": "105" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.troubleshootingScenario", + "serializationOptions": { + "json": { + "name": "troubleshootingScenario" + } + }, + "isHttpMetadata": false + }, + { + "$id": "554", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Troubleshooting properties", + "type": { + "$id": "555", + "kind": "model", + "name": "TroubleshootingAdditionalProperties", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingAdditionalProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "SQL VM Troubleshooting additional properties.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "556", + "kind": "property", + "name": "unhealthyReplicaInfo", + "serializedName": "unhealthyReplicaInfo", + "doc": "The unhealthy replica information", + "type": { + "$id": "557", + "kind": "model", + "name": "UnhealthyReplicaInfo", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.UnhealthyReplicaInfo", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "SQL VM Troubleshoot UnhealthyReplica scenario information.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "558", + "kind": "property", + "name": "availabilityGroupName", + "serializedName": "availabilityGroupName", + "doc": "The name of the availability group", + "type": { + "$id": "559", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.UnhealthyReplicaInfo.availabilityGroupName", + "serializationOptions": { + "json": { + "name": "availabilityGroupName" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingAdditionalProperties.unhealthyReplicaInfo", + "serializationOptions": { + "json": { + "name": "unhealthyReplicaInfo" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.properties", + "serializationOptions": { + "json": { + "name": "properties" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.troubleshootingStatus", + "serializationOptions": { + "json": { + "name": "troubleshootingStatus" + } + }, + "isHttpMetadata": false + }, + { + "$id": "560", + "kind": "property", + "name": "assessmentSettings", + "serializedName": "assessmentSettings", + "doc": "SQL best practices Assessment Settings.", + "type": { + "$id": "561", + "kind": "model", + "name": "SqlVmAssessmentSettings", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AssessmentSettings", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Configure SQL best practices Assessment for databases in your SQL virtual machine.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "562", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "doc": "Enable or disable SQL best practices Assessment feature on SQL virtual machine.", + "type": { + "$id": "563", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AssessmentSettings.enable", + "serializationOptions": { + "json": { + "name": "enable" + } + }, + "isHttpMetadata": false + }, + { + "$id": "564", + "kind": "property", + "name": "runImmediately", + "serializedName": "runImmediately", + "doc": "Run SQL best practices Assessment immediately on SQL virtual machine.", + "type": { + "$id": "565", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AssessmentSettings.runImmediately", + "serializationOptions": { + "json": { + "name": "runImmediately" + } + }, + "isHttpMetadata": false + }, + { + "$id": "566", + "kind": "property", + "name": "schedule", + "serializedName": "schedule", + "doc": "Schedule for SQL best practices Assessment.", + "type": { + "$id": "567", + "kind": "model", + "name": "SqlVmAssessmentSchedule", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Set assessment schedule for SQL Server.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "568", + "kind": "property", + "name": "IsEnabled", + "serializedName": "enable", + "doc": "Enable or disable assessment schedule on SQL virtual machine.", + "type": { + "$id": "569", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule.enable", + "serializationOptions": { + "json": { + "name": "enable" + } + }, + "isHttpMetadata": false + }, + { + "$id": "570", + "kind": "property", + "name": "weeklyInterval", + "serializedName": "weeklyInterval", + "doc": "Number of weeks to schedule between 2 assessment runs. Takes value from 1-6", + "type": { + "$id": "571", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule.weeklyInterval", + "serializationOptions": { + "json": { + "name": "weeklyInterval" + } + }, + "isHttpMetadata": false + }, + { + "$id": "572", + "kind": "property", + "name": "monthlyOccurrence", + "serializedName": "monthlyOccurrence", + "doc": "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", + "type": { + "$id": "573", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule.monthlyOccurrence", + "serializationOptions": { + "json": { + "name": "monthlyOccurrence" + } + }, + "isHttpMetadata": false + }, + { + "$id": "574", + "kind": "property", + "name": "dayOfWeek", + "serializedName": "dayOfWeek", + "doc": "Day of the week to run assessment.", + "type": { + "$ref": "108" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule.dayOfWeek", + "serializationOptions": { + "json": { + "name": "dayOfWeek" + } + }, + "isHttpMetadata": false + }, + { + "$id": "575", + "kind": "property", + "name": "startTime", + "serializedName": "startTime", + "doc": "Time of the day in HH:mm format. Eg. 17:30", + "type": { + "$id": "576", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule.startTime", + "serializationOptions": { + "json": { + "name": "startTime" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AssessmentSettings.schedule", + "serializationOptions": { + "json": { + "name": "schedule" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.assessmentSettings", + "serializationOptions": { + "json": { + "name": "assessmentSettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "577", + "kind": "property", + "name": "enableAutomaticUpgrade", + "serializedName": "enableAutomaticUpgrade", + "doc": "Enable automatic upgrade of Sql IaaS extension Agent.", + "type": { + "$id": "578", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.enableAutomaticUpgrade", + "serializationOptions": { + "json": { + "name": "enableAutomaticUpgrade" + } + }, + "isHttpMetadata": false + }, + { + "$id": "579", + "kind": "property", + "name": "additionalVmPatch", + "serializedName": "additionalVmPatch", + "doc": "Additional VM Patching solution enabled on the Virtual Machine", + "type": { + "$ref": "117" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.additionalVmPatch", + "serializationOptions": { + "json": { + "name": "additionalVmPatch" + } + }, + "isHttpMetadata": false + }, + { + "$id": "580", + "kind": "property", + "name": "virtualMachineIdentitySettings", + "serializedName": "virtualMachineIdentitySettings", + "doc": "Virtual Machine Identity details used for Sql IaaS extension configurations.", + "type": { + "$id": "581", + "kind": "model", + "name": "VirtualMachineIdentity", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.VirtualMachineIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Virtual Machine Identity details used for Sql IaaS extension configurations.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "582", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "Identity type of the virtual machine. Specify None to opt-out of Managed Identities.", + "type": { + "$ref": "122" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.VirtualMachineIdentity.type", + "serializationOptions": { + "json": { + "name": "type" + } + }, + "isHttpMetadata": false + }, + { + "$id": "583", + "kind": "property", + "name": "resourceId", + "serializedName": "resourceId", + "doc": "ARM Resource Id of the identity. Only required when UserAssigned identity is selected.", + "type": { + "$id": "584", + "kind": "string", + "name": "armResourceIdentifier", + "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", + "baseType": { + "$id": "585", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.VirtualMachineIdentity.resourceId", + "serializationOptions": { + "json": { + "name": "resourceId" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.virtualMachineIdentitySettings", + "serializationOptions": { + "json": { + "name": "virtualMachineIdentitySettings" + } + }, + "isHttpMetadata": false + }, + { + "$id": "586", + "kind": "property", + "name": "osType", + "serializedName": "osType", + "doc": "Operating System of the current SQL Virtual Machine.", + "type": { + "$ref": "127" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.osType", + "serializationOptions": { + "json": { + "name": "osType" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [ + { + "name": "Azure.ResourceManager.@flattenProperty", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachine.properties", + "serializationOptions": { + "json": { + "name": "properties" + } + }, + "isHttpMetadata": false + }, + { + "$id": "587", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "588", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachine.name", + "serializationOptions": { + "json": { + "name": "name" + } + }, + "isHttpMetadata": true + }, + { + "$id": "589", + "kind": "property", + "name": "identity", + "serializedName": "identity", + "doc": "DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server.", + "type": { + "$id": "590", + "kind": "model", + "name": "ManagedServiceIdentity", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Managed service identity (system assigned and/or user assigned identities)", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "591", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "592", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "593", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId", + "serializationOptions": { + "json": { + "name": "principalId" + } + }, + "isHttpMetadata": false + }, + { + "$id": "594", + "kind": "property", + "name": "tenantId", + "serializedName": "tenantId", + "doc": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + "type": { + "$id": "595", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId", + "serializationOptions": { + "json": { + "name": "tenantId" + } + }, + "isHttpMetadata": false + }, + { + "$id": "597", + "kind": "property", + "name": "type", + "serializedName": "type", + "doc": "The type of managed identity assigned to this resource.", + "type": { + "$ref": "131" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", + "serializationOptions": { + "json": { + "name": "type" + } + }, + "isHttpMetadata": false + }, + { + "$id": "598", + "kind": "property", + "name": "userAssignedIdentities", + "serializedName": "userAssignedIdentities", + "doc": "The identities assigned to this resource by the user.", + "type": { + "$id": "599", + "kind": "dict", + "keyType": { + "$id": "600", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "valueType": { + "$id": "601", + "kind": "model", + "name": "UserAssignedIdentity", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "User assigned identity properties", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "602", + "kind": "property", + "name": "principalId", + "serializedName": "principalId", + "doc": "The principal ID of the assigned identity.", + "type": { + "$id": "603", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "604", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId", + "serializationOptions": { + "json": { + "name": "principalId" + } + }, + "isHttpMetadata": false + }, + { + "$id": "605", + "kind": "property", + "name": "clientId", + "serializedName": "clientId", + "doc": "The client ID of the assigned identity.", + "type": { + "$id": "606", + "kind": "string", + "name": "uuid", + "crossLanguageDefinitionId": "Azure.Core.uuid", + "baseType": { + "$id": "607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId", + "serializationOptions": { + "json": { + "name": "clientId" + } + }, + "isHttpMetadata": false + } + ] + }, + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", + "serializationOptions": { + "json": { + "name": "userAssignedIdentities" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachine.identity", + "serializationOptions": { + "json": { + "name": "identity" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$ref": "380" + }, + { + "$ref": "396" + }, + { + "$ref": "407" + }, + { + "$ref": "417" + }, + { + "$ref": "445" + }, + { + "$ref": "457" + }, + { + "$ref": "459" + }, + { + "$ref": "468" + }, + { + "$ref": "471" + }, + { + "$ref": "478" + }, + { + "$ref": "482" + }, + { + "$ref": "498" + }, + { + "$ref": "502" + }, + { + "$ref": "504" + }, + { + "$ref": "514" + }, + { + "$ref": "541" + }, + { + "$ref": "555" + }, + { + "$ref": "557" + }, + { + "$ref": "561" + }, + { + "$ref": "567" + }, + { + "$ref": "581" + }, + { + "$ref": "590" + }, + { + "$ref": "601" + }, + { + "$ref": "371" + }, + { + "$id": "608", + "kind": "model", + "name": "SqlVmPatch", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineUpdate", + "usage": "Input,Json", + "doc": "An update to a SQL virtual machine.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "609", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$ref": "373" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineUpdate.tags", + "serializationOptions": { + "json": { + "name": "tags" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "610", + "kind": "model", + "name": "SqlVirtualMachineListResult", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a SqlVirtualMachine list operation.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "611", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The SqlVirtualMachine items on this page", + "type": { + "$id": "612", + "kind": "array", + "name": "ArraySqlVirtualMachine", + "valueType": { + "$ref": "370" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "json": { + "name": "value" + } + }, + "isHttpMetadata": false + }, + { + "$id": "613", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "614", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "615", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "json": { + "name": "nextLink" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "616", + "kind": "model", + "name": "SqlVmDiskConfigAssessmentContent", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.DiskConfigAssessmentRequest", + "usage": "Input,Json", + "doc": "Configure disk config assessment for databases in your SQL virtual machine.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "617", + "kind": "property", + "name": "runDiskConfigRules", + "serializedName": "runDiskConfigRules", + "doc": "Boolean to run disk config Assessment. Use false to fetch past Assessment.", + "type": { + "$id": "618", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.DiskConfigAssessmentRequest.runDiskConfigRules", + "serializationOptions": { + "json": { + "name": "runDiskConfigRules" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "619", + "kind": "model", + "name": "SqlVmGroup", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroup", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "A SQL virtual machine group.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, + { + "name": "Azure.ResourceManager.Private.@armResourceInternal", + "arguments": {} + } + ], + "baseModel": { + "$ref": "371" + }, + "properties": [ + { + "$id": "620", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Resource properties.", + "type": { + "$id": "621", + "kind": "model", + "name": "SqlVirtualMachineGroupProperties", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "The properties of a SQL virtual machine group.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "622", + "kind": "property", + "name": "provisioningState", + "serializedName": "provisioningState", + "doc": "Provisioning state to track the async operation status.", + "type": { + "$id": "623", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.provisioningState", + "serializationOptions": { + "json": { + "name": "provisioningState" + } + }, + "isHttpMetadata": false + }, + { + "$id": "624", + "kind": "property", + "name": "sqlImageOffer", + "serializedName": "sqlImageOffer", + "doc": "SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.", + "type": { + "$id": "625", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.sqlImageOffer", + "serializationOptions": { + "json": { + "name": "sqlImageOffer" + } + }, + "isHttpMetadata": false + }, + { + "$id": "626", + "kind": "property", + "name": "sqlImageSku", + "serializedName": "sqlImageSku", + "doc": "SQL image sku.", + "type": { + "$ref": "137" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.sqlImageSku", + "serializationOptions": { + "json": { + "name": "sqlImageSku" + } + }, + "isHttpMetadata": false + }, + { + "$id": "627", + "kind": "property", + "name": "scaleType", + "serializedName": "scaleType", + "doc": "Scale type.", + "type": { + "$ref": "141" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.scaleType", + "serializationOptions": { + "json": { + "name": "scaleType" + } + }, + "isHttpMetadata": false + }, + { + "$id": "628", + "kind": "property", + "name": "clusterManagerType", + "serializedName": "clusterManagerType", + "doc": "Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type.", + "type": { + "$ref": "144" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.clusterManagerType", + "serializationOptions": { + "json": { + "name": "clusterManagerType" + } + }, + "isHttpMetadata": false + }, + { + "$id": "629", + "kind": "property", + "name": "clusterConfiguration", + "serializedName": "clusterConfiguration", + "doc": "Cluster type.", + "type": { + "$ref": "147" + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.clusterConfiguration", + "serializationOptions": { + "json": { + "name": "clusterConfiguration" + } + }, + "isHttpMetadata": false + }, + { + "$id": "630", + "kind": "property", + "name": "WindowsServerFailoverClusterDomainProfile", + "serializedName": "wsfcDomainProfile", + "doc": "Cluster Active Directory domain profile.", + "type": { + "$id": "631", + "kind": "model", + "name": "WindowsServerFailoverClusterDomainProfile", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Active Directory account details to operate Windows Server Failover Cluster.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "632", + "kind": "property", + "name": "domainFqdn", + "serializedName": "domainFqdn", + "doc": "Fully qualified name of the domain.", + "type": { + "$id": "633", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.domainFqdn", + "serializationOptions": { + "json": { + "name": "domainFqdn" + } + }, + "isHttpMetadata": false + }, + { + "$id": "634", + "kind": "property", + "name": "OrganizationalUnitPath", + "serializedName": "ouPath", + "doc": "Organizational Unit path in which the nodes and cluster will be present.", + "type": { + "$id": "635", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.ouPath", + "serializationOptions": { + "json": { + "name": "ouPath" + } + }, + "isHttpMetadata": false + }, + { + "$id": "636", + "kind": "property", + "name": "clusterBootstrapAccount", + "serializedName": "clusterBootstrapAccount", + "doc": "Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain).", + "type": { + "$id": "637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.clusterBootstrapAccount", + "serializationOptions": { + "json": { + "name": "clusterBootstrapAccount" + } + }, + "isHttpMetadata": false + }, + { + "$id": "638", + "kind": "property", + "name": "clusterOperatorAccount", + "serializedName": "clusterOperatorAccount", + "doc": "Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster.", + "type": { + "$id": "639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.clusterOperatorAccount", + "serializationOptions": { + "json": { + "name": "clusterOperatorAccount" + } + }, + "isHttpMetadata": false + }, + { + "$id": "640", + "kind": "property", + "name": "sqlServiceAccount", + "serializedName": "sqlServiceAccount", + "doc": "Account name under which SQL service will run on all participating SQL virtual machines in the cluster.", + "type": { + "$id": "641", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.sqlServiceAccount", + "serializationOptions": { + "json": { + "name": "sqlServiceAccount" + } + }, + "isHttpMetadata": false + }, + { + "$id": "642", + "kind": "property", + "name": "isSqlServiceAccountGmsa", + "serializedName": "isSqlServiceAccountGmsa", + "doc": "The flag to check if SQL service account is GMSA.", + "type": { + "$id": "643", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.isSqlServiceAccountGmsa", + "serializationOptions": { + "json": { + "name": "isSqlServiceAccountGmsa" + } + }, + "isHttpMetadata": false + }, + { + "$id": "644", + "kind": "property", + "name": "fileShareWitnessPath", + "serializedName": "fileShareWitnessPath", + "doc": "Optional path for fileshare witness.", + "type": { + "$id": "645", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.fileShareWitnessPath", + "serializationOptions": { + "json": { + "name": "fileShareWitnessPath" + } + }, + "isHttpMetadata": false + }, + { + "$id": "646", + "kind": "property", + "name": "storageAccountUrl", + "serializedName": "storageAccountUrl", + "doc": "Fully qualified ARM resource id of the witness storage account.", + "type": { + "$id": "647", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.storageAccountUrl", + "serializationOptions": { + "json": { + "name": "storageAccountUrl" + } + }, + "isHttpMetadata": false + }, + { + "$id": "648", + "kind": "property", + "name": "storageAccountPrimaryKey", + "serializedName": "storageAccountPrimaryKey", + "doc": "Primary key of the witness storage account.", + "type": { + "$id": "649", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.storageAccountPrimaryKey", + "serializationOptions": { + "json": { + "name": "storageAccountPrimaryKey" + } + }, + "isHttpMetadata": false + }, + { + "$id": "650", + "kind": "property", + "name": "clusterSubnetType", + "serializedName": "clusterSubnetType", + "doc": "Cluster subnet type.", + "type": { + "$ref": "150" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.clusterSubnetType", + "serializationOptions": { + "json": { + "name": "clusterSubnetType" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.wsfcDomainProfile", + "serializationOptions": { + "json": { + "name": "wsfcDomainProfile" + } + }, + "isHttpMetadata": false + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": true, + "decorators": [ + { + "name": "Azure.ResourceManager.@flattenProperty", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroup.properties", + "serializationOptions": { + "json": { + "name": "properties" + } + }, + "isHttpMetadata": false + }, + { + "$id": "651", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "652", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroup.name", + "serializationOptions": { + "json": { + "name": "name" + } + }, + "isHttpMetadata": true + } + ] + }, + { + "$ref": "621" + }, + { + "$ref": "631" + }, + { + "$id": "653", + "kind": "model", + "name": "SqlVirtualMachineGroupUpdate", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupUpdate", + "usage": "Input,Json", + "doc": "An update to a SQL virtual machine group.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "654", + "kind": "property", + "name": "tags", + "serializedName": "tags", + "doc": "Resource tags.", + "type": { + "$ref": "373" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupUpdate.tags", + "serializationOptions": { + "json": { + "name": "tags" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "655", + "kind": "model", + "name": "SqlVirtualMachineGroupListResult", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", + "usage": "Output,Json", + "doc": "The response of a SqlVirtualMachineGroup list operation.", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "656", + "kind": "property", + "name": "value", + "serializedName": "value", + "doc": "The SqlVirtualMachineGroup items on this page", + "type": { + "$id": "657", + "kind": "array", + "name": "ArraySqlVirtualMachineGroup", + "valueType": { + "$ref": "619" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", + "serializationOptions": { + "json": { + "name": "value" + } + }, + "isHttpMetadata": false + }, + { + "$id": "658", + "kind": "property", + "name": "nextLink", + "serializedName": "nextLink", + "doc": "The link to the next page of items", + "type": { + "$id": "659", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "660", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", + "serializationOptions": { + "json": { + "name": "nextLink" + } + }, + "isHttpMetadata": false + } + ] + }, + { + "$id": "661", + "kind": "model", + "name": "SqlVmTroubleshooting", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Details required for SQL VM troubleshooting", + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + } + ], + "properties": [ + { + "$id": "662", + "kind": "property", + "name": "startTimeUtc", + "serializedName": "startTimeUtc", + "doc": "Start time in UTC timezone.", + "type": { + "$id": "663", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting.startTimeUtc", + "serializationOptions": { + "json": { + "name": "startTimeUtc" + } + }, + "isHttpMetadata": false + }, + { + "$id": "665", + "kind": "property", + "name": "endTimeUtc", + "serializedName": "endTimeUtc", + "doc": "End time in UTC timezone.", + "type": { + "$id": "666", + "kind": "utcDateTime", + "name": "utcDateTime", + "encode": "rfc3339", + "wireType": { + "$id": "667", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "crossLanguageDefinitionId": "TypeSpec.utcDateTime", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting.endTimeUtc", + "serializationOptions": { + "json": { + "name": "endTimeUtc" + } + }, + "isHttpMetadata": false + }, + { + "$id": "668", + "kind": "property", + "name": "troubleshootingScenario", + "serializedName": "troubleshootingScenario", + "doc": "SQL VM troubleshooting scenario.", + "type": { + "$ref": "105" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting.troubleshootingScenario", + "serializationOptions": { + "json": { + "name": "troubleshootingScenario" + } + }, + "isHttpMetadata": false + }, + { + "$id": "669", + "kind": "property", + "name": "properties", + "serializedName": "properties", + "doc": "Troubleshooting properties", + "type": { + "$ref": "555" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting.properties", + "serializationOptions": { + "json": { + "name": "properties" + } + }, + "isHttpMetadata": false + }, + { + "$id": "670", + "kind": "property", + "name": "virtualMachineResourceId", + "serializedName": "virtualMachineResourceId", + "doc": "Virtual machine resource id for response.", + "type": { + "$id": "671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting.virtualMachineResourceId", + "serializationOptions": { + "json": { + "name": "virtualMachineResourceId" + } + }, + "isHttpMetadata": false + } + ] + } + ], + "clients": [ + { + "$id": "672", + "kind": "client", + "name": "SqlVirtualMachineClient", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "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.", + "methods": [], + "parameters": [ + { + "$id": "673", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "674", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "675", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.endpoint" + }, + { + "$id": "676", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "677", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "678", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "679", + "kind": "method", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "680", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.subscriptionId", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "initializedBy": 1, + "decorators": [ + { + "name": "Azure.ResourceManager.@armProviderNamespace", + "arguments": {} + }, + { + "name": "Azure.ClientGenerator.Core.@armProviderSchema", + "arguments": { + "resources": [ + { + "resourceModelId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListener", + "resourceIdPattern": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", + "resourceType": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners", + "methods": [ + { + "$id": "681", + "methodId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate", + "kind": "Create", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}" + }, + { + "$id": "682", + "methodId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get", + "kind": "Read", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}" + }, + { + "$id": "683", + "methodId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete", + "kind": "Delete", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}" + }, + { + "$id": "684", + "methodId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup", + "kind": "List", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" + } + ], + "resourceScope": "ResourceGroup", + "parentResourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", + "resourceName": "AvailabilityGroupListener" + }, + { + "resourceModelId": "Microsoft.SqlVirtualMachine.SqlVirtualMachine", + "resourceIdPattern": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", + "resourceType": "Microsoft.SqlVirtualMachine/sqlVirtualMachines", + "methods": [ + { + "$id": "685", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate", + "kind": "Create", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" + }, + { + "$id": "686", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get", + "kind": "Read", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" + }, + { + "$id": "687", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update", + "kind": "Update", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" + }, + { + "$id": "688", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete", + "kind": "Delete", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" + }, + { + "$id": "689", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list", + "kind": "List", + "operationPath": "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", + "operationScope": "Subscription" + }, + { + "$id": "690", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup", + "kind": "List", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", + "operationScope": "ResourceGroup" + }, + { + "$id": "691", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment", + "kind": "Action", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/fetchDCAssessment", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" + }, + { + "$id": "692", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy", + "kind": "Action", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" + }, + { + "$id": "693", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment", + "kind": "Action", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" + }, + { + "$id": "694", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot", + "kind": "Action", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/troubleshoot", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" + } + ], + "resourceScope": "ResourceGroup", + "resourceName": "SqlVm" + }, + { + "resourceModelId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroup", + "resourceIdPattern": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", + "resourceType": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", + "methods": [ + { + "$id": "695", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate", + "kind": "Create", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" + }, + { + "$id": "696", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get", + "kind": "Read", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" + }, + { + "$id": "697", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update", + "kind": "Update", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" + }, + { + "$id": "698", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete", + "kind": "Delete", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" + }, + { + "$id": "699", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list", + "kind": "List", + "operationPath": "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", + "operationScope": "Subscription" + }, + { + "$id": "700", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup", + "kind": "List", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", + "operationScope": "ResourceGroup" + }, + { + "$id": "701", + "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup", + "kind": "Action", + "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines", + "operationScope": "ResourceGroup", + "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" + } + ], + "resourceScope": "ResourceGroup", + "resourceName": "SqlVmGroup" + } + ], + "nonResourceMethods": [ + { + "methodId": "Microsoft.SqlVirtualMachine.Operations.list", + "operationPath": "/providers/Microsoft.SqlVirtualMachine/operations", + "operationScope": "Tenant" + } + ] + } + } + ], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine", + "apiVersions": [ + "2023-10-01" + ], + "children": [ + { + "$id": "702", + "kind": "client", + "name": "Operations", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "doc": "This is the interface that implements the standard Azure Resource Manager operation that returns\nall supported RP operations. You should have exactly one declaration for each\nAzure Resource Manager service. It implements\nGET \"/providers/Microsoft.ContosoProviderHub/operations\"", + "methods": [ + { + "$id": "703", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Lists all of the available SQL Virtual Machine Rest API operations.", + "operation": { + "$id": "704", + "name": "list", + "resourceName": "Operations", + "doc": "Lists all of the available SQL Virtual Machine Rest API operations.", + "accessibility": "public", + "parameters": [ + { + "$id": "705", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "706", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "707", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list.apiVersion", + "readOnly": false + }, + { + "$id": "708", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "157" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "229" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/providers/Microsoft.SqlVirtualMachine/operations", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list", + "decorators": [], + "examples": [ + { + "$id": "709", + "kind": "http", + "name": "Lists all of the available SQL Virtual Machine Rest API operations.", + "description": "Lists all of the available SQL Virtual Machine Rest API operations.", + "filePath": "2023-10-01/ListOperation.json", + "parameters": [ + { + "parameter": { + "$ref": "705" + }, + "value": { + "$id": "710", + "kind": "string", + "type": { + "$ref": "706" + }, + "value": "2023-10-01" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "229" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "711", + "kind": "model", + "type": { + "$ref": "229" + }, + "value": { + "value": { + "$id": "712", + "kind": "array", + "type": { + "$ref": "231" + }, + "value": [ + { + "$id": "713", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "714", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/read" + }, + "display": { + "$id": "715", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "716", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Retrieve details of SQL virtual machine group" + }, + "operation": { + "$id": "717", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Get SQL virtual machine group details" + }, + "resource": { + "$id": "718", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "SQL virtual machine group" + } + } + } + } + }, + { + "$id": "719", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "720", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/write" + }, + "display": { + "$id": "721", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "722", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Create a new or change properties of existing SQL virtual machine group" + }, + "operation": { + "$id": "723", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Create a new or update existing SQL virtual machine group" + }, + "resource": { + "$id": "724", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "SQL virtual machine group" + } + } + } + } + }, + { + "$id": "725", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "726", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/delete" + }, + "display": { + "$id": "727", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "728", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Delete existing SQL virtual machine group" + }, + "operation": { + "$id": "729", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Delete existing SQL virtual machine group" + }, + "resource": { + "$id": "730", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "SQL virtual machine group" + } + } + } + } + }, + { + "$id": "731", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "732", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners/read" + }, + "display": { + "$id": "733", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "734", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Retrieve details of SQL availability group listener on a given SQL virtual machine group" + }, + "operation": { + "$id": "735", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Get availability group listener details" + }, + "resource": { + "$id": "736", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "SQL availability group listener" + } + } + } + } + }, + { + "$id": "737", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "738", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners/write" + }, + "display": { + "$id": "739", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "740", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Create a new or changes properties of existing SQL availability group listener" + }, + "operation": { + "$id": "741", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Create new or update existing availability group listener" + }, + "resource": { + "$id": "742", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "SQL availability group listener" + } + } + } + } + }, + { + "$id": "743", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "744", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners/delete" + }, + "display": { + "$id": "745", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "746", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Delete existing availability group listener" + }, + "operation": { + "$id": "747", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Delete existing availability group listener" + }, + "resource": { + "$id": "748", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "SQL availability group listener" + } + } + } + } + }, + { + "$id": "749", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "750", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/sqlVirtualMachines/read" + }, + "display": { + "$id": "751", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "752", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "List Sql virtual machines by a particular sql virtual virtual machine group" + }, + "operation": { + "$id": "753", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "List Sql virtual machines by a particular sql virtual virtual machine group" + } + } + } + } + }, + { + "$id": "754", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "755", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/startAssessment/action" + }, + "display": { + "$id": "756", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "757", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Starts SQL best practices Assessment on SQL virtual machine" + }, + "operation": { + "$id": "758", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Starts SQL best practices Assessment on SQL virtual machine" + } + } + } + } + }, + { + "$id": "759", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "760", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/redeploy/action" + }, + "display": { + "$id": "761", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "762", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Redeploy existing SQL virtual machine" + }, + "operation": { + "$id": "763", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Redeploy existing SQL virtual machine" + } + } + } + } + }, + { + "$id": "764", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "765", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/read" + }, + "display": { + "$id": "766", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "767", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Retrieve details of SQL virtual machine" + }, + "operation": { + "$id": "768", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Get SQL virtual machine instance details" + } + } + } + } + }, + { + "$id": "769", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "770", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/write" + }, + "display": { + "$id": "771", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "772", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Create a new or change properties of existing SQL virtual machine" + }, + "operation": { + "$id": "773", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Create new or update existing SQL virtual machine" + } + } + } + } + }, + { + "$id": "774", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "775", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/delete" + }, + "display": { + "$id": "776", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "777", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Delete existing SQL virtual machine" + }, + "operation": { + "$id": "778", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Delete existing SQL virtual machine" + } + } + } + } + }, + { + "$id": "779", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/fetchDCAssessment/action" + }, + "display": { + "$id": "781", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": {} + } + } + }, + { + "$id": "782", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "783", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/troubleshoot/action" + }, + "display": { + "$id": "784", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "785", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Start SQL virtual machine troubleshooting operation" + }, + "operation": { + "$id": "786", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Start SQL virtual machine troubleshooting operation" + } + } + } + } + }, + { + "$id": "787", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "788", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/locations/registerSqlVmCandidate/action" + }, + "display": { + "$id": "789", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "790", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Register SQL Vm Candidate" + }, + "operation": { + "$id": "791", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Register SQL Vm Candidate" + } + } + } + } + }, + { + "$id": "792", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "793", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/locations/availabilityGroupListenerOperationResults/read" + }, + "display": { + "$id": "794", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "795", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Get result of an availability group listener operation" + }, + "operation": { + "$id": "796", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Get availability group listener operation result" + }, + "resource": { + "$id": "797", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "SQL availability group listener" + } + } + } + } + }, + { + "$id": "798", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "799", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/register/action" + }, + "display": { + "$id": "800", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "801", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Register subscription with Microsoft.SqlVirtualMachine resource provider" + }, + "operation": { + "$id": "802", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Register subscription for SQL Virtual Machine" + }, + "resource": { + "$id": "803", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "Microsoft SQL Virtual Machine" + } + } + } + } + }, + { + "$id": "804", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "805", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/unregister/action" + }, + "display": { + "$id": "806", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "807", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Unregister subscription with Microsoft.SqlVirtualMachine resource provider" + }, + "operation": { + "$id": "808", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Unregister subscription for SQL Virtual Machine" + }, + "resource": { + "$id": "809", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "Microsoft SQL Virtual Machine" + } + } + } + } + }, + { + "$id": "810", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "811", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/operations/read" + }, + "display": { + "$id": "812", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "resource": { + "$id": "813", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "Available REST operations" + } + } + } + } + }, + { + "$id": "814", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "815", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/locations/sqlVirtualMachineGroupOperationResults/read" + }, + "display": { + "$id": "816", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "817", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Get result of a SQL virtual machine group operation" + }, + "operation": { + "$id": "818", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Get SQL virtual machine group operation result" + }, + "resource": { + "$id": "819", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "SQL virtual machine group" + } + } + } + } + }, + { + "$id": "820", + "kind": "model", + "type": { + "$ref": "232" + }, + "value": { + "name": { + "$id": "821", + "kind": "string", + "type": { + "$ref": "234" + }, + "value": "Microsoft.SqlVirtualMachine/locations/sqlVirtualMachineOperationResults/read" + }, + "display": { + "$id": "822", + "kind": "model", + "type": { + "$ref": "236" + }, + "value": { + "description": { + "$id": "823", + "kind": "string", + "type": { + "$ref": "244" + }, + "value": "Get result of SQL virtual machine operation" + }, + "operation": { + "$id": "824", + "kind": "string", + "type": { + "$ref": "242" + }, + "value": "Get SQL virtual machine operation result" + }, + "resource": { + "$id": "825", + "kind": "string", + "type": { + "$ref": "240" + }, + "value": "SQL virtual machine" + } + } + } + } + } + ] + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "826", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "157" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "231" + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + }, + "pageSizeParameterSegments": [] + } + } + ], + "parameters": [ + { + "$id": "827", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "828", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.endpoint" + }, + { + "$ref": "676" + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations", + "apiVersions": [ + "2023-10-01" + ], + "parent": { + "$ref": "672" + }, + "isMultiServiceClient": false + }, + { + "$id": "830", + "kind": "client", + "name": "AvailabilityGroupListeners", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "methods": [ + { + "$id": "831", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Gets an availability group listener.", + "operation": { + "$id": "832", + "name": "get", + "resourceName": "AvailabilityGroupListener", + "doc": "Gets an availability group listener.", + "accessibility": "public", + "parameters": [ + { + "$id": "833", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "834", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "835", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.apiVersion", + "readOnly": false + }, + { + "$id": "836", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.subscriptionId" + }, + { + "$id": "838", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "839", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.resourceGroupName" + }, + { + "$id": "840", + "kind": "path", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "841", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.sqlVirtualMachineGroupName" + }, + { + "$id": "842", + "kind": "path", + "name": "availabilityGroupListenerName", + "serializedName": "availabilityGroupListenerName", + "doc": "Name of the availability group listener.", + "type": { + "$id": "843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.availabilityGroupListenerName" + }, + { + "$id": "844", + "kind": "query", + "name": "$expand", + "serializedName": "$expand", + "doc": "The child resources to include in the response.", + "type": { + "$id": "845", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "optional": true, + "scope": "Method", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.$expand", + "readOnly": false + }, + { + "$id": "846", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "159" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "271" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceRead", + "arguments": {} + } + ], + "examples": [ + { + "$id": "847", + "kind": "http", + "name": "Gets an availability group listener.", + "description": "Gets an availability group listener.", + "filePath": "2023-10-01/GetAvailabilityGroupListener.json", + "parameters": [ + { + "parameter": { + "$ref": "833" + }, + "value": { + "$id": "848", + "kind": "string", + "type": { + "$ref": "834" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "842" + }, + "value": { + "$id": "849", + "kind": "string", + "type": { + "$ref": "843" + }, + "value": "agl-test" + } + }, + { + "parameter": { + "$ref": "838" + }, + "value": { + "$id": "850", + "kind": "string", + "type": { + "$ref": "839" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "840" + }, + "value": { + "$id": "851", + "kind": "string", + "type": { + "$ref": "841" + }, + "value": "testvmgroup" + } + }, + { + "parameter": { + "$ref": "836" + }, + "value": { + "$id": "852", + "kind": "string", + "type": { + "$ref": "837" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "271" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "853", + "kind": "model", + "type": { + "$ref": "271" + }, + "value": { + "name": { + "$id": "854", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "agl-test" + }, + "type": { + "$id": "855", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" + }, + "id": { + "$id": "856", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" + }, + "properties": { + "$id": "857", + "kind": "model", + "type": { + "$ref": "297" + }, + "value": { + "availabilityGroupName": { + "$id": "858", + "kind": "string", + "type": { + "$ref": "301" + }, + "value": "ag-test" + }, + "loadBalancerConfigurations": { + "$id": "859", + "kind": "array", + "type": { + "$ref": "303" + }, + "value": [ + { + "$id": "860", + "kind": "model", + "type": { + "$ref": "304" + }, + "value": { + "loadBalancerResourceId": { + "$id": "861", + "kind": "string", + "type": { + "$ref": "317" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test" + }, + "privateIpAddress": { + "$id": "862", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "863", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.1.0.112" + }, + "subnetResourceId": { + "$id": "864", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + } + } + }, + "probePort": { + "$id": "865", + "kind": "number", + "type": { + "$ref": "320" + }, + "value": 59983 + }, + "sqlVirtualMachineInstances": { + "$id": "866", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [ + { + "$id": "867", + "kind": "string", + "type": { + "$ref": "323" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" + }, + { + "$id": "868", + "kind": "string", + "type": { + "$ref": "323" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + } + ] + } + } + } + ] + }, + "port": { + "$id": "869", + "kind": "number", + "type": { + "$ref": "334" + }, + "value": 1433 + }, + "provisioningState": { + "$id": "870", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Succeeded" + } + } + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "871", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "872", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "873", + "kind": "method", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.sqlVirtualMachineGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "875", + "kind": "method", + "name": "availabilityGroupListenerName", + "serializedName": "availabilityGroupListenerName", + "doc": "Name of the availability group listener.", + "type": { + "$id": "876", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.availabilityGroupListenerName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "877", + "kind": "method", + "name": "$expand", + "serializedName": "$expand", + "doc": "The child resources to include in the response.", + "type": { + "$id": "878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "optional": true, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.$expand", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "879", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "159" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "271" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get" + }, + { + "$id": "880", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Creates or updates an availability group listener.", + "operation": { + "$id": "881", + "name": "createOrUpdate", + "resourceName": "AvailabilityGroupListener", + "doc": "Creates or updates an availability group listener.", + "accessibility": "public", + "parameters": [ + { + "$id": "882", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "883", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "884", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.apiVersion", + "readOnly": false + }, + { + "$id": "885", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "886", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.subscriptionId" + }, + { + "$id": "887", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "888", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.resourceGroupName" + }, + { + "$id": "889", + "kind": "path", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "890", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.sqlVirtualMachineGroupName" + }, + { + "$id": "891", + "kind": "path", + "name": "availabilityGroupListenerName", + "serializedName": "availabilityGroupListenerName", + "doc": "Name of the availability group listener.", + "type": { + "$id": "892", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.availabilityGroupListenerName" + }, + { + "$id": "893", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "161" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.contentType" + }, + { + "$id": "894", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "163" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.accept" + }, + { + "$id": "895", + "kind": "body", + "name": "parameters", + "serializedName": "parameters", + "doc": "The availability group listener.", + "type": { + "$ref": "271" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.resource" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "271" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "271" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "897", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", + "arguments": {} + } + ], + "examples": [ + { + "$id": "898", + "kind": "http", + "name": "Creates or updates an availability group listener using load balancer. This is used for VMs present in single subnet.", + "description": "Creates or updates an availability group listener using load balancer. This is used for VMs present in single subnet.", + "filePath": "2023-10-01/CreateOrUpdateAvailabilityGroupListener.json", + "parameters": [ + { + "parameter": { + "$ref": "882" + }, + "value": { + "$id": "899", + "kind": "string", + "type": { + "$ref": "883" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "891" + }, + "value": { + "$id": "900", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "agl-test" + } + }, + { + "parameter": { + "$ref": "895" + }, + "value": { + "$id": "901", + "kind": "model", + "type": { + "$ref": "271" + }, + "value": { + "properties": { + "$id": "902", + "kind": "model", + "type": { + "$ref": "297" + }, + "value": { + "availabilityGroupName": { + "$id": "903", + "kind": "string", + "type": { + "$ref": "301" + }, + "value": "ag-test" + }, + "loadBalancerConfigurations": { + "$id": "904", + "kind": "array", + "type": { + "$ref": "303" + }, + "value": [ + { + "$id": "905", + "kind": "model", + "type": { + "$ref": "304" + }, + "value": { + "loadBalancerResourceId": { + "$id": "906", + "kind": "string", + "type": { + "$ref": "317" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test" + }, + "privateIpAddress": { + "$id": "907", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "908", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.1.0.112" + }, + "subnetResourceId": { + "$id": "909", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + } + } + }, + "probePort": { + "$id": "910", + "kind": "number", + "type": { + "$ref": "320" + }, + "value": 59983 + }, + "sqlVirtualMachineInstances": { + "$id": "911", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [ + { + "$id": "912", + "kind": "string", + "type": { + "$ref": "323" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + }, + { + "$id": "913", + "kind": "string", + "type": { + "$ref": "323" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" + } + ] + } + } + } + ] + }, + "port": { + "$id": "914", + "kind": "number", + "type": { + "$ref": "334" + }, + "value": 1433 + } + } + } + } + } + }, + { + "parameter": { + "$ref": "887" + }, + "value": { + "$id": "915", + "kind": "string", + "type": { + "$ref": "888" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "889" + }, + "value": { + "$id": "916", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "testvmgroup" + } + }, + { + "parameter": { + "$ref": "885" + }, + "value": { + "$id": "917", + "kind": "string", + "type": { + "$ref": "886" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "271" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "918", + "kind": "model", + "type": { + "$ref": "271" + }, + "value": { + "name": { + "$id": "919", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "agl-test" + }, + "type": { + "$id": "920", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" + }, + "id": { + "$id": "921", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" + }, + "properties": { + "$id": "922", + "kind": "model", + "type": { + "$ref": "297" + }, + "value": { + "loadBalancerConfigurations": { + "$id": "923", + "kind": "array", + "type": { + "$ref": "303" + }, + "value": [ + { + "$id": "924", + "kind": "model", + "type": { + "$ref": "304" + }, + "value": { + "privateIpAddress": { + "$id": "925", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "926", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.1.0.113" + }, + "subnetResourceId": { + "$id": "927", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + } + } + }, + "sqlVirtualMachineInstances": { + "$id": "928", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [ + { + "$id": "929", + "kind": "string", + "type": { + "$ref": "323" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + }, + { + "$id": "930", + "kind": "string", + "type": { + "$ref": "323" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" + } + ] + } + } + } + ] + }, + "port": { + "$id": "931", + "kind": "number", + "type": { + "$ref": "334" + }, + "value": 1433 + }, + "provisioningState": { + "$id": "932", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Updating" + } + } + } + } + } + }, + { + "response": { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "271" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "896" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "897" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 201, + "bodyValue": { + "$id": "933", + "kind": "model", + "type": { + "$ref": "271" + }, + "value": { + "name": { + "$id": "934", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "agl-test" + }, + "type": { + "$id": "935", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" + }, + "id": { + "$id": "936", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" + }, + "properties": { + "$id": "937", + "kind": "model", + "type": { + "$ref": "297" + }, + "value": { + "loadBalancerConfigurations": { + "$id": "938", + "kind": "array", + "type": { + "$ref": "303" + }, + "value": [ + { + "$id": "939", + "kind": "model", + "type": { + "$ref": "304" + }, + "value": { + "privateIpAddress": { + "$id": "940", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "941", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.1.0.112" + }, + "subnetResourceId": { + "$id": "942", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + } + } + }, + "sqlVirtualMachineInstances": { + "$id": "943", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [ + { + "$id": "944", + "kind": "string", + "type": { + "$ref": "323" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + }, + { + "$id": "945", + "kind": "string", + "type": { + "$ref": "323" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" + } + ] + } + } + } + ] + }, + "port": { + "$id": "946", + "kind": "number", + "type": { + "$ref": "334" + }, + "value": 1433 + }, + "provisioningState": { + "$id": "947", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Provisioning" + } + } + } + } + } + } + ] + }, + { + "$id": "948", + "kind": "http", + "name": "Creates or updates an availability group listener. This is used for VMs present in multi subnet", + "description": "Creates or updates an availability group listener. This is used for VMs present in multi subnet", + "filePath": "2023-10-01/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json", + "parameters": [ + { + "parameter": { + "$ref": "882" + }, + "value": { + "$id": "949", + "kind": "string", + "type": { + "$ref": "883" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "891" + }, + "value": { + "$id": "950", + "kind": "string", + "type": { + "$ref": "892" + }, + "value": "agl-test" + } + }, + { + "parameter": { + "$ref": "895" + }, + "value": { + "$id": "951", + "kind": "model", + "type": { + "$ref": "271" + }, + "value": { + "properties": { + "$id": "952", + "kind": "model", + "type": { + "$ref": "297" + }, + "value": { + "availabilityGroupName": { + "$id": "953", + "kind": "string", + "type": { + "$ref": "301" + }, + "value": "ag-test" + }, + "multiSubnetIpConfigurations": { + "$id": "954", + "kind": "array", + "type": { + "$ref": "326" + }, + "value": [ + { + "$id": "955", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "privateIpAddress": { + "$id": "956", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "957", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.0.0.112" + }, + "subnetResourceId": { + "$id": "958", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + } + } + }, + "sqlVirtualMachineInstance": { + "$id": "959", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + } + } + }, + { + "$id": "960", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "privateIpAddress": { + "$id": "961", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "962", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.0.1.112" + }, + "subnetResourceId": { + "$id": "963", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate" + } + } + }, + "sqlVirtualMachineInstance": { + "$id": "964", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1" + } + } + } + ] + }, + "port": { + "$id": "965", + "kind": "number", + "type": { + "$ref": "334" + }, + "value": 1433 + } + } + } + } + } + }, + { + "parameter": { + "$ref": "887" + }, + "value": { + "$id": "966", + "kind": "string", + "type": { + "$ref": "888" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "889" + }, + "value": { + "$id": "967", + "kind": "string", + "type": { + "$ref": "890" + }, + "value": "testvmgroup" + } + }, + { + "parameter": { + "$ref": "885" + }, + "value": { + "$id": "968", + "kind": "string", + "type": { + "$ref": "886" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "271" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "969", + "kind": "model", + "type": { + "$ref": "271" + }, + "value": { + "name": { + "$id": "970", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "agl-test" + }, + "type": { + "$id": "971", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" + }, + "id": { + "$id": "972", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" + }, + "properties": { + "$id": "973", + "kind": "model", + "type": { + "$ref": "297" + }, + "value": { + "multiSubnetIpConfigurations": { + "$id": "974", + "kind": "array", + "type": { + "$ref": "326" + }, + "value": [ + { + "$id": "975", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "privateIpAddress": { + "$id": "976", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "977", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.0.0.112" + }, + "subnetResourceId": { + "$id": "978", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + } + } + }, + "sqlVirtualMachineInstance": { + "$id": "979", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + } + } + }, + { + "$id": "980", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "privateIpAddress": { + "$id": "981", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "982", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.0.1.112" + }, + "subnetResourceId": { + "$id": "983", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate" + } + } + }, + "sqlVirtualMachineInstance": { + "$id": "984", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1" + } + } + } + ] + }, + "port": { + "$id": "985", + "kind": "number", + "type": { + "$ref": "334" + }, + "value": 1433 + }, + "provisioningState": { + "$id": "986", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Updating" + } + } + } + } + } + }, + { + "response": { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "271" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "896" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "897" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 201, + "bodyValue": { + "$id": "987", + "kind": "model", + "type": { + "$ref": "271" + }, + "value": { + "name": { + "$id": "988", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "agl-test" + }, + "type": { + "$id": "989", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" + }, + "id": { + "$id": "990", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" + }, + "properties": { + "$id": "991", + "kind": "model", + "type": { + "$ref": "297" + }, + "value": { + "multiSubnetIpConfigurations": { + "$id": "992", + "kind": "array", + "type": { + "$ref": "326" + }, + "value": [ + { + "$id": "993", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "privateIpAddress": { + "$id": "994", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "995", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.0.0.112" + }, + "subnetResourceId": { + "$id": "996", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + } + } + }, + "sqlVirtualMachineInstance": { + "$id": "997", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + } + } + }, + { + "$id": "998", + "kind": "model", + "type": { + "$ref": "327" + }, + "value": { + "privateIpAddress": { + "$id": "999", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "1000", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.0.1.112" + }, + "subnetResourceId": { + "$id": "1001", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate" + } + } + }, + "sqlVirtualMachineInstance": { + "$id": "1002", + "kind": "string", + "type": { + "$ref": "330" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1" + } + } + } + ] + }, + "port": { + "$id": "1003", + "kind": "number", + "type": { + "$ref": "334" + }, + "value": 1433 + }, + "provisioningState": { + "$id": "1004", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Provisioning" + } + } + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1005", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1006", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1007", + "kind": "method", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "1008", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.sqlVirtualMachineGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1009", + "kind": "method", + "name": "availabilityGroupListenerName", + "serializedName": "availabilityGroupListenerName", + "doc": "Name of the availability group listener.", + "type": { + "$id": "1010", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.availabilityGroupListenerName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1011", + "kind": "method", + "name": "parameters", + "serializedName": "parameters", + "doc": "The availability group listener.", + "type": { + "$ref": "271" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.resource", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1012", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "165" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1013", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "167" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "271" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate", + "lroMetadata": { + "finalStateVia": 0, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "271" + } + } + } + }, + { + "$id": "1014", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Deletes an availability group listener.", + "operation": { + "$id": "1015", + "name": "delete", + "resourceName": "AvailabilityGroupListener", + "doc": "Deletes an availability group listener.", + "accessibility": "public", + "parameters": [ + { + "$id": "1016", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1017", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1018", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.apiVersion", + "readOnly": false + }, + { + "$id": "1019", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1020", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.subscriptionId" + }, + { + "$id": "1021", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1022", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.resourceGroupName" + }, + { + "$id": "1023", + "kind": "path", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "1024", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.sqlVirtualMachineGroupName" + }, + { + "$id": "1025", + "kind": "path", + "name": "availabilityGroupListenerName", + "serializedName": "availabilityGroupListenerName", + "doc": "Name of the availability group listener.", + "type": { + "$id": "1026", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.availabilityGroupListenerName" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1027", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1028", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceDelete", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1029", + "kind": "http", + "name": "Deletes an availability group listener.", + "description": "Deletes an availability group listener.", + "filePath": "2023-10-01/DeleteAvailabilityGroupListener.json", + "parameters": [ + { + "parameter": { + "$ref": "1016" + }, + "value": { + "$id": "1030", + "kind": "string", + "type": { + "$ref": "1017" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1025" + }, + "value": { + "$id": "1031", + "kind": "string", + "type": { + "$ref": "1026" + }, + "value": "agl-test" + } + }, + { + "parameter": { + "$ref": "1021" + }, + "value": { + "$id": "1032", + "kind": "string", + "type": { + "$ref": "1022" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1023" + }, + "value": { + "$id": "1033", + "kind": "string", + "type": { + "$ref": "1024" + }, + "value": "testvmgroup" + } + }, + { + "parameter": { + "$ref": "1019" + }, + "value": { + "$id": "1034", + "kind": "string", + "type": { + "$ref": "1020" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + "statusCode": 200 + }, + { + "response": { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$ref": "1027" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1028" + } + } + ], + "isErrorResponse": false + }, + "statusCode": 202 + }, + { + "response": { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + }, + "statusCode": 204 + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1035", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1036", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1037", + "kind": "method", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "1038", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.sqlVirtualMachineGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1039", + "kind": "method", + "name": "availabilityGroupListenerName", + "serializedName": "availabilityGroupListenerName", + "doc": "Name of the availability group listener.", + "type": { + "$id": "1040", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.availabilityGroupListenerName", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "1041", + "kind": "paging", + "name": "listByGroup", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Lists all availability group listeners in a SQL virtual machine group.", + "operation": { + "$id": "1042", + "name": "listByGroup", + "resourceName": "AvailabilityGroupListener", + "doc": "Lists all availability group listeners in a SQL virtual machine group.", + "accessibility": "public", + "parameters": [ + { + "$id": "1043", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1044", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1045", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.apiVersion", + "readOnly": false + }, + { + "$id": "1046", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1047", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.subscriptionId" + }, + { + "$id": "1048", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1049", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.resourceGroupName" + }, + { + "$id": "1050", + "kind": "path", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "1051", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.sqlVirtualMachineGroupName" + }, + { + "$id": "1052", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "169" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "364" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceList", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1053", + "kind": "http", + "name": "Lists all availability group listeners in a SQL virtual machine group.", + "description": "Lists all availability group listeners in a SQL virtual machine group.", + "filePath": "2023-10-01/ListByGroupAvailabilityGroupListener.json", + "parameters": [ + { + "parameter": { + "$ref": "1043" + }, + "value": { + "$id": "1054", + "kind": "string", + "type": { + "$ref": "1044" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1048" + }, + "value": { + "$id": "1055", + "kind": "string", + "type": { + "$ref": "1049" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1050" + }, + "value": { + "$id": "1056", + "kind": "string", + "type": { + "$ref": "1051" + }, + "value": "testvmgroup" + } + }, + { + "parameter": { + "$ref": "1046" + }, + "value": { + "$id": "1057", + "kind": "string", + "type": { + "$ref": "1047" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "364" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1058", + "kind": "model", + "type": { + "$ref": "364" + }, + "value": { + "value": { + "$id": "1059", + "kind": "array", + "type": { + "$ref": "366" + }, + "value": [ + { + "$id": "1060", + "kind": "model", + "type": { + "$ref": "271" + }, + "value": { + "name": { + "$id": "1061", + "kind": "string", + "type": { + "$ref": "348" + }, + "value": "agl-test" + }, + "type": { + "$id": "1062", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" + }, + "id": { + "$id": "1063", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" + }, + "properties": { + "$id": "1064", + "kind": "model", + "type": { + "$ref": "297" + }, + "value": { + "availabilityGroupName": { + "$id": "1065", + "kind": "string", + "type": { + "$ref": "301" + }, + "value": "ag-test" + }, + "loadBalancerConfigurations": { + "$id": "1066", + "kind": "array", + "type": { + "$ref": "303" + }, + "value": [ + { + "$id": "1067", + "kind": "model", + "type": { + "$ref": "304" + }, + "value": { + "loadBalancerResourceId": { + "$id": "1068", + "kind": "string", + "type": { + "$ref": "317" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test" + }, + "privateIpAddress": { + "$id": "1069", + "kind": "model", + "type": { + "$ref": "306" + }, + "value": { + "ipAddress": { + "$id": "1070", + "kind": "string", + "type": { + "$ref": "308" + }, + "value": "10.1.0.112" + }, + "subnetResourceId": { + "$id": "1071", + "kind": "string", + "type": { + "$ref": "311" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" + } + } + }, + "probePort": { + "$id": "1072", + "kind": "number", + "type": { + "$ref": "320" + }, + "value": 59983 + }, + "sqlVirtualMachineInstances": { + "$id": "1073", + "kind": "array", + "type": { + "$ref": "322" + }, + "value": [ + { + "$id": "1074", + "kind": "string", + "type": { + "$ref": "323" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" + }, + { + "$id": "1075", + "kind": "string", + "type": { + "$ref": "323" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + } + ] + } + } + } + ] + }, + "port": { + "$id": "1076", + "kind": "number", + "type": { + "$ref": "334" + }, + "value": 1433 + }, + "provisioningState": { + "$id": "1077", + "kind": "string", + "type": { + "$ref": "299" + }, + "value": "Succeeded" + } + } + } + } + } + ] + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1078", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1079", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1080", + "kind": "method", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "1081", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.sqlVirtualMachineGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1082", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "169" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "366" + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + }, + "pageSizeParameterSegments": [] + } + } + ], + "parameters": [ + { + "$id": "1083", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "1084", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "1085", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.endpoint" + }, + { + "$id": "1086", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1087", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "1088", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$ref": "679" + } + ], + "initializedBy": 0, + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners", + "apiVersions": [ + "2023-10-01" + ], + "parent": { + "$ref": "672" + }, + "isMultiServiceClient": false + }, + { + "$id": "1089", + "kind": "client", + "name": "SqlVirtualMachines", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "methods": [ + { + "$id": "1090", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Gets a SQL virtual machine.", + "operation": { + "$id": "1091", + "name": "get", + "resourceName": "SqlVirtualMachine", + "doc": "Gets a SQL virtual machine.", + "accessibility": "public", + "parameters": [ + { + "$id": "1092", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1093", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1094", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.apiVersion", + "readOnly": false + }, + { + "$id": "1095", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1096", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.subscriptionId" + }, + { + "$id": "1097", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1098", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.resourceGroupName" + }, + { + "$id": "1099", + "kind": "path", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1100", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.sqlVirtualMachineName" + }, + { + "$id": "1101", + "kind": "query", + "name": "$expand", + "serializedName": "$expand", + "doc": "The child resources to include in the response.", + "type": { + "$id": "1102", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "optional": true, + "scope": "Method", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.$expand", + "readOnly": false + }, + { + "$id": "1103", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "171" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceRead", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1104", + "kind": "http", + "name": "Gets a SQL virtual machine.", + "description": "Gets a SQL virtual machine.", + "filePath": "2023-10-01/GetSqlVirtualMachine.json", + "parameters": [ + { + "parameter": { + "$ref": "1092" + }, + "value": { + "$id": "1105", + "kind": "string", + "type": { + "$ref": "1093" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1097" + }, + "value": { + "$id": "1106", + "kind": "string", + "type": { + "$ref": "1098" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1099" + }, + "value": { + "$id": "1107", + "kind": "string", + "type": { + "$ref": "1100" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1095" + }, + "value": { + "$id": "1108", + "kind": "string", + "type": { + "$ref": "1096" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1109", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1110", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1111", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1112", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1113", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1114", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1115", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1116", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1117", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1118", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1119", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "1120", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1121", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1122", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1123", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1124", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1125", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1126", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1127", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1128", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1129", + "kind": "method", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.sqlVirtualMachineName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1131", + "kind": "method", + "name": "$expand", + "serializedName": "$expand", + "doc": "The child resources to include in the response.", + "type": { + "$id": "1132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "optional": true, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.$expand", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1133", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "171" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "370" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get" + }, + { + "$id": "1134", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Creates or updates a SQL virtual machine.", + "operation": { + "$id": "1135", + "name": "createOrUpdate", + "resourceName": "SqlVirtualMachine", + "doc": "Creates or updates a SQL virtual machine.", + "accessibility": "public", + "parameters": [ + { + "$id": "1136", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1138", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.apiVersion", + "readOnly": false + }, + { + "$id": "1139", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.subscriptionId" + }, + { + "$id": "1141", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1142", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.resourceGroupName" + }, + { + "$id": "1143", + "kind": "path", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1144", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.sqlVirtualMachineName" + }, + { + "$id": "1145", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "173" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.contentType" + }, + { + "$id": "1146", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "175" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.accept" + }, + { + "$id": "1147", + "kind": "body", + "name": "parameters", + "serializedName": "parameters", + "doc": "The SQL virtual machine.", + "type": { + "$ref": "370" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.resource" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "1148", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1149", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1150", + "kind": "http", + "name": "Creates or updates a SQL virtual machine for Automated Back up Settings with Weekly and Days of the week to run the back up.", + "description": "Creates or updates a SQL virtual machine for Automated Back up Settings with Weekly and Days of the week to run the back up.", + "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json", + "parameters": [ + { + "parameter": { + "$ref": "1136" + }, + "value": { + "$id": "1151", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1147" + }, + "value": { + "$id": "1152", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "location": { + "$id": "1153", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1154", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "autoBackupSettings": { + "$id": "1155", + "kind": "model", + "type": { + "$ref": "417" + }, + "value": { + "backupScheduleType": { + "$id": "1156", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Manual" + }, + "backupSystemDbs": { + "$id": "1157", + "kind": "boolean", + "type": { + "$ref": "433" + }, + "value": true + }, + "daysOfWeek": { + "$id": "1158", + "kind": "array", + "type": { + "$ref": "437" + }, + "value": [ + { + "$id": "1159", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "Monday" + }, + { + "$id": "1160", + "kind": "string", + "type": { + "$ref": "76" + }, + "value": "Friday" + } + ] + }, + "enable": { + "$id": "1161", + "kind": "boolean", + "type": { + "$ref": "419" + }, + "value": true + }, + "enableEncryption": { + "$id": "1162", + "kind": "boolean", + "type": { + "$ref": "421" + }, + "value": true + }, + "fullBackupFrequency": { + "$id": "1163", + "kind": "string", + "type": { + "$ref": "72" + }, + "value": "Weekly" + }, + "fullBackupStartTime": { + "$id": "1164", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 6 + }, + "fullBackupWindowHours": { + "$id": "1165", + "kind": "number", + "type": { + "$ref": "441" + }, + "value": 11 + }, + "logBackupFrequency": { + "$id": "1166", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 10 + }, + "password": { + "$id": "1167", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "" + }, + "retentionPeriod": { + "$id": "1168", + "kind": "number", + "type": { + "$ref": "423" + }, + "value": 17 + }, + "storageAccessKey": { + "$id": "1169", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "" + }, + "storageAccountUrl": { + "$id": "1170", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "https://teststorage.blob.core.windows.net/" + }, + "storageContainerName": { + "$id": "1171", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "testcontainer" + } + } + }, + "autoPatchingSettings": { + "$id": "1172", + "kind": "model", + "type": { + "$ref": "407" + }, + "value": { + "dayOfWeek": { + "$id": "1173", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Sunday" + }, + "enable": { + "$id": "1174", + "kind": "boolean", + "type": { + "$ref": "409" + }, + "value": true + }, + "maintenanceWindowDuration": { + "$id": "1175", + "kind": "number", + "type": { + "$ref": "414" + }, + "value": 60 + }, + "maintenanceWindowStartingHour": { + "$id": "1176", + "kind": "number", + "type": { + "$ref": "412" + }, + "value": 2 + } + } + }, + "keyVaultCredentialSettings": { + "$id": "1177", + "kind": "model", + "type": { + "$ref": "445" + }, + "value": { + "enable": { + "$id": "1178", + "kind": "boolean", + "type": { + "$ref": "447" + }, + "value": false + } + } + }, + "serverConfigurationsManagementSettings": { + "$id": "1179", + "kind": "model", + "type": { + "$ref": "457" + }, + "value": { + "additionalFeaturesServerConfigurations": { + "$id": "1180", + "kind": "model", + "type": { + "$ref": "478" + }, + "value": { + "isRServicesEnabled": { + "$id": "1181", + "kind": "boolean", + "type": { + "$ref": "480" + }, + "value": false + } + } + }, + "sqlConnectivityUpdateSettings": { + "$id": "1182", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "connectivityType": { + "$id": "1183", + "kind": "string", + "type": { + "$ref": "85" + }, + "value": "PRIVATE" + }, + "port": { + "$id": "1184", + "kind": "number", + "type": { + "$ref": "462" + }, + "value": 1433 + }, + "sqlAuthUpdatePassword": { + "$id": "1185", + "kind": "string", + "type": { + "$ref": "466" + }, + "value": "" + }, + "sqlAuthUpdateUserName": { + "$id": "1186", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "sqllogin" + } + } + }, + "sqlStorageUpdateSettings": { + "$id": "1187", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "diskConfigurationType": { + "$id": "1188", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "NEW" + }, + "diskCount": { + "$id": "1189", + "kind": "number", + "type": { + "$ref": "473" + }, + "value": 1 + }, + "startingDeviceId": { + "$id": "1190", + "kind": "number", + "type": { + "$ref": "475" + }, + "value": 2 + } + } + }, + "sqlWorkloadTypeUpdateSettings": { + "$id": "1191", + "kind": "model", + "type": { + "$ref": "468" + }, + "value": { + "sqlWorkloadType": { + "$id": "1192", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "OLTP" + } + } + } + } + }, + "sqlImageSku": { + "$id": "1193", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlServerLicenseType": { + "$id": "1194", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineResourceId": { + "$id": "1195", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "parameter": { + "$ref": "1141" + }, + "value": { + "$id": "1196", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1143" + }, + "value": { + "$id": "1197", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1139" + }, + "value": { + "$id": "1198", + "kind": "string", + "type": { + "$ref": "1140" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1199", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1200", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1201", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1202", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1203", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1204", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1205", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1206", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": false + }, + "leastPrivilegeMode": { + "$id": "1207", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1208", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1209", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Updating" + }, + "sqlImageOffer": { + "$id": "1210", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1211", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1212", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1213", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1214", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1215", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1216", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "response": { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "1148" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1149" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 201, + "bodyValue": { + "$id": "1217", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1218", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1219", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1220", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1221", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1222", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "enableAutomaticUpgrade": { + "$id": "1223", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1224", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "NotSet" + }, + "provisioningState": { + "$id": "1225", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Provisioning" + }, + "sqlImageSku": { + "$id": "1226", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Unknown" + }, + "sqlServerLicenseType": { + "$id": "1227", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineResourceId": { + "$id": "1228", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + } + ] + }, + { + "$id": "1229", + "kind": "http", + "name": "Creates or updates a SQL virtual machine with max parameters.", + "description": "Creates or updates a SQL virtual machine with max parameters.", + "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineMAX.json", + "parameters": [ + { + "parameter": { + "$ref": "1136" + }, + "value": { + "$id": "1230", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1147" + }, + "value": { + "$id": "1231", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "location": { + "$id": "1232", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1233", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "assessmentSettings": { + "$id": "1234", + "kind": "model", + "type": { + "$ref": "561" + }, + "value": { + "enable": { + "$id": "1235", + "kind": "boolean", + "type": { + "$ref": "563" + }, + "value": true + }, + "runImmediately": { + "$id": "1236", + "kind": "boolean", + "type": { + "$ref": "565" + }, + "value": true + }, + "schedule": { + "$id": "1237", + "kind": "model", + "type": { + "$ref": "567" + }, + "value": { + "dayOfWeek": { + "$id": "1238", + "kind": "string", + "type": { + "$ref": "108" + }, + "value": "Sunday" + }, + "enable": { + "$id": "1239", + "kind": "boolean", + "type": { + "$ref": "569" + }, + "value": true + }, + "startTime": { + "$id": "1240", + "kind": "string", + "type": { + "$ref": "576" + }, + "value": "23:17" + }, + "weeklyInterval": { + "$id": "1241", + "kind": "number", + "type": { + "$ref": "571" + }, + "value": 1 + } + } + } + } + }, + "autoBackupSettings": { + "$id": "1242", + "kind": "model", + "type": { + "$ref": "417" + }, + "value": { + "backupScheduleType": { + "$id": "1243", + "kind": "string", + "type": { + "$ref": "68" + }, + "value": "Manual" + }, + "backupSystemDbs": { + "$id": "1244", + "kind": "boolean", + "type": { + "$ref": "433" + }, + "value": true + }, + "enable": { + "$id": "1245", + "kind": "boolean", + "type": { + "$ref": "419" + }, + "value": true + }, + "enableEncryption": { + "$id": "1246", + "kind": "boolean", + "type": { + "$ref": "421" + }, + "value": true + }, + "fullBackupFrequency": { + "$id": "1247", + "kind": "string", + "type": { + "$ref": "72" + }, + "value": "Daily" + }, + "fullBackupStartTime": { + "$id": "1248", + "kind": "number", + "type": { + "$ref": "439" + }, + "value": 6 + }, + "fullBackupWindowHours": { + "$id": "1249", + "kind": "number", + "type": { + "$ref": "441" + }, + "value": 11 + }, + "logBackupFrequency": { + "$id": "1250", + "kind": "number", + "type": { + "$ref": "443" + }, + "value": 10 + }, + "password": { + "$id": "1251", + "kind": "string", + "type": { + "$ref": "431" + }, + "value": "" + }, + "retentionPeriod": { + "$id": "1252", + "kind": "number", + "type": { + "$ref": "423" + }, + "value": 17 + }, + "storageAccessKey": { + "$id": "1253", + "kind": "string", + "type": { + "$ref": "429" + }, + "value": "" + }, + "storageAccountUrl": { + "$id": "1254", + "kind": "string", + "type": { + "$ref": "425" + }, + "value": "https://teststorage.blob.core.windows.net/" + }, + "storageContainerName": { + "$id": "1255", + "kind": "string", + "type": { + "$ref": "427" + }, + "value": "testcontainer" + } + } + }, + "autoPatchingSettings": { + "$id": "1256", + "kind": "model", + "type": { + "$ref": "407" + }, + "value": { + "dayOfWeek": { + "$id": "1257", + "kind": "string", + "type": { + "$ref": "54" + }, + "value": "Sunday" + }, + "enable": { + "$id": "1258", + "kind": "boolean", + "type": { + "$ref": "409" + }, + "value": true + }, + "maintenanceWindowDuration": { + "$id": "1259", + "kind": "number", + "type": { + "$ref": "414" + }, + "value": 60 + }, + "maintenanceWindowStartingHour": { + "$id": "1260", + "kind": "number", + "type": { + "$ref": "412" + }, + "value": 2 + } + } + }, + "enableAutomaticUpgrade": { + "$id": "1261", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "keyVaultCredentialSettings": { + "$id": "1262", + "kind": "model", + "type": { + "$ref": "445" + }, + "value": { + "enable": { + "$id": "1263", + "kind": "boolean", + "type": { + "$ref": "447" + }, + "value": false + } + } + }, + "leastPrivilegeMode": { + "$id": "1264", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "serverConfigurationsManagementSettings": { + "$id": "1265", + "kind": "model", + "type": { + "$ref": "457" + }, + "value": { + "additionalFeaturesServerConfigurations": { + "$id": "1266", + "kind": "model", + "type": { + "$ref": "478" + }, + "value": { + "isRServicesEnabled": { + "$id": "1267", + "kind": "boolean", + "type": { + "$ref": "480" + }, + "value": false + } + } + }, + "azureAdAuthenticationSettings": { + "$id": "1268", + "kind": "model", + "type": { + "$ref": "498" + }, + "value": { + "clientId": { + "$id": "1269", + "kind": "string", + "type": { + "$ref": "500" + }, + "value": "11111111-2222-3333-4444-555555555555" + } + } + }, + "sqlConnectivityUpdateSettings": { + "$id": "1270", + "kind": "model", + "type": { + "$ref": "459" + }, + "value": { + "connectivityType": { + "$id": "1271", + "kind": "string", + "type": { + "$ref": "85" + }, + "value": "PRIVATE" + }, + "port": { + "$id": "1272", + "kind": "number", + "type": { + "$ref": "462" + }, + "value": 1433 + }, + "sqlAuthUpdatePassword": { + "$id": "1273", + "kind": "string", + "type": { + "$ref": "466" + }, + "value": "" + }, + "sqlAuthUpdateUserName": { + "$id": "1274", + "kind": "string", + "type": { + "$ref": "464" + }, + "value": "sqllogin" + } + } + }, + "sqlInstanceSettings": { + "$id": "1275", + "kind": "model", + "type": { + "$ref": "482" + }, + "value": { + "collation": { + "$id": "1276", + "kind": "string", + "type": { + "$ref": "484" + }, + "value": "SQL_Latin1_General_CP1_CI_AS" + }, + "isIfiEnabled": { + "$id": "1277", + "kind": "boolean", + "type": { + "$ref": "496" + }, + "value": true + }, + "isLpimEnabled": { + "$id": "1278", + "kind": "boolean", + "type": { + "$ref": "494" + }, + "value": true + }, + "isOptimizeForAdHocWorkloadsEnabled": { + "$id": "1279", + "kind": "boolean", + "type": { + "$ref": "488" + }, + "value": true + }, + "maxDop": { + "$id": "1280", + "kind": "number", + "type": { + "$ref": "486" + }, + "value": 8 + }, + "maxServerMemoryMB": { + "$id": "1281", + "kind": "number", + "type": { + "$ref": "492" + }, + "value": 128 + }, + "minServerMemoryMB": { + "$id": "1282", + "kind": "number", + "type": { + "$ref": "490" + }, + "value": 0 + } + } + }, + "sqlStorageUpdateSettings": { + "$id": "1283", + "kind": "model", + "type": { + "$ref": "471" + }, + "value": { + "diskConfigurationType": { + "$id": "1284", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "NEW" + }, + "diskCount": { + "$id": "1285", + "kind": "number", + "type": { + "$ref": "473" + }, + "value": 1 + }, + "startingDeviceId": { + "$id": "1286", + "kind": "number", + "type": { + "$ref": "475" + }, + "value": 2 + } + } + }, + "sqlWorkloadTypeUpdateSettings": { + "$id": "1287", + "kind": "model", + "type": { + "$ref": "468" + }, + "value": { + "sqlWorkloadType": { + "$id": "1288", + "kind": "string", + "type": { + "$ref": "90" + }, + "value": "OLTP" + } + } + } + } + }, + "sqlImageSku": { + "$id": "1289", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlServerLicenseType": { + "$id": "1290", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "storageConfigurationSettings": { + "$id": "1291", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "diskConfigurationType": { + "$id": "1292", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "NEW" + }, + "enableStorageConfigBlade": { + "$id": "1293", + "kind": "boolean", + "type": { + "$ref": "539" + }, + "value": true + }, + "sqlDataSettings": { + "$id": "1294", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "defaultFilePath": { + "$id": "1295", + "kind": "string", + "type": { + "$ref": "509" + }, + "value": "F:\\folderpath\\" + }, + "luns": { + "$id": "1296", + "kind": "array", + "type": { + "$ref": "506" + }, + "value": [ + { + "$id": "1297", + "kind": "number", + "type": { + "$ref": "507" + }, + "value": 0 + } + ] + }, + "useStoragePool": { + "$id": "1298", + "kind": "boolean", + "type": { + "$ref": "511" + }, + "value": false + } + } + }, + "sqlLogSettings": { + "$id": "1299", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "defaultFilePath": { + "$id": "1300", + "kind": "string", + "type": { + "$ref": "509" + }, + "value": "G:\\folderpath\\" + }, + "luns": { + "$id": "1301", + "kind": "array", + "type": { + "$ref": "506" + }, + "value": [ + { + "$id": "1302", + "kind": "number", + "type": { + "$ref": "507" + }, + "value": 1 + } + ] + }, + "useStoragePool": { + "$id": "1303", + "kind": "boolean", + "type": { + "$ref": "511" + }, + "value": false + } + } + }, + "sqlSystemDbOnDataDisk": { + "$id": "1304", + "kind": "boolean", + "type": { + "$ref": "535" + }, + "value": true + }, + "sqlTempDbSettings": { + "$id": "1305", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "dataFileCount": { + "$id": "1306", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 8 + }, + "dataFileSize": { + "$id": "1307", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 256 + }, + "dataGrowth": { + "$id": "1308", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 512 + }, + "defaultFilePath": { + "$id": "1309", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "D:\\TEMP" + }, + "logFileSize": { + "$id": "1310", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 256 + }, + "logGrowth": { + "$id": "1311", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 512 + }, + "luns": { + "$id": "1312", + "kind": "array", + "type": { + "$ref": "506" + }, + "value": [ + { + "$id": "1313", + "kind": "number", + "type": { + "$ref": "507" + }, + "value": 2 + } + ] + }, + "useStoragePool": { + "$id": "1314", + "kind": "boolean", + "type": { + "$ref": "533" + }, + "value": false + } + } + }, + "storageWorkloadType": { + "$id": "1315", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "OLTP" + } + } + }, + "virtualMachineResourceId": { + "$id": "1316", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "parameter": { + "$ref": "1141" + }, + "value": { + "$id": "1317", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1143" + }, + "value": { + "$id": "1318", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1139" + }, + "value": { + "$id": "1319", + "kind": "string", + "type": { + "$ref": "1140" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1320", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1321", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1322", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1323", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1324", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1325", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1326", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1327", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1328", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1329", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1330", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Updating" + }, + "sqlImageOffer": { + "$id": "1331", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1332", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1333", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1334", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1335", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1336", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1337", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "response": { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "1148" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1149" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 201, + "bodyValue": { + "$id": "1338", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1339", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1340", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1341", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1342", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1343", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "enableAutomaticUpgrade": { + "$id": "1344", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1345", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "NotSet" + }, + "provisioningState": { + "$id": "1346", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Provisioning" + }, + "sqlImageSku": { + "$id": "1347", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Unknown" + }, + "sqlServerLicenseType": { + "$id": "1348", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineResourceId": { + "$id": "1349", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + } + ] + }, + { + "$id": "1350", + "kind": "http", + "name": "Creates or updates a SQL virtual machine with min parameters.", + "description": "Creates or updates a SQL virtual machine with min parameters.", + "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineMIN.json", + "parameters": [ + { + "parameter": { + "$ref": "1136" + }, + "value": { + "$id": "1351", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1147" + }, + "value": { + "$id": "1352", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "location": { + "$id": "1353", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1354", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "virtualMachineResourceId": { + "$id": "1355", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "parameter": { + "$ref": "1141" + }, + "value": { + "$id": "1356", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1143" + }, + "value": { + "$id": "1357", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1139" + }, + "value": { + "$id": "1358", + "kind": "string", + "type": { + "$ref": "1140" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1359", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1360", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1361", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1362", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1363", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1364", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1365", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1366", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1367", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1368", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1369", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Updating" + }, + "sqlImageOffer": { + "$id": "1370", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1371", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1372", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1373", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1374", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1375", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1376", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "response": { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "1148" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1149" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 201, + "bodyValue": { + "$id": "1377", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1378", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1379", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1380", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1381", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1382", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "enableAutomaticUpgrade": { + "$id": "1383", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1384", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "NotSet" + }, + "provisioningState": { + "$id": "1385", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Provisioning" + }, + "sqlImageSku": { + "$id": "1386", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Unknown" + }, + "sqlServerLicenseType": { + "$id": "1387", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineResourceId": { + "$id": "1388", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + } + ] + }, + { + "$id": "1389", + "kind": "http", + "name": "Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or TempDB storage pool.", + "description": "Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or TempDB storage pool.", + "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json", + "parameters": [ + { + "parameter": { + "$ref": "1136" + }, + "value": { + "$id": "1390", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1147" + }, + "value": { + "$id": "1391", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "location": { + "$id": "1392", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1393", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "storageConfigurationSettings": { + "$id": "1394", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "diskConfigurationType": { + "$id": "1395", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "EXTEND" + }, + "sqlDataSettings": { + "$id": "1396", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "luns": { + "$id": "1397", + "kind": "array", + "type": { + "$ref": "506" + }, + "value": [ + { + "$id": "1398", + "kind": "number", + "type": { + "$ref": "507" + }, + "value": 2 + } + ] + } + } + } + } + }, + "virtualMachineResourceId": { + "$id": "1399", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "parameter": { + "$ref": "1141" + }, + "value": { + "$id": "1400", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1143" + }, + "value": { + "$id": "1401", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1139" + }, + "value": { + "$id": "1402", + "kind": "string", + "type": { + "$ref": "1140" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1403", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1404", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1405", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1406", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1407", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1408", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1409", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1410", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1411", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1412", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1413", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Updating" + }, + "sqlImageOffer": { + "$id": "1414", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1415", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1416", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1417", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1418", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1419", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1420", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "response": { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "1148" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1149" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 201, + "bodyValue": { + "$id": "1421", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1422", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1423", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1424", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1425", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1426", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "enableAutomaticUpgrade": { + "$id": "1427", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1428", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "NotSet" + }, + "provisioningState": { + "$id": "1429", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Provisioning" + }, + "sqlImageSku": { + "$id": "1430", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Unknown" + }, + "sqlServerLicenseType": { + "$id": "1431", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineResourceId": { + "$id": "1432", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + } + ] + }, + { + "$id": "1433", + "kind": "http", + "name": "Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and TempDB storage pool.", + "description": "Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and TempDB storage pool.", + "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json", + "parameters": [ + { + "parameter": { + "$ref": "1136" + }, + "value": { + "$id": "1434", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1147" + }, + "value": { + "$id": "1435", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "location": { + "$id": "1436", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1437", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "storageConfigurationSettings": { + "$id": "1438", + "kind": "model", + "type": { + "$ref": "502" + }, + "value": { + "diskConfigurationType": { + "$id": "1439", + "kind": "string", + "type": { + "$ref": "95" + }, + "value": "NEW" + }, + "sqlDataSettings": { + "$id": "1440", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "defaultFilePath": { + "$id": "1441", + "kind": "string", + "type": { + "$ref": "509" + }, + "value": "F:\\folderpath\\" + }, + "luns": { + "$id": "1442", + "kind": "array", + "type": { + "$ref": "506" + }, + "value": [ + { + "$id": "1443", + "kind": "number", + "type": { + "$ref": "507" + }, + "value": 0 + } + ] + } + } + }, + "sqlLogSettings": { + "$id": "1444", + "kind": "model", + "type": { + "$ref": "504" + }, + "value": { + "defaultFilePath": { + "$id": "1445", + "kind": "string", + "type": { + "$ref": "509" + }, + "value": "G:\\folderpath\\" + }, + "luns": { + "$id": "1446", + "kind": "array", + "type": { + "$ref": "506" + }, + "value": [ + { + "$id": "1447", + "kind": "number", + "type": { + "$ref": "507" + }, + "value": 1 + } + ] + } + } + }, + "sqlSystemDbOnDataDisk": { + "$id": "1448", + "kind": "boolean", + "type": { + "$ref": "535" + }, + "value": true + }, + "sqlTempDbSettings": { + "$id": "1449", + "kind": "model", + "type": { + "$ref": "514" + }, + "value": { + "dataFileCount": { + "$id": "1450", + "kind": "number", + "type": { + "$ref": "524" + }, + "value": 8 + }, + "dataFileSize": { + "$id": "1451", + "kind": "number", + "type": { + "$ref": "516" + }, + "value": 256 + }, + "dataGrowth": { + "$id": "1452", + "kind": "number", + "type": { + "$ref": "518" + }, + "value": 512 + }, + "defaultFilePath": { + "$id": "1453", + "kind": "string", + "type": { + "$ref": "531" + }, + "value": "D:\\TEMP" + }, + "logFileSize": { + "$id": "1454", + "kind": "number", + "type": { + "$ref": "520" + }, + "value": 256 + }, + "logGrowth": { + "$id": "1455", + "kind": "number", + "type": { + "$ref": "522" + }, + "value": 512 + } + } + }, + "storageWorkloadType": { + "$id": "1456", + "kind": "string", + "type": { + "$ref": "100" + }, + "value": "OLTP" + } + } + }, + "virtualMachineResourceId": { + "$id": "1457", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "parameter": { + "$ref": "1141" + }, + "value": { + "$id": "1458", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1143" + }, + "value": { + "$id": "1459", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1139" + }, + "value": { + "$id": "1460", + "kind": "string", + "type": { + "$ref": "1140" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1461", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1462", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1463", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1464", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1465", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1466", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1467", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1468", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": false + }, + "leastPrivilegeMode": { + "$id": "1469", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1470", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1471", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Updating" + }, + "sqlImageOffer": { + "$id": "1472", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1473", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1474", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1475", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1476", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1477", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1478", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "response": { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "1148" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1149" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 201, + "bodyValue": { + "$id": "1479", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1480", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1481", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1482", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1483", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1484", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "enableAutomaticUpgrade": { + "$id": "1485", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1486", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "NotSet" + }, + "provisioningState": { + "$id": "1487", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Provisioning" + }, + "sqlImageSku": { + "$id": "1488", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Unknown" + }, + "sqlServerLicenseType": { + "$id": "1489", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineResourceId": { + "$id": "1490", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + } + ] + }, + { + "$id": "1491", + "kind": "http", + "name": "Creates or updates a SQL virtual machine to enable the usage of Virtual Machine managed identity.", + "description": "Creates or updates a SQL virtual machine to enable the usage of Virtual Machine managed identity.", + "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineVmIdentitySettings.json", + "parameters": [ + { + "parameter": { + "$ref": "1136" + }, + "value": { + "$id": "1492", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1147" + }, + "value": { + "$id": "1493", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "location": { + "$id": "1494", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1495", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "virtualMachineIdentitySettings": { + "$id": "1496", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1497", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "UserAssigned" + }, + "resourceId": { + "$id": "1498", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testvmidentity" + } + } + }, + "virtualMachineResourceId": { + "$id": "1499", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "parameter": { + "$ref": "1141" + }, + "value": { + "$id": "1500", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1143" + }, + "value": { + "$id": "1501", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1139" + }, + "value": { + "$id": "1502", + "kind": "string", + "type": { + "$ref": "1140" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1503", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1504", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1505", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1506", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1507", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1508", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1509", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1510", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": false + }, + "leastPrivilegeMode": { + "$id": "1511", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1512", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1513", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Updating" + }, + "sqlImageOffer": { + "$id": "1514", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1515", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1516", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1517", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1518", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1519", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "UserAssigned" + }, + "resourceId": { + "$id": "1520", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testvmidentity" + } + } + }, + "virtualMachineResourceId": { + "$id": "1521", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + }, + { + "response": { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "1148" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1149" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 201, + "bodyValue": { + "$id": "1522", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1523", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1524", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1525", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1526", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1527", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "enableAutomaticUpgrade": { + "$id": "1528", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1529", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "NotSet" + }, + "provisioningState": { + "$id": "1530", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Provisioning" + }, + "sqlImageSku": { + "$id": "1531", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Unknown" + }, + "sqlServerLicenseType": { + "$id": "1532", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1533", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1534", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "UserAssigned" + }, + "resourceId": { + "$id": "1535", + "kind": "string", + "type": { + "$ref": "584" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testvmidentity" + } + } + }, + "virtualMachineResourceId": { + "$id": "1536", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + } + } + ] + }, + { + "$id": "1537", + "kind": "http", + "name": "Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group.", + "description": "Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group.", + "filePath": "2023-10-01/CreateOrUpdateVirtualMachineWithVMGroup.json", + "parameters": [ + { + "parameter": { + "$ref": "1136" + }, + "value": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "1137" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1147" + }, + "value": { + "$id": "1539", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "location": { + "$id": "1540", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1541", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "sqlVirtualMachineGroupResourceId": { + "$id": "1542", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" + }, + "virtualMachineResourceId": { + "$id": "1543", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2" + }, + "wsfcDomainCredentials": { + "$id": "1544", + "kind": "model", + "type": { + "$ref": "396" + }, + "value": { + "clusterBootstrapAccountPassword": { + "$id": "1545", + "kind": "string", + "type": { + "$ref": "398" + }, + "value": "" + }, + "clusterOperatorAccountPassword": { + "$id": "1546", + "kind": "string", + "type": { + "$ref": "400" + }, + "value": "" + }, + "sqlServiceAccountPassword": { + "$id": "1547", + "kind": "string", + "type": { + "$ref": "402" + }, + "value": "" + } + } + }, + "wsfcStaticIp": { + "$id": "1548", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "10.0.0.7" + } + } + } + } + } + }, + { + "parameter": { + "$ref": "1141" + }, + "value": { + "$id": "1549", + "kind": "string", + "type": { + "$ref": "1142" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1143" + }, + "value": { + "$id": "1550", + "kind": "string", + "type": { + "$ref": "1144" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1139" + }, + "value": { + "$id": "1551", + "kind": "string", + "type": { + "$ref": "1140" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1552", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1553", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm2" + }, + "type": { + "$id": "1554", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1555", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + }, + "location": { + "$id": "1556", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1557", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1558", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1559", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": false + }, + "leastPrivilegeMode": { + "$id": "1560", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1561", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1562", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Updating" + }, + "sqlImageOffer": { + "$id": "1563", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1564", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1565", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1566", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "sqlVirtualMachineGroupResourceId": { + "$id": "1567", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" + }, + "virtualMachineIdentitySettings": { + "$id": "1568", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1569", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1570", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2" + }, + "wsfcStaticIp": { + "$id": "1571", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "10.0.0.7" + } + } + } + } + } + }, + { + "response": { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "1148" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1149" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 201, + "bodyValue": { + "$id": "1572", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1573", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm2" + }, + "type": { + "$id": "1574", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1575", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + }, + "location": { + "$id": "1576", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1577", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "enableAutomaticUpgrade": { + "$id": "1578", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1579", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "NotSet" + }, + "provisioningState": { + "$id": "1580", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Provisioning" + }, + "sqlImageSku": { + "$id": "1581", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Unknown" + }, + "sqlServerLicenseType": { + "$id": "1582", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "sqlVirtualMachineGroupResourceId": { + "$id": "1583", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" + }, + "virtualMachineResourceId": { + "$id": "1584", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2" + }, + "wsfcStaticIp": { + "$id": "1585", + "kind": "string", + "type": { + "$ref": "404" + }, + "value": "10.0.0.7" + } + } + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1586", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1587", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1588", + "kind": "method", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1589", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.sqlVirtualMachineName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1590", + "kind": "method", + "name": "parameters", + "serializedName": "parameters", + "doc": "The SQL virtual machine.", + "type": { + "$ref": "370" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.resource", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1591", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "177" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1592", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "179" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "370" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate", + "lroMetadata": { + "finalStateVia": 0, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + } + } + } + }, + { + "$id": "1593", + "kind": "lro", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Updates SQL virtual machine tags.", + "operation": { + "$id": "1594", + "name": "update", + "resourceName": "SqlVirtualMachine", + "doc": "Updates SQL virtual machine tags.", + "accessibility": "public", + "parameters": [ + { + "$id": "1595", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1596", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1597", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.apiVersion", + "readOnly": false + }, + { + "$id": "1598", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1599", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.subscriptionId" + }, + { + "$id": "1600", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1601", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.resourceGroupName" + }, + { + "$id": "1602", + "kind": "path", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1603", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.sqlVirtualMachineName" + }, + { + "$id": "1604", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "181" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.contentType" + }, + { + "$id": "1605", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "183" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.accept" + }, + { + "$id": "1606", + "kind": "body", + "name": "parameters", + "serializedName": "parameters", + "doc": "The SQL virtual machine.", + "type": { + "$ref": "608" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.properties" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "1607", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceUpdate", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1608", + "kind": "http", + "name": "Updates a SQL virtual machine tags.", + "description": "Updates a SQL virtual machine tags.", + "filePath": "2023-10-01/UpdateSqlVirtualMachine.json", + "parameters": [ + { + "parameter": { + "$ref": "1595" + }, + "value": { + "$id": "1609", + "kind": "string", + "type": { + "$ref": "1596" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1606" + }, + "value": { + "$id": "1610", + "kind": "model", + "type": { + "$ref": "608" + }, + "value": { + "tags": { + "$id": "1611", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "1612", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + } + }, + { + "parameter": { + "$ref": "1600" + }, + "value": { + "$id": "1613", + "kind": "string", + "type": { + "$ref": "1601" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1602" + }, + "value": { + "$id": "1614", + "kind": "string", + "type": { + "$ref": "1603" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1598" + }, + "value": { + "$id": "1615", + "kind": "string", + "type": { + "$ref": "1599" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "1607" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1616", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1617", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1618", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1619", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1620", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1621", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1622", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WUMU" + }, + "enableAutomaticUpgrade": { + "$id": "1623", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1624", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1625", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1626", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Updating" + }, + "sqlImageOffer": { + "$id": "1627", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1628", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1629", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1630", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1631", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1632", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1633", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + }, + "tags": { + "$id": "1634", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "1635", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1636", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1637", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1638", + "kind": "method", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1639", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.sqlVirtualMachineName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1640", + "kind": "method", + "name": "parameters", + "serializedName": "parameters", + "doc": "The SQL virtual machine.", + "type": { + "$ref": "608" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.properties", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1641", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "185" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1642", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "187" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "370" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update", + "lroMetadata": { + "finalStateVia": 0, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "370" + } + } + } + }, + { + "$id": "1643", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Deletes a SQL virtual machine.", + "operation": { + "$id": "1644", + "name": "delete", + "resourceName": "SqlVirtualMachine", + "doc": "Deletes a SQL virtual machine.", + "accessibility": "public", + "parameters": [ + { + "$id": "1645", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1646", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1647", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.apiVersion", + "readOnly": false + }, + { + "$id": "1648", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1649", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.subscriptionId" + }, + { + "$id": "1650", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1651", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.resourceGroupName" + }, + { + "$id": "1652", + "kind": "path", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1653", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.sqlVirtualMachineName" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1654", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1655", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceDelete", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1656", + "kind": "http", + "name": "Deletes a SQL virtual machine.", + "description": "Deletes a SQL virtual machine.", + "filePath": "2023-10-01/DeleteSqlVirtualMachine.json", + "parameters": [ + { + "parameter": { + "$ref": "1645" + }, + "value": { + "$id": "1657", + "kind": "string", + "type": { + "$ref": "1646" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1650" + }, + "value": { + "$id": "1658", + "kind": "string", + "type": { + "$ref": "1651" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1652" + }, + "value": { + "$id": "1659", + "kind": "string", + "type": { + "$ref": "1653" + }, + "value": "testvm1" + } + }, + { + "parameter": { + "$ref": "1648" + }, + "value": { + "$id": "1660", + "kind": "string", + "type": { + "$ref": "1649" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + "statusCode": 200 + }, + { + "response": { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$ref": "1654" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1655" + } + } + ], + "isErrorResponse": false + }, + "statusCode": 202 + }, + { + "response": { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + }, + "statusCode": 204 + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1661", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1662", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1663", + "kind": "method", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1664", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.sqlVirtualMachineName", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "1665", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Gets all SQL virtual machines in a resource group.", + "operation": { + "$id": "1666", + "name": "listByResourceGroup", + "resourceName": "SqlVirtualMachine", + "doc": "Gets all SQL virtual machines in a resource group.", + "accessibility": "public", + "parameters": [ + { + "$id": "1667", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1668", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1669", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.apiVersion", + "readOnly": false + }, + { + "$id": "1670", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1671", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.subscriptionId" + }, + { + "$id": "1672", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1673", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.resourceGroupName" + }, + { + "$id": "1674", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "189" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "610" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceList", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1675", + "kind": "http", + "name": "Gets all SQL virtual machines in a resource group.", + "description": "Gets all SQL virtual machines in a resource group.", + "filePath": "2023-10-01/ListByResourceGroupSqlVirtualMachine.json", + "parameters": [ + { + "parameter": { + "$ref": "1667" + }, + "value": { + "$id": "1676", + "kind": "string", + "type": { + "$ref": "1668" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1672" + }, + "value": { + "$id": "1677", + "kind": "string", + "type": { + "$ref": "1673" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1670" + }, + "value": { + "$id": "1678", + "kind": "string", + "type": { + "$ref": "1671" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "610" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1679", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "value": { + "$id": "1680", + "kind": "array", + "type": { + "$ref": "612" + }, + "value": [ + { + "$id": "1681", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1682", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1683", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1684", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1685", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1686", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1687", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1688", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1689", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1690", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1691", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "1692", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1693", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1694", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1695", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1696", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1697", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1698", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + }, + { + "$id": "1699", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1700", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm1" + }, + "type": { + "$id": "1701", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1702", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1" + }, + "location": { + "$id": "1703", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1704", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1705", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1706", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1707", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1708", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1709", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "1710", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1711", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1712", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1713", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1714", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1715", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "None" + } + } + }, + "virtualMachineResourceId": { + "$id": "1716", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm1" + } + } + } + } + }, + { + "$id": "1717", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1718", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm2" + }, + "type": { + "$id": "1719", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1720", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + }, + "location": { + "$id": "1721", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1722", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "enableAutomaticUpgrade": { + "$id": "1723", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1724", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "NotSet" + }, + "osType": { + "$id": "1725", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Linux" + }, + "provisioningState": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "1727", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2019-Ubuntu20" + }, + "sqlImageSku": { + "$id": "1728", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Developer" + }, + "sqlManagement": { + "$id": "1729", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "LightWeight" + }, + "sqlServerLicenseType": { + "$id": "1730", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineResourceId": { + "$id": "1731", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2" + } + } + } + } + } + ] + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1732", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1733", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1734", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "189" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "612" + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + }, + "pageSizeParameterSegments": [] + } + }, + { + "$id": "1735", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Gets all SQL virtual machines in a subscription.", + "operation": { + "$id": "1736", + "name": "list", + "resourceName": "SqlVirtualMachine", + "doc": "Gets all SQL virtual machines in a subscription.", + "accessibility": "public", + "parameters": [ + { + "$id": "1737", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1738", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1739", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list.apiVersion", + "readOnly": false + }, + { + "$id": "1740", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1741", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list.subscriptionId" + }, + { + "$id": "1742", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "191" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "610" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceList", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1743", + "kind": "http", + "name": "Gets all SQL virtual machines in a subscription.", + "description": "Gets all SQL virtual machines in a subscription.", + "filePath": "2023-10-01/ListSubscriptionSqlVirtualMachine.json", + "parameters": [ + { + "parameter": { + "$ref": "1737" + }, + "value": { + "$id": "1744", + "kind": "string", + "type": { + "$ref": "1738" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1740" + }, + "value": { + "$id": "1745", + "kind": "string", + "type": { + "$ref": "1741" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "610" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1746", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "value": { + "$id": "1747", + "kind": "array", + "type": { + "$ref": "612" + }, + "value": [ + { + "$id": "1748", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1749", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm" + }, + "type": { + "$id": "1750", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1751", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "1752", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1753", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1754", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WUMU" + }, + "enableAutomaticUpgrade": { + "$id": "1755", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1756", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1757", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1758", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "1759", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1760", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1761", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1762", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1763", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1764", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1765", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" + } + } + } + } + }, + { + "$id": "1766", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1767", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm1" + }, + "type": { + "$id": "1768", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1769", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1" + }, + "location": { + "$id": "1770", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1771", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1772", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WUMU" + }, + "enableAutomaticUpgrade": { + "$id": "1773", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": false + }, + "leastPrivilegeMode": { + "$id": "1774", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1775", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1776", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "1777", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2019-WS2022" + }, + "sqlImageSku": { + "$id": "1778", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1779", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1780", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "AHUB" + }, + "virtualMachineIdentitySettings": { + "$id": "1781", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1782", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "None" + } + } + }, + "virtualMachineResourceId": { + "$id": "1783", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm1" + } + } + } + } + }, + { + "$id": "1784", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1785", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm2" + }, + "type": { + "$id": "1786", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1787", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + }, + "location": { + "$id": "1788", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1789", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1790", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1791", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": false + }, + "leastPrivilegeMode": { + "$id": "1792", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1793", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1794", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "1795", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2016-WS2016" + }, + "sqlImageSku": { + "$id": "1796", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Developer" + }, + "sqlManagement": { + "$id": "1797", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1798", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineIdentitySettings": { + "$id": "1799", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1800", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1801", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg1/providers/Microsoft.Compute/virtualMachines/testvm2" + } + } + } + } + }, + { + "$id": "1802", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1803", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm2" + }, + "type": { + "$id": "1804", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1805", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg2/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + }, + "location": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1807", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "enableAutomaticUpgrade": { + "$id": "1808", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1809", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "NotSet" + }, + "osType": { + "$id": "1810", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Linux" + }, + "provisioningState": { + "$id": "1811", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "1812", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2019-Ubuntu20" + }, + "sqlImageSku": { + "$id": "1813", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Developer" + }, + "sqlManagement": { + "$id": "1814", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "LightWeight" + }, + "sqlServerLicenseType": { + "$id": "1815", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "virtualMachineResourceId": { + "$id": "1816", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg2/providers/Microsoft.Compute/virtualMachines/testvm2" + } + } + } + } + } + ] + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1817", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "191" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "612" + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + }, + "pageSizeParameterSegments": [] + } + }, + { + "$id": "1818", + "kind": "lro", + "name": "startAssessment", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Starts SQL best practices Assessment on SQL virtual machine.", + "operation": { + "$id": "1819", + "name": "startAssessment", + "resourceName": "SqlVirtualMachines", + "doc": "Starts SQL best practices Assessment on SQL virtual machine.", + "accessibility": "public", + "parameters": [ + { + "$id": "1820", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1821", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1822", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.apiVersion", + "readOnly": false + }, + { + "$id": "1823", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1824", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.subscriptionId" + }, + { + "$id": "1825", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1826", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.resourceGroupName" + }, + { + "$id": "1827", + "kind": "path", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1828", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.sqlVirtualMachineName" + } + ], + "responses": [ + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1829", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1830", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceAction", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1831", + "kind": "http", + "name": "Starts SQL best practices Assessment on SQL virtual machine", + "description": "Starts SQL best practices Assessment on SQL virtual machine", + "filePath": "2023-10-01/StartAssessmentOnSqlVirtualMachine.json", + "parameters": [ + { + "parameter": { + "$ref": "1820" + }, + "value": { + "$id": "1832", + "kind": "string", + "type": { + "$ref": "1821" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1825" + }, + "value": { + "$id": "1833", + "kind": "string", + "type": { + "$ref": "1826" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1827" + }, + "value": { + "$id": "1834", + "kind": "string", + "type": { + "$ref": "1828" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1823" + }, + "value": { + "$id": "1835", + "kind": "string", + "type": { + "$ref": "1824" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$ref": "1829" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1830" + } + } + ], + "isErrorResponse": false + }, + "statusCode": 202 + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1836", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1837", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1838", + "kind": "method", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1839", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.sqlVirtualMachineName", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "1840", + "kind": "lro", + "name": "fetchDCAssessment", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine", + "operation": { + "$id": "1841", + "name": "fetchDCAssessment", + "resourceName": "SqlVirtualMachines", + "doc": "Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine", + "accessibility": "public", + "parameters": [ + { + "$id": "1842", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1843", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1844", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.apiVersion", + "readOnly": false + }, + { + "$id": "1845", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1846", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.subscriptionId" + }, + { + "$id": "1847", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1848", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.resourceGroupName" + }, + { + "$id": "1849", + "kind": "path", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1850", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.sqlVirtualMachineName" + }, + { + "$id": "1851", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "193" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.contentType" + }, + { + "$id": "1852", + "kind": "body", + "name": "parameters", + "serializedName": "parameters", + "doc": "Disk Config Assessment property", + "type": { + "$ref": "616" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.body" + } + ], + "responses": [ + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1853", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1854", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/fetchDCAssessment", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceAction", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1855", + "kind": "http", + "name": "Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine", + "description": "Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine", + "filePath": "2023-10-01/StartDiskConfigAssessmentOnSqlVirtualMachine.json", + "parameters": [ + { + "parameter": { + "$ref": "1842" + }, + "value": { + "$id": "1856", + "kind": "string", + "type": { + "$ref": "1843" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1852" + }, + "value": { + "$id": "1857", + "kind": "model", + "type": { + "$ref": "616" + }, + "value": { + "runDiskConfigRules": { + "$id": "1858", + "kind": "boolean", + "type": { + "$ref": "618" + }, + "value": false + } + } + } + }, + { + "parameter": { + "$ref": "1847" + }, + "value": { + "$id": "1859", + "kind": "string", + "type": { + "$ref": "1848" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1849" + }, + "value": { + "$id": "1860", + "kind": "string", + "type": { + "$ref": "1850" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1845" + }, + "value": { + "$id": "1861", + "kind": "string", + "type": { + "$ref": "1846" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$ref": "1853" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1854" + } + } + ], + "isErrorResponse": false + }, + "statusCode": 202 + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1862", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1863", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1864", + "kind": "method", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1865", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.sqlVirtualMachineName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1866", + "kind": "method", + "name": "parameters", + "serializedName": "parameters", + "doc": "Disk Config Assessment property", + "type": { + "$ref": "616" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.body", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1867", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "195" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "1868", + "kind": "lro", + "name": "redeploy", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Uninstalls and reinstalls the SQL IaaS Extension.", + "operation": { + "$id": "1869", + "name": "redeploy", + "resourceName": "SqlVirtualMachines", + "doc": "Uninstalls and reinstalls the SQL IaaS Extension.", + "accessibility": "public", + "parameters": [ + { + "$id": "1870", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1871", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1872", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.apiVersion", + "readOnly": false + }, + { + "$id": "1873", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1874", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.subscriptionId" + }, + { + "$id": "1875", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1876", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.resourceGroupName" + }, + { + "$id": "1877", + "kind": "path", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1878", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.sqlVirtualMachineName" + } + ], + "responses": [ + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "1879", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1880", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceAction", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1881", + "kind": "http", + "name": "Uninstalls and reinstalls the SQL IaaS Extension.", + "description": "Uninstalls and reinstalls the SQL IaaS Extension.", + "filePath": "2023-10-01/RedeploySqlVirtualMachine.json", + "parameters": [ + { + "parameter": { + "$ref": "1870" + }, + "value": { + "$id": "1882", + "kind": "string", + "type": { + "$ref": "1871" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1875" + }, + "value": { + "$id": "1883", + "kind": "string", + "type": { + "$ref": "1876" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1877" + }, + "value": { + "$id": "1884", + "kind": "string", + "type": { + "$ref": "1878" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1873" + }, + "value": { + "$id": "1885", + "kind": "string", + "type": { + "$ref": "1874" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$ref": "1879" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1880" + } + } + ], + "isErrorResponse": false + }, + "statusCode": 202 + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1886", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1887", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1888", + "kind": "method", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "1889", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.sqlVirtualMachineName", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 200 + ] + } + } + }, + { + "$id": "1890", + "kind": "paging", + "name": "GetSqlVmsBySqlVmGroup", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Gets the list of sql virtual machines in a SQL virtual machine group.", + "operation": { + "$id": "1891", + "name": "GetSqlVmsBySqlVmGroup", + "resourceName": "SqlVirtualMachineGroups", + "doc": "Gets the list of sql virtual machines in a SQL virtual machine group.", + "accessibility": "public", + "parameters": [ + { + "$id": "1892", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1893", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1894", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.apiVersion", + "readOnly": false + }, + { + "$id": "1895", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1896", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.subscriptionId" + }, + { + "$id": "1897", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1898", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.resourceGroupName" + }, + { + "$id": "1899", + "kind": "path", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "1900", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.sqlVirtualMachineGroupName" + }, + { + "$id": "1901", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "197" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "610" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceAction", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1902", + "kind": "http", + "name": "Gets the list of sql virtual machines in a SQL virtual machine group.", + "description": "Gets the list of sql virtual machines in a SQL virtual machine group.", + "filePath": "2023-10-01/ListBySqlVirtualMachineGroupSqlVirtualMachine.json", + "parameters": [ + { + "parameter": { + "$ref": "1892" + }, + "value": { + "$id": "1903", + "kind": "string", + "type": { + "$ref": "1893" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1897" + }, + "value": { + "$id": "1904", + "kind": "string", + "type": { + "$ref": "1898" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1899" + }, + "value": { + "$id": "1905", + "kind": "string", + "type": { + "$ref": "1900" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "1895" + }, + "value": { + "$id": "1906", + "kind": "string", + "type": { + "$ref": "1896" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "610" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1907", + "kind": "model", + "type": { + "$ref": "610" + }, + "value": { + "value": { + "$id": "1908", + "kind": "array", + "type": { + "$ref": "612" + }, + "value": [ + { + "$id": "1909", + "kind": "model", + "type": { + "$ref": "370" + }, + "value": { + "name": { + "$id": "1910", + "kind": "string", + "type": { + "$ref": "588" + }, + "value": "testvm2" + }, + "type": { + "$id": "1911", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" + }, + "id": { + "$id": "1912", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" + }, + "location": { + "$id": "1913", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1914", + "kind": "model", + "type": { + "$ref": "380" + }, + "value": { + "additionalVmPatch": { + "$id": "1915", + "kind": "string", + "type": { + "$ref": "117" + }, + "value": "WU" + }, + "enableAutomaticUpgrade": { + "$id": "1916", + "kind": "boolean", + "type": { + "$ref": "578" + }, + "value": true + }, + "leastPrivilegeMode": { + "$id": "1917", + "kind": "string", + "type": { + "$ref": "43" + }, + "value": "Enabled" + }, + "osType": { + "$id": "1918", + "kind": "string", + "type": { + "$ref": "127" + }, + "value": "Windows" + }, + "provisioningState": { + "$id": "1919", + "kind": "string", + "type": { + "$ref": "385" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "1920", + "kind": "string", + "type": { + "$ref": "387" + }, + "value": "SQL2022-WS2022" + }, + "sqlImageSku": { + "$id": "1921", + "kind": "string", + "type": { + "$ref": "47" + }, + "value": "Enterprise" + }, + "sqlManagement": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "38" + }, + "value": "Full" + }, + "sqlServerLicenseType": { + "$id": "1923", + "kind": "string", + "type": { + "$ref": "33" + }, + "value": "PAYG" + }, + "sqlVirtualMachineGroupResourceId": { + "$id": "1924", + "kind": "string", + "type": { + "$ref": "393" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" + }, + "virtualMachineIdentitySettings": { + "$id": "1925", + "kind": "model", + "type": { + "$ref": "581" + }, + "value": { + "type": { + "$id": "1926", + "kind": "string", + "type": { + "$ref": "122" + }, + "value": "SystemAssigned" + } + } + }, + "virtualMachineResourceId": { + "$id": "1927", + "kind": "string", + "type": { + "$ref": "382" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2" + } + } + } + } + } + ] + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1928", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1929", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1930", + "kind": "method", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "1931", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.sqlVirtualMachineGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1932", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "197" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "612" + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + }, + "pageSizeParameterSegments": [] + } + } + ], + "parameters": [ + { + "$id": "1933", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "1934", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "1935", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.endpoint" + }, + { + "$id": "1936", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1937", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "1938", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1939", + "kind": "method", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1940", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.subscriptionId", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "initializedBy": 0, + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines", + "apiVersions": [ + "2023-10-01" + ], + "parent": { + "$ref": "672" + }, + "isMultiServiceClient": false + }, + { + "$id": "1941", + "kind": "client", + "name": "SqlVirtualMachineGroups", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "methods": [ + { + "$id": "1942", + "kind": "basic", + "name": "get", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Gets a SQL virtual machine group.", + "operation": { + "$id": "1943", + "name": "get", + "resourceName": "SqlVirtualMachineGroup", + "doc": "Gets a SQL virtual machine group.", + "accessibility": "public", + "parameters": [ + { + "$id": "1944", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1945", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1946", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.apiVersion", + "readOnly": false + }, + { + "$id": "1947", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1948", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.subscriptionId" + }, + { + "$id": "1949", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1950", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.resourceGroupName" + }, + { + "$id": "1951", + "kind": "path", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "1952", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.sqlVirtualMachineGroupName" + }, + { + "$id": "1953", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "199" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "619" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceRead", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1954", + "kind": "http", + "name": "Gets a SQL virtual machine group.", + "description": "Gets a SQL virtual machine group.", + "filePath": "2023-10-01/GetSqlVirtualMachineGroup.json", + "parameters": [ + { + "parameter": { + "$ref": "1944" + }, + "value": { + "$id": "1955", + "kind": "string", + "type": { + "$ref": "1945" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1949" + }, + "value": { + "$id": "1956", + "kind": "string", + "type": { + "$ref": "1950" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1951" + }, + "value": { + "$id": "1957", + "kind": "string", + "type": { + "$ref": "1952" + }, + "value": "testvmgroup" + } + }, + { + "parameter": { + "$ref": "1947" + }, + "value": { + "$id": "1958", + "kind": "string", + "type": { + "$ref": "1948" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "619" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "1959", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "name": { + "$id": "1960", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "testvmgroup" + }, + "type": { + "$id": "1961", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" + }, + "id": { + "$id": "1962", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" + }, + "location": { + "$id": "1963", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "1964", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "provisioningState": { + "$id": "1965", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2016-WS2016" + }, + "sqlImageSku": { + "$id": "1967", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "1968", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "clusterBootstrapAccount": { + "$id": "1969", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "testrpadmin" + }, + "clusterOperatorAccount": { + "$id": "1970", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "testrp@testdomain.com" + }, + "domainFqdn": { + "$id": "1971", + "kind": "string", + "type": { + "$ref": "633" + }, + "value": "testdomain.com" + }, + "isSqlServiceAccountGmsa": { + "$id": "1972", + "kind": "boolean", + "type": { + "$ref": "643" + }, + "value": false + }, + "ouPath": { + "$id": "1973", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "OU=WSCluster,DC=testdomain,DC=com" + }, + "sqlServiceAccount": { + "$id": "1974", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "sqlservice@testdomain.com" + }, + "storageAccountUrl": { + "$id": "1975", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "1976", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "1977", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "1978", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1979", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1980", + "kind": "method", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "1981", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.sqlVirtualMachineGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "1982", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "199" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "619" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get" + }, + { + "$id": "1983", + "kind": "lro", + "name": "createOrUpdate", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Creates or updates a SQL virtual machine group.", + "operation": { + "$id": "1984", + "name": "createOrUpdate", + "resourceName": "SqlVirtualMachineGroup", + "doc": "Creates or updates a SQL virtual machine group.", + "accessibility": "public", + "parameters": [ + { + "$id": "1985", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "1986", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "1987", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.apiVersion", + "readOnly": false + }, + { + "$id": "1988", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "1989", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.subscriptionId" + }, + { + "$id": "1990", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "1991", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.resourceGroupName" + }, + { + "$id": "1992", + "kind": "path", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "1993", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.sqlVirtualMachineGroupName" + }, + { + "$id": "1994", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "201" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.contentType" + }, + { + "$id": "1995", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "203" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.accept" + }, + { + "$id": "1996", + "kind": "body", + "name": "parameters", + "serializedName": "parameters", + "doc": "The SQL virtual machine group.", + "type": { + "$ref": "619" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.resource" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "619" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "619" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "1997", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "1998", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", + "arguments": {} + } + ], + "examples": [ + { + "$id": "1999", + "kind": "http", + "name": "Creates or updates a SQL virtual machine group.", + "description": "Creates or updates a SQL virtual machine group.", + "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineGroup.json", + "parameters": [ + { + "parameter": { + "$ref": "1985" + }, + "value": { + "$id": "2000", + "kind": "string", + "type": { + "$ref": "1986" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "1996" + }, + "value": { + "$id": "2001", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "location": { + "$id": "2002", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "2003", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "sqlImageOffer": { + "$id": "2004", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2016-WS2016" + }, + "sqlImageSku": { + "$id": "2005", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "2006", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "clusterBootstrapAccount": { + "$id": "2007", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "testrpadmin" + }, + "clusterOperatorAccount": { + "$id": "2008", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "testrp@testdomain.com" + }, + "clusterSubnetType": { + "$id": "2009", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "MultiSubnet" + }, + "domainFqdn": { + "$id": "2010", + "kind": "string", + "type": { + "$ref": "633" + }, + "value": "testdomain.com" + }, + "isSqlServiceAccountGmsa": { + "$id": "2011", + "kind": "boolean", + "type": { + "$ref": "643" + }, + "value": false + }, + "ouPath": { + "$id": "2012", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "OU=WSCluster,DC=testdomain,DC=com" + }, + "sqlServiceAccount": { + "$id": "2013", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "sqlservice@testdomain.com" + }, + "storageAccountPrimaryKey": { + "$id": "2014", + "kind": "string", + "type": { + "$ref": "649" + }, + "value": "" + }, + "storageAccountUrl": { + "$id": "2015", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "2016", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2017", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + } + }, + { + "parameter": { + "$ref": "1990" + }, + "value": { + "$id": "2018", + "kind": "string", + "type": { + "$ref": "1991" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "1992" + }, + "value": { + "$id": "2019", + "kind": "string", + "type": { + "$ref": "1993" + }, + "value": "testvmgroup" + } + }, + { + "parameter": { + "$ref": "1988" + }, + "value": { + "$id": "2020", + "kind": "string", + "type": { + "$ref": "1989" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "619" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "2021", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "name": { + "$id": "2022", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "testvmgroup" + }, + "type": { + "$id": "2023", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" + }, + "id": { + "$id": "2024", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" + }, + "location": { + "$id": "2025", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "2026", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "provisioningState": { + "$id": "2027", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "UpdatingDomainful" + }, + "sqlImageOffer": { + "$id": "2028", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2016-WS2016" + }, + "sqlImageSku": { + "$id": "2029", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "2030", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "clusterBootstrapAccount": { + "$id": "2031", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "testrpadmin" + }, + "clusterOperatorAccount": { + "$id": "2032", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "testrp@testdomain.com" + }, + "clusterSubnetType": { + "$id": "2033", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "MultiSubnet" + }, + "domainFqdn": { + "$id": "2034", + "kind": "string", + "type": { + "$ref": "633" + }, + "value": "testdomain.com" + }, + "isSqlServiceAccountGmsa": { + "$id": "2035", + "kind": "boolean", + "type": { + "$ref": "643" + }, + "value": false + }, + "ouPath": { + "$id": "2036", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "OU=WSCluster,DC=testdomain,DC=com" + }, + "sqlServiceAccount": { + "$id": "2037", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "sqlservice@testdomain.com" + }, + "storageAccountUrl": { + "$id": "2038", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "2039", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2040", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + } + }, + { + "response": { + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "619" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "1997" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "1998" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 201, + "bodyValue": { + "$id": "2041", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "name": { + "$id": "2042", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "testvmgroup" + }, + "type": { + "$id": "2043", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" + }, + "id": { + "$id": "2044", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" + }, + "location": { + "$id": "2045", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "2046", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "provisioningState": { + "$id": "2047", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "ProvisioningDomainful" + }, + "sqlImageOffer": { + "$id": "2048", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2016-WS2016" + }, + "sqlImageSku": { + "$id": "2049", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "2050", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "clusterBootstrapAccount": { + "$id": "2051", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "testrpadmin" + }, + "clusterOperatorAccount": { + "$id": "2052", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "testrp@testdomain.com" + }, + "clusterSubnetType": { + "$id": "2053", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "MultiSubnet" + }, + "domainFqdn": { + "$id": "2054", + "kind": "string", + "type": { + "$ref": "633" + }, + "value": "testdomain.com" + }, + "isSqlServiceAccountGmsa": { + "$id": "2055", + "kind": "boolean", + "type": { + "$ref": "643" + }, + "value": false + }, + "ouPath": { + "$id": "2056", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "OU=WSCluster,DC=testdomain,DC=com" + }, + "sqlServiceAccount": { + "$id": "2057", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "sqlservice@testdomain.com" + }, + "storageAccountUrl": { + "$id": "2058", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "2059", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2060", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "2061", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2062", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2063", + "kind": "method", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "2064", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.sqlVirtualMachineGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2065", + "kind": "method", + "name": "parameters", + "serializedName": "parameters", + "doc": "The SQL virtual machine group.", + "type": { + "$ref": "619" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.resource", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2066", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "205" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2067", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "207" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "619" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate", + "lroMetadata": { + "finalStateVia": 0, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "619" + } + } + } + }, + { + "$id": "2068", + "kind": "lro", + "name": "update", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Updates SQL virtual machine group tags.", + "operation": { + "$id": "2069", + "name": "update", + "resourceName": "SqlVirtualMachineGroup", + "doc": "Updates SQL virtual machine group tags.", + "accessibility": "public", + "parameters": [ + { + "$id": "2070", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2071", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "2072", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.apiVersion", + "readOnly": false + }, + { + "$id": "2073", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2074", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.subscriptionId" + }, + { + "$id": "2075", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2076", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.resourceGroupName" + }, + { + "$id": "2077", + "kind": "path", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "2078", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.sqlVirtualMachineGroupName" + }, + { + "$id": "2079", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "209" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.contentType" + }, + { + "$id": "2080", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "211" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.accept" + }, + { + "$id": "2081", + "kind": "body", + "name": "parameters", + "serializedName": "parameters", + "doc": "The SQL virtual machine group.", + "type": { + "$ref": "653" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.properties" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "619" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$id": "2082", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PATCH", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceUpdate", + "arguments": {} + } + ], + "examples": [ + { + "$id": "2083", + "kind": "http", + "name": "Updates a SQL virtual machine group tags.", + "description": "Updates a SQL virtual machine group tags.", + "filePath": "2023-10-01/UpdateSqlVirtualMachineGroup.json", + "parameters": [ + { + "parameter": { + "$ref": "2070" + }, + "value": { + "$id": "2084", + "kind": "string", + "type": { + "$ref": "2071" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "2081" + }, + "value": { + "$id": "2085", + "kind": "model", + "type": { + "$ref": "653" + }, + "value": { + "tags": { + "$id": "2086", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2087", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + } + }, + { + "parameter": { + "$ref": "2075" + }, + "value": { + "$id": "2088", + "kind": "string", + "type": { + "$ref": "2076" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "2077" + }, + "value": { + "$id": "2089", + "kind": "string", + "type": { + "$ref": "2078" + }, + "value": "testvmgroup" + } + }, + { + "parameter": { + "$ref": "2073" + }, + "value": { + "$id": "2090", + "kind": "string", + "type": { + "$ref": "2074" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "619" + }, + "headers": [ + { + "name": "azureAsyncOperation", + "nameInResponse": "Azure-AsyncOperation", + "doc": "A link to the status monitor", + "type": { + "$ref": "2082" + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "2091", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "name": { + "$id": "2092", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "testvmgroup" + }, + "type": { + "$id": "2093", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" + }, + "id": { + "$id": "2094", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" + }, + "location": { + "$id": "2095", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "2096", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "provisioningState": { + "$id": "2097", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "UpdatingDomainful" + }, + "sqlImageOffer": { + "$id": "2098", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2017-WS2016" + }, + "sqlImageSku": { + "$id": "2099", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "2100", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "storageAccountUrl": { + "$id": "2101", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "2102", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2103", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "2104", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2106", + "kind": "method", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "2107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.sqlVirtualMachineGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2108", + "kind": "method", + "name": "parameters", + "serializedName": "parameters", + "doc": "The SQL virtual machine group.", + "type": { + "$ref": "653" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.properties", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2109", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "213" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2110", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "215" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "619" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update", + "lroMetadata": { + "finalStateVia": 0, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "619" + } + } + } + }, + { + "$id": "2111", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Deletes a SQL virtual machine group.", + "operation": { + "$id": "2112", + "name": "delete", + "resourceName": "SqlVirtualMachineGroup", + "doc": "Deletes a SQL virtual machine group.", + "accessibility": "public", + "parameters": [ + { + "$id": "2113", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2114", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "2115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.apiVersion", + "readOnly": false + }, + { + "$id": "2116", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.subscriptionId" + }, + { + "$id": "2118", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.resourceGroupName" + }, + { + "$id": "2120", + "kind": "path", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "2121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.sqlVirtualMachineGroupName" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2122", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "2123", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceDelete", + "arguments": {} + } + ], + "examples": [ + { + "$id": "2124", + "kind": "http", + "name": "Deletes a SQL virtual machine group.", + "description": "Deletes a SQL virtual machine group.", + "filePath": "2023-10-01/DeleteSqlVirtualMachineGroup.json", + "parameters": [ + { + "parameter": { + "$ref": "2113" + }, + "value": { + "$id": "2125", + "kind": "string", + "type": { + "$ref": "2114" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "2118" + }, + "value": { + "$id": "2126", + "kind": "string", + "type": { + "$ref": "2119" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "2120" + }, + "value": { + "$id": "2127", + "kind": "string", + "type": { + "$ref": "2121" + }, + "value": "testvmgroup" + } + }, + { + "parameter": { + "$ref": "2116" + }, + "value": { + "$id": "2128", + "kind": "string", + "type": { + "$ref": "2117" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "headers": [], + "isErrorResponse": false + }, + "statusCode": 200 + }, + { + "response": { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$ref": "2122" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "2123" + } + } + ], + "isErrorResponse": false + }, + "statusCode": 202 + }, + { + "response": { + "statusCodes": [ + 204 + ], + "headers": [], + "isErrorResponse": false + }, + "statusCode": 204 + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "2129", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2130", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2131", + "kind": "method", + "name": "sqlVirtualMachineGroupName", + "serializedName": "sqlVirtualMachineGroupName", + "doc": "Name of the SQL virtual machine group.", + "type": { + "$id": "2132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.sqlVirtualMachineGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": {}, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "2133", + "kind": "paging", + "name": "listByResourceGroup", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Gets all SQL virtual machine groups in a resource group.", + "operation": { + "$id": "2134", + "name": "listByResourceGroup", + "resourceName": "SqlVirtualMachineGroup", + "doc": "Gets all SQL virtual machine groups in a resource group.", + "accessibility": "public", + "parameters": [ + { + "$id": "2135", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "2137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.apiVersion", + "readOnly": false + }, + { + "$id": "2138", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.subscriptionId" + }, + { + "$id": "2140", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.resourceGroupName" + }, + { + "$id": "2142", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "217" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "655" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceList", + "arguments": {} + } + ], + "examples": [ + { + "$id": "2143", + "kind": "http", + "name": "Gets all SQL virtual machine groups in a resource group.", + "description": "Gets all SQL virtual machine groups in a resource group.", + "filePath": "2023-10-01/ListByResourceGroupSqlVirtualMachineGroup.json", + "parameters": [ + { + "parameter": { + "$ref": "2135" + }, + "value": { + "$id": "2144", + "kind": "string", + "type": { + "$ref": "2136" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "2140" + }, + "value": { + "$id": "2145", + "kind": "string", + "type": { + "$ref": "2141" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "2138" + }, + "value": { + "$id": "2146", + "kind": "string", + "type": { + "$ref": "2139" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "655" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "2147", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "value": { + "$id": "2148", + "kind": "array", + "type": { + "$ref": "657" + }, + "value": [ + { + "$id": "2149", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "name": { + "$id": "2150", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "testvmgroup" + }, + "type": { + "$id": "2151", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" + }, + "id": { + "$id": "2152", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" + }, + "location": { + "$id": "2153", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "2154", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "provisioningState": { + "$id": "2155", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "2156", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2017-WS2016" + }, + "sqlImageSku": { + "$id": "2157", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "2158", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "clusterBootstrapAccount": { + "$id": "2159", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "testrpadmin" + }, + "clusterOperatorAccount": { + "$id": "2160", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "testrp@testdomain.com" + }, + "domainFqdn": { + "$id": "2161", + "kind": "string", + "type": { + "$ref": "633" + }, + "value": "testdomain.com" + }, + "isSqlServiceAccountGmsa": { + "$id": "2162", + "kind": "boolean", + "type": { + "$ref": "643" + }, + "value": false + }, + "ouPath": { + "$id": "2163", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "OU=WSCluster,DC=testdomain,DC=com" + }, + "sqlServiceAccount": { + "$id": "2164", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "sqlservice@testdomain.com" + }, + "storageAccountUrl": { + "$id": "2165", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "2166", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2167", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + }, + { + "$id": "2168", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "name": { + "$id": "2169", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "testvmgroup1" + }, + "type": { + "$id": "2170", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" + }, + "id": { + "$id": "2171", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup1" + }, + "location": { + "$id": "2172", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "2173", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "provisioningState": { + "$id": "2174", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "2175", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2016-WS2016" + }, + "sqlImageSku": { + "$id": "2176", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "2177", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "clusterBootstrapAccount": { + "$id": "2178", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "testrpadmin" + }, + "clusterOperatorAccount": { + "$id": "2179", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "testrp@testdomain.com" + }, + "domainFqdn": { + "$id": "2180", + "kind": "string", + "type": { + "$ref": "633" + }, + "value": "testdomain.com" + }, + "isSqlServiceAccountGmsa": { + "$id": "2181", + "kind": "boolean", + "type": { + "$ref": "643" + }, + "value": false + }, + "ouPath": { + "$id": "2182", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "OU=WSCluster,DC=testdomain,DC=com" + }, + "sqlServiceAccount": { + "$id": "2183", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "sqlservice@testdomain.com" + }, + "storageAccountUrl": { + "$id": "2184", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "2185", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2186", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + }, + { + "$id": "2187", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "name": { + "$id": "2188", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "testvmgroup2" + }, + "type": { + "$id": "2189", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" + }, + "id": { + "$id": "2190", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup2" + }, + "location": { + "$id": "2191", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "2192", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "provisioningState": { + "$id": "2193", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "2194", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2016-WS2016" + }, + "sqlImageSku": { + "$id": "2195", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "2196", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "clusterBootstrapAccount": { + "$id": "2197", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "testrpadmin" + }, + "clusterOperatorAccount": { + "$id": "2198", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "testrp@testdomain.com" + }, + "domainFqdn": { + "$id": "2199", + "kind": "string", + "type": { + "$ref": "633" + }, + "value": "testdomain.com" + }, + "isSqlServiceAccountGmsa": { + "$id": "2200", + "kind": "boolean", + "type": { + "$ref": "643" + }, + "value": false + }, + "ouPath": { + "$id": "2201", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "OU=WSCluster,DC=testdomain,DC=com" + }, + "sqlServiceAccount": { + "$id": "2202", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "sqlservice@testdomain.com" + }, + "storageAccountUrl": { + "$id": "2203", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "2204", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2205", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + } + ] + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "2206", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2207", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2208", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "217" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "657" + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + }, + "pageSizeParameterSegments": [] + } + }, + { + "$id": "2209", + "kind": "paging", + "name": "list", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Gets all SQL virtual machine groups in a subscription.", + "operation": { + "$id": "2210", + "name": "list", + "resourceName": "SqlVirtualMachineGroup", + "doc": "Gets all SQL virtual machine groups in a subscription.", + "accessibility": "public", + "parameters": [ + { + "$id": "2211", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2212", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "2213", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list.apiVersion", + "readOnly": false + }, + { + "$id": "2214", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2215", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list.subscriptionId" + }, + { + "$id": "2216", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "219" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list.accept" + } + ], + "responses": [ + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "655" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "GET", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceList", + "arguments": {} + } + ], + "examples": [ + { + "$id": "2217", + "kind": "http", + "name": "Gets all SQL virtual machine groups in a subscription.", + "description": "Gets all SQL virtual machine groups in a subscription.", + "filePath": "2023-10-01/ListSubscriptionSqlVirtualMachineGroup.json", + "parameters": [ + { + "parameter": { + "$ref": "2211" + }, + "value": { + "$id": "2218", + "kind": "string", + "type": { + "$ref": "2212" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "2214" + }, + "value": { + "$id": "2219", + "kind": "string", + "type": { + "$ref": "2215" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "655" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "2220", + "kind": "model", + "type": { + "$ref": "655" + }, + "value": { + "value": { + "$id": "2221", + "kind": "array", + "type": { + "$ref": "657" + }, + "value": [ + { + "$id": "2222", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "name": { + "$id": "2223", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "testvmgroup" + }, + "type": { + "$id": "2224", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" + }, + "id": { + "$id": "2225", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/" + }, + "location": { + "$id": "2226", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "2227", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "provisioningState": { + "$id": "2228", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "2229", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2017-WS2016" + }, + "sqlImageSku": { + "$id": "2230", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "2231", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "clusterBootstrapAccount": { + "$id": "2232", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "testrpadmin" + }, + "clusterOperatorAccount": { + "$id": "2233", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "testrp@testdomain.com" + }, + "clusterSubnetType": { + "$id": "2234", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "MultiSubnet" + }, + "domainFqdn": { + "$id": "2235", + "kind": "string", + "type": { + "$ref": "633" + }, + "value": "testdomain.com" + }, + "isSqlServiceAccountGmsa": { + "$id": "2236", + "kind": "boolean", + "type": { + "$ref": "643" + }, + "value": false + }, + "ouPath": { + "$id": "2237", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "OU=WSCluster,DC=testdomain,DC=com" + }, + "sqlServiceAccount": { + "$id": "2238", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "sqlservice@testdomain.com" + }, + "storageAccountUrl": { + "$id": "2239", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "2240", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2241", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + }, + { + "$id": "2242", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "name": { + "$id": "2243", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "testvmgroup1" + }, + "type": { + "$id": "2244", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" + }, + "id": { + "$id": "2245", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/" + }, + "location": { + "$id": "2246", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "2247", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "provisioningState": { + "$id": "2248", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "2249", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2016-WS2016" + }, + "sqlImageSku": { + "$id": "2250", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "2251", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "clusterBootstrapAccount": { + "$id": "2252", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "testrpadmin" + }, + "clusterOperatorAccount": { + "$id": "2253", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "testrp@testdomain.com" + }, + "clusterSubnetType": { + "$id": "2254", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "MultiSubnet" + }, + "domainFqdn": { + "$id": "2255", + "kind": "string", + "type": { + "$ref": "633" + }, + "value": "testdomain.com" + }, + "isSqlServiceAccountGmsa": { + "$id": "2256", + "kind": "boolean", + "type": { + "$ref": "643" + }, + "value": false + }, + "ouPath": { + "$id": "2257", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "OU=WSCluster,DC=testdomain,DC=com" + }, + "sqlServiceAccount": { + "$id": "2258", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "sqlservice@testdomain.com" + }, + "storageAccountUrl": { + "$id": "2259", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "2260", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2261", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + }, + { + "$id": "2262", + "kind": "model", + "type": { + "$ref": "619" + }, + "value": { + "name": { + "$id": "2263", + "kind": "string", + "type": { + "$ref": "652" + }, + "value": "testvmgroup2" + }, + "type": { + "$id": "2264", + "kind": "string", + "type": { + "$ref": "280" + }, + "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" + }, + "id": { + "$id": "2265", + "kind": "string", + "type": { + "$ref": "275" + }, + "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg2/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/" + }, + "location": { + "$id": "2266", + "kind": "string", + "type": { + "$ref": "377" + }, + "value": "northeurope" + }, + "properties": { + "$id": "2267", + "kind": "model", + "type": { + "$ref": "621" + }, + "value": { + "provisioningState": { + "$id": "2268", + "kind": "string", + "type": { + "$ref": "623" + }, + "value": "Succeeded" + }, + "sqlImageOffer": { + "$id": "2269", + "kind": "string", + "type": { + "$ref": "625" + }, + "value": "SQL2016-WS2016" + }, + "sqlImageSku": { + "$id": "2270", + "kind": "string", + "type": { + "$ref": "137" + }, + "value": "Enterprise" + }, + "wsfcDomainProfile": { + "$id": "2271", + "kind": "model", + "type": { + "$ref": "631" + }, + "value": { + "clusterBootstrapAccount": { + "$id": "2272", + "kind": "string", + "type": { + "$ref": "637" + }, + "value": "testrpadmin" + }, + "clusterOperatorAccount": { + "$id": "2273", + "kind": "string", + "type": { + "$ref": "639" + }, + "value": "testrp@testdomain.com" + }, + "clusterSubnetType": { + "$id": "2274", + "kind": "string", + "type": { + "$ref": "150" + }, + "value": "MultiSubnet" + }, + "domainFqdn": { + "$id": "2275", + "kind": "string", + "type": { + "$ref": "633" + }, + "value": "testdomain.com" + }, + "isSqlServiceAccountGmsa": { + "$id": "2276", + "kind": "boolean", + "type": { + "$ref": "643" + }, + "value": false + }, + "ouPath": { + "$id": "2277", + "kind": "string", + "type": { + "$ref": "635" + }, + "value": "OU=WSCluster,DC=testdomain,DC=com" + }, + "sqlServiceAccount": { + "$id": "2278", + "kind": "string", + "type": { + "$ref": "641" + }, + "value": "sqlservice@testdomain.com" + }, + "storageAccountUrl": { + "$id": "2279", + "kind": "string", + "type": { + "$ref": "647" + }, + "value": "https://storgact.blob.core.windows.net/" + } + } + } + } + }, + "tags": { + "$id": "2280", + "kind": "dict", + "type": { + "$ref": "373" + }, + "value": { + "mytag": { + "$id": "2281", + "kind": "string", + "type": { + "$ref": "375" + }, + "value": "myval" + } + } + } + } + } + ] + } + } + } + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "2282", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "219" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "657" + }, + "resultSegments": [ + "value" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list", + "pagingMetadata": { + "itemPropertySegments": [ + "value" + ], + "nextLink": { + "responseSegments": [ + "nextLink" + ], + "responseLocation": "Body" + }, + "pageSizeParameterSegments": [] + } + } + ], + "parameters": [ + { + "$id": "2283", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "2284", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "2285", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.endpoint" + }, + { + "$id": "2286", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2287", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "2288", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2289", + "kind": "method", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2290", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.subscriptionId", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "initializedBy": 0, + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceOperations", + "arguments": {} + } + ], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups", + "apiVersions": [ + "2023-10-01" + ], + "parent": { + "$ref": "672" + }, + "isMultiServiceClient": false + }, + { + "$id": "2291", + "kind": "client", + "name": "SqlVirtualMachineTroubleshoot", + "namespace": "Azure.ResourceManager.SqlVirtualMachine", + "methods": [ + { + "$id": "2292", + "kind": "lro", + "name": "troubleshoot", + "accessibility": "public", + "apiVersions": [ + "2023-10-01" + ], + "doc": "Starts SQL virtual machine troubleshooting.", + "operation": { + "$id": "2293", + "name": "troubleshoot", + "resourceName": "SqlVirtualMachines", + "doc": "Starts SQL virtual machine troubleshooting.", + "accessibility": "public", + "parameters": [ + { + "$id": "2294", + "kind": "query", + "name": "apiVersion", + "serializedName": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2295", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": true, + "explode": false, + "defaultValue": { + "type": { + "$id": "2296", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Client", + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.apiVersion", + "readOnly": false + }, + { + "$id": "2297", + "kind": "path", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2298", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Client", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.subscriptionId" + }, + { + "$id": "2299", + "kind": "path", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.resourceGroupName" + }, + { + "$id": "2301", + "kind": "path", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "2302", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "isApiVersion": false, + "explode": false, + "style": "simple", + "allowReserved": false, + "skipUrlEncoding": false, + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.sqlVirtualMachineName" + }, + { + "$id": "2303", + "kind": "header", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "221" + }, + "isApiVersion": false, + "optional": false, + "isContentType": true, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.contentType" + }, + { + "$id": "2304", + "kind": "header", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "223" + }, + "isApiVersion": false, + "optional": false, + "isContentType": false, + "scope": "Constant", + "readOnly": false, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.accept" + }, + { + "$id": "2305", + "kind": "body", + "name": "parameters", + "serializedName": "parameters", + "doc": "The SQL virtual machine troubleshooting entity.", + "type": { + "$ref": "661" + }, + "isApiVersion": false, + "contentTypes": [ + "application/json" + ], + "defaultContentType": "application/json", + "optional": false, + "scope": "Method", + "decorators": [], + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.body" + } + ], + "responses": [ + { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$id": "2306", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$id": "2307", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + } + } + ], + "isErrorResponse": false + }, + { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "661" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/troubleshoot", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot", + "decorators": [ + { + "name": "Azure.ResourceManager.@armResourceAction", + "arguments": {} + } + ], + "examples": [ + { + "$id": "2308", + "kind": "http", + "name": "Start SQL virtual machine troubleshooting operation", + "description": "Start SQL virtual machine troubleshooting operation", + "filePath": "2023-10-01/TroubleshootSqlVirtualMachine.json", + "parameters": [ + { + "parameter": { + "$ref": "2294" + }, + "value": { + "$id": "2309", + "kind": "string", + "type": { + "$ref": "2295" + }, + "value": "2023-10-01" + } + }, + { + "parameter": { + "$ref": "2305" + }, + "value": { + "$id": "2310", + "kind": "model", + "type": { + "$ref": "661" + }, + "value": { + "endTimeUtc": { + "$id": "2311", + "kind": "string", + "type": { + "$ref": "666" + }, + "value": "2023-07-09T22:10:00Z" + }, + "properties": { + "$id": "2312", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "unhealthyReplicaInfo": { + "$id": "2313", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "availabilityGroupName": { + "$id": "2314", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "AG1" + } + } + } + } + }, + "startTimeUtc": { + "$id": "2315", + "kind": "string", + "type": { + "$ref": "663" + }, + "value": "2023-07-09T17:10:00Z" + }, + "troubleshootingScenario": { + "$id": "2316", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "UnhealthyReplica" + } + } + } + }, + { + "parameter": { + "$ref": "2299" + }, + "value": { + "$id": "2317", + "kind": "string", + "type": { + "$ref": "2300" + }, + "value": "testrg" + } + }, + { + "parameter": { + "$ref": "2301" + }, + "value": { + "$id": "2318", + "kind": "string", + "type": { + "$ref": "2302" + }, + "value": "testvm" + } + }, + { + "parameter": { + "$ref": "2297" + }, + "value": { + "$id": "2319", + "kind": "string", + "type": { + "$ref": "2298" + }, + "value": "00000000-1111-2222-3333-444444444444" + } + } + ], + "responses": [ + { + "response": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "661" + }, + "headers": [], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + "statusCode": 200, + "bodyValue": { + "$id": "2320", + "kind": "model", + "type": { + "$ref": "661" + }, + "value": { + "endTimeUtc": { + "$id": "2321", + "kind": "string", + "type": { + "$ref": "666" + }, + "value": "2023-07-09T22:10:00Z" + }, + "properties": { + "$id": "2322", + "kind": "model", + "type": { + "$ref": "555" + }, + "value": { + "unhealthyReplicaInfo": { + "$id": "2323", + "kind": "model", + "type": { + "$ref": "557" + }, + "value": { + "availabilityGroupName": { + "$id": "2324", + "kind": "string", + "type": { + "$ref": "559" + }, + "value": "AG1" + } + } + } + } + }, + "startTimeUtc": { + "$id": "2325", + "kind": "string", + "type": { + "$ref": "663" + }, + "value": "2023-07-09T17:10:00Z" + }, + "troubleshootingScenario": { + "$id": "2326", + "kind": "string", + "type": { + "$ref": "105" + }, + "value": "UnhealthyReplica" + } + } + } + }, + { + "response": { + "statusCodes": [ + 202 + ], + "headers": [ + { + "name": "location", + "nameInResponse": "Location", + "doc": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": { + "$ref": "2306" + } + }, + { + "name": "retryAfter", + "nameInResponse": "Retry-After", + "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": { + "$ref": "2307" + } + } + ], + "isErrorResponse": false + }, + "statusCode": 202 + } + ] + } + ], + "namespace": "Azure.ResourceManager.SqlVirtualMachine" + }, + "parameters": [ + { + "$id": "2327", + "kind": "method", + "name": "resourceGroupName", + "serializedName": "resourceGroupName", + "doc": "The name of the resource group. The name is case insensitive.", + "type": { + "$id": "2328", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.resourceGroupName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2329", + "kind": "method", + "name": "sqlVirtualMachineName", + "serializedName": "sqlVirtualMachineName", + "doc": "Name of the SQL virtual machine.", + "type": { + "$id": "2330", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.sqlVirtualMachineName", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2331", + "kind": "method", + "name": "parameters", + "serializedName": "parameters", + "doc": "The SQL virtual machine troubleshooting entity.", + "type": { + "$ref": "661" + }, + "location": "Body", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.body", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2332", + "kind": "method", + "name": "contentType", + "serializedName": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "225" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.contentType", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2333", + "kind": "method", + "name": "accept", + "serializedName": "Accept", + "type": { + "$ref": "227" + }, + "location": "Header", + "isApiVersion": false, + "optional": false, + "scope": "Constant", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.accept", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "response": { + "type": { + "$ref": "661" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot", + "lroMetadata": { + "finalStateVia": 1, + "finalResponse": { + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "661" + } + } + } + } + ], + "parameters": [ + { + "$id": "2334", + "kind": "endpoint", + "name": "endpoint", + "serializedName": "endpoint", + "doc": "Service host", + "type": { + "$id": "2335", + "kind": "url", + "name": "endpoint", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "isApiVersion": false, + "optional": false, + "scope": "Client", + "isEndpoint": true, + "defaultValue": { + "type": { + "$id": "2336", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "https://management.azure.com" + }, + "serverUrlTemplate": "{endpoint}", + "skipUrlEncoding": false, + "readOnly": false, + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.endpoint" + }, + { + "$id": "2337", + "kind": "method", + "name": "apiVersion", + "serializedName": "apiVersion", + "doc": "The API version to use for this operation.", + "type": { + "$id": "2338", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": true, + "defaultValue": { + "type": { + "$id": "2339", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2023-10-01" + }, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.apiVersion", + "readOnly": false, + "access": "public", + "decorators": [] + }, + { + "$id": "2340", + "kind": "method", + "name": "subscriptionId", + "serializedName": "subscriptionId", + "doc": "The ID of the target subscription. The value must be an UUID.", + "type": { + "$id": "2341", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "", + "isApiVersion": false, + "optional": false, + "scope": "Method", + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.subscriptionId", + "readOnly": false, + "access": "public", + "decorators": [] + } + ], + "initializedBy": 0, + "decorators": [], + "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine", + "apiVersions": [ + "2023-10-01" + ], + "parent": { + "$ref": "672" + }, + "isMultiServiceClient": false + } + ], + "isMultiServiceClient": false + } + ], + "auth": { + "oAuth2": { + "flows": [ + { + "scopes": [ + "user_impersonation" + ], + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize" + } + ] + } + } +} From f21765ec791c2ea0fe7ed94f63f8cc674eb7ae59 Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Thu, 29 Jan 2026 16:49:59 +0800 Subject: [PATCH 2/7] rename and regen --- .../Configuration.json | 12 - ...sourceManager.SqlVirtualMachine.net10.0.cs | 357 +- ...esourceManager.SqlVirtualMachine.net8.0.cs | 357 +- ...anager.SqlVirtualMachine.netstandard2.0.cs | 357 +- .../ArmSqlVirtualMachineModelFactory.cs | 49 +- ...enersGetByGroupAsyncCollectionResultOfT.cs | 10 +- ...pListenersGetByGroupCollectionResultOfT.cs | 10 +- ...VmsBySqlVmGroupAsyncCollectionResultOfT.cs | 10 +- ...etSqlVmsBySqlVmGroupCollectionResultOfT.cs | 10 +- ...eSqlVirtualMachineResourceGroupResource.cs | 48 +- .../Extensions/SqlVirtualMachineExtensions.cs | 24 +- ...ResourceManagerSqlVirtualMachineContext.cs | 6 +- .../Generated/Models/Info.Serialization.cs | 8 +- .../src/Generated/Models/Info.cs | 6 +- ...lVirtualMachineProperties.Serialization.cs | 16 +- .../Models/SqlVirtualMachineProperties.cs | 10 +- ...alOsPatch.cs => SqlVmAdditionalOsPatch.cs} | 32 +- ...alVmPatch.cs => SqlVmAdditionalVmPatch.cs} | 30 +- ...SqlVmAutoPatchingSettings.Serialization.cs | 4 +- .../Models/SqlVmAutoPatchingSettings.cs | 4 +- ...tion.cs => SqlVmIdentity.Serialization.cs} | 44 +- ...ualMachineIdentity.cs => SqlVmIdentity.cs} | 12 +- ...=> SqlVmOperationDisplay.Serialization.cs} | 40 +- ...ionDisplay.cs => SqlVmOperationDisplay.cs} | 10 +- ...ationOrigin.cs => SqlVmOperationOrigin.cs} | 30 +- ...zation.cs => SqlVmOsType.Serialization.cs} | 18 +- .../Models/{OsType.cs => SqlVmOsType.cs} | 2 +- .../SqlVmTroubleshooting.Serialization.cs | 4 +- .../Generated/Models/SqlVmTroubleshooting.cs | 4 +- .../Models/SqlVmTroubleshootingScenario.cs | 65 + ...lVmTroubleshootingStatus.Serialization.cs} | 44 +- ...tatus.cs => SqlVmTroubleshootingStatus.cs} | 12 +- ...IdentityType.cs => SqlVmVmIdentityType.cs} | 32 +- .../Models/TroubleshootingScenario.cs | 65 - ...vailabilityGroupListenersRestOperations.cs | 18 +- .../SqlVirtualMachineGroupsRestOperations.cs | 16 +- ...irtualMachineTroubleshootRestOperations.cs | 4 +- .../SqlVirtualMachinesRestOperations.cs | 34 +- .../src/Generated/SqlVmCollection.cs | 96 +- .../src/Generated/SqlVmData.Serialization.cs | 2 + .../src/Generated/SqlVmData.cs | 15 +- .../src/Generated/SqlVmGroupCollection.cs | 96 +- .../Generated/SqlVmGroupData.Serialization.cs | 4 +- .../src/Generated/SqlVmGroupData.cs | 7 +- .../src/Generated/SqlVmGroupResource.cs | 20 +- .../src/Generated/SqlVmResource.cs | 20 +- .../tsp-location.yaml | 2 +- .../tspCodeModel.json | 27279 ---------------- 48 files changed, 1572 insertions(+), 27783 deletions(-) delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/Configuration.json rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{AdditionalOsPatch.cs => SqlVmAdditionalOsPatch.cs} (51%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{AdditionalVmPatch.cs => SqlVmAdditionalVmPatch.cs} (51%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{VirtualMachineIdentity.Serialization.cs => SqlVmIdentity.Serialization.cs} (69%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{VirtualMachineIdentity.cs => SqlVmIdentity.cs} (74%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{OperationDisplay.Serialization.cs => SqlVmOperationDisplay.Serialization.cs} (73%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{OperationDisplay.cs => SqlVmOperationDisplay.cs} (83%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{OperationOrigin.cs => SqlVmOperationOrigin.cs} (51%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{OsType.Serialization.cs => SqlVmOsType.Serialization.cs} (61%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{OsType.cs => SqlVmOsType.cs} (93%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshootingScenario.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{TroubleshootingStatus.Serialization.cs => SqlVmTroubleshootingStatus.Serialization.cs} (76%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{TroubleshootingStatus.cs => SqlVmTroubleshootingStatus.cs} (77%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{VmIdentityType.cs => SqlVmVmIdentityType.cs} (52%) delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingScenario.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tspCodeModel.json diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/Configuration.json b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/Configuration.json deleted file mode 100644 index 9a3f6f90d72a..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/Configuration.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "package-name": "Azure.ResourceManager.SqlVirtualMachine", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "model-namespace": true, - "license": { - "name": "MIT License", - "company": "Microsoft Corporation", - "link": "https://mit-license.org", - "header": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.", - "description": "Copyright (c) Microsoft Corporation\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE." - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs index 0d526c9271fb..9ccb90795ca3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs @@ -27,7 +27,10 @@ public AvailabilityGroupListenerData() { } public System.Collections.Generic.IList MultiSubnetIPConfigurations { get { throw null; } } public int? Port { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -40,7 +43,7 @@ public partial class AvailabilityGroupListenerResource : Azure.ResourceManager.A protected AvailabilityGroupListenerResource() { } public virtual Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -61,6 +64,8 @@ internal AzureResourceManagerSqlVirtualMachineContext() { } } public static partial class SqlVirtualMachineExtensions { + public static Azure.Pageable GetAll(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAllAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSqlVm(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSqlVmAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -95,11 +100,15 @@ protected SqlVmCollection() { } public partial class SqlVmData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? AdditionalVmPatch { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings AssessmentSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings AutoBackupSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings AutoPatchingSettings { get { throw null; } set { } } + public bool? EnableAutomaticUpgrade { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings KeyVaultCredentialSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? OsType { get { throw null; } } public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get { throw null; } set { } } public string SqlImageOffer { get { throw null; } set { } } @@ -107,11 +116,17 @@ public SqlVmData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? SqlManagement { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? SqlServerLicenseType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SqlVmGroupResourceId { get { throw null; } set { } } + public string SqlVmName { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings StorageConfigurationSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus TroubleshootingStatus { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity VirtualMachineIdentitySettings { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineResourceId { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials WindowsServerFailoverClusterDomainCredentials { get { throw null; } set { } } public System.Net.IPAddress WindowsServerFailoverClusterStaticIP { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.SqlVmData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.SqlVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -144,8 +159,12 @@ public SqlVmGroupData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? ScaleType { get { throw null; } } public string SqlImageOffer { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? SqlImageSku { get { throw null; } set { } } + public string SqlVmGroupName { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile WindowsServerFailoverClusterDomainProfile { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -160,7 +179,7 @@ protected SqlVmGroupResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmGroupName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -190,9 +209,11 @@ protected SqlVmResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation FetchDCAssessment(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent sqlVmDiskConfigAssessmentContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FetchDCAssessmentAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent sqlVmDiskConfigAssessmentContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Redeploy(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -208,6 +229,8 @@ protected SqlVmResource() { } Azure.ResourceManager.SqlVirtualMachine.SqlVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Troubleshoot(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting sqlVmTroubleshooting, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TroubleshootAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting sqlVmTroubleshooting, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -239,14 +262,32 @@ protected MockableSqlVirtualMachineSubscriptionResource() { } public virtual Azure.Pageable GetSqlVms(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSqlVmsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MockableSqlVirtualMachineTenantResource : Azure.ResourceManager.ArmResource + { + protected MockableSqlVirtualMachineTenantResource() { } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.SqlVirtualMachine.Models { public static partial class ArmSqlVirtualMachineModelFactory { public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData AvailabilityGroupListenerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, string availabilityGroupName = null, System.Collections.Generic.IEnumerable loadBalancerConfigurations = null, System.Collections.Generic.IEnumerable multiSubnetIPConfigurations = null, bool? createDefaultAvailabilityGroupIfNotExist = default(bool?), int? port = default(int?), System.Collections.Generic.IEnumerable availabilityGroupReplicas = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration AvailabilityGroupListenerLoadBalancerConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress = null, Azure.Core.ResourceIdentifier publicIPAddressResourceId = null, Azure.Core.ResourceIdentifier loadBalancerResourceId = null, int? probePort = default(int?), System.Collections.Generic.IEnumerable sqlVmInstances = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Info Info(string name = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay display = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? origin = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlStorageSettings(System.Collections.Generic.IEnumerable luns = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default(int?), int? dataGrowth = default(int?), int? logFileSize = default(int?), int? logGrowth = default(int?), int? dataFileCount = default(int?), bool? persistFolder = default(bool?), string persistFolderPath = null, System.Collections.Generic.IEnumerable logicalUnitNumbers = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings SqlVmAutoBackupSettings(bool? isEnabled = default(bool?), bool? isEncryptionEnabled = default(bool?), int? retentionPeriodInDays = default(int?), System.Uri storageAccountUri = null, string storageContainerName = null, string storageAccessKey = null, string password = null, bool? areSystemDbsIncludedInBackup = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? backupScheduleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? fullBackupFrequency = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency?), System.Collections.Generic.IEnumerable daysOfWeek = null, int? fullBackupStartHour = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? leastPrivilegeMode = default(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType?), string sqlVmName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.Core.ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku, Azure.Core.ResourceIdentifier sqlVmGroupResourceId, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, System.Net.IPAddress windowsServerFailoverClusterStaticIP, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null, string sqlVmGroupName = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch SqlVmGroupPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay SqlVmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch SqlVmPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting SqlVmTroubleshooting(System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null, string virtualMachineResourceId = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus SqlVmTroubleshootingStatus(string rootCause = null, System.DateTimeOffset? lastTriggerTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null) { throw null; } } public partial class AvailabilityGroupListenerLoadBalancerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -256,7 +297,10 @@ public AvailabilityGroupListenerLoadBalancerConfiguration() { } public int? ProbePort { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPAddressResourceId { get { throw null; } set { } } public System.Collections.Generic.IList SqlVmInstances { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -268,7 +312,10 @@ public partial class AvailabilityGroupListenerPrivateIPAddress : System.ClientMo public AvailabilityGroupListenerPrivateIPAddress() { } public System.Net.IPAddress IPAddress { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetResourceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -283,7 +330,10 @@ public AvailabilityGroupReplica() { } public Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode? ReadableSecondary { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole? Role { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SqlVmInstanceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -303,6 +353,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode right) { throw null; } public override string ToString() { throw null; } } @@ -319,6 +370,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode right) { throw null; } public override string ToString() { throw null; } } @@ -335,21 +387,72 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public override string ToString() { throw null; } } + public partial class Info : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal Info() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay Display { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? Origin { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LeastPrivilegeMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LeastPrivilegeMode(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode Enabled { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class MultiSubnetIPConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MultiSubnetIPConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress, string sqlVmInstance) { } public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress PrivateIPAddress { get { throw null; } set { } } public string SqlVmInstance { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class OperationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OperationProperty() { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ReadableSecondaryMode : System.IEquatable { @@ -364,6 +467,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode right) { throw null; } public override string ToString() { throw null; } } @@ -374,7 +478,10 @@ public SqlConnectivityUpdateSettings() { } public int? Port { get { throw null; } set { } } public string SqlAuthUpdatePassword { get { throw null; } set { } } public string SqlAuthUpdateUserName { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -397,6 +504,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku right) { throw null; } public override string ToString() { throw null; } } @@ -410,7 +518,10 @@ public SqlInstanceSettings() { } public int? MaxDop { get { throw null; } set { } } public int? MaxServerMemoryInMB { get { throw null; } set { } } public int? MinServerMemoryInMB { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -431,18 +542,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode right) { throw null; } public override string ToString() { throw null; } } public partial class SqlServerConfigurationsManagementSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlServerConfigurationsManagementSettings() { } + public string AzureAdAuthenticationClientId { get { throw null; } set { } } public bool? IsRServicesEnabled { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings SqlConnectivityUpdateSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings SqlInstanceSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings SqlStorageUpdateSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType? SqlWorkloadType { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -463,6 +579,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType right) { throw null; } public override string ToString() { throw null; } } @@ -480,6 +597,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType right) { throw null; } public override string ToString() { throw null; } } @@ -488,7 +606,11 @@ public partial class SqlStorageSettings : System.ClientModel.Primitives.IJsonMod public SqlStorageSettings() { } public string DefaultFilePath { get { throw null; } set { } } public System.Collections.Generic.IList Luns { get { throw null; } } + public bool? UseStoragePool { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -501,7 +623,10 @@ public SqlStorageUpdateSettings() { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? DiskConfigurationType { get { throw null; } set { } } public int? DiskCount { get { throw null; } set { } } public int? StartingDeviceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -520,13 +645,52 @@ public SqlTempDBSettings() { } public System.Collections.Generic.IList LogicalUnitNumbers { get { throw null; } } public bool? PersistFolder { get { throw null; } set { } } public string PersistFolderPath { get { throw null; } set { } } + public bool? UseStoragePool { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmAdditionalOsPatch : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmAdditionalOsPatch(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch WSUS { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch WU { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch WUMU { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmAdditionalVmPatch : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmAdditionalVmPatch(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch MicrosoftUpdate { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch right) { throw null; } + public override string ToString() { throw null; } + } public enum SqlVmAssessmentDayOfWeek { Monday = 0, @@ -545,7 +709,10 @@ public SqlVmAssessmentSchedule() { } public int? MonthlyOccurrence { get { throw null; } set { } } public string StartTime { get { throw null; } set { } } public int? WeeklyInterval { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -558,7 +725,10 @@ public SqlVmAssessmentSettings() { } public bool? IsEnabled { get { throw null; } set { } } public bool? RunImmediately { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule Schedule { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -583,6 +753,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek right) { throw null; } public override string ToString() { throw null; } } @@ -603,7 +774,10 @@ public SqlVmAutoBackupSettings() { } public string StorageAccessKey { get { throw null; } set { } } public System.Uri StorageAccountUri { get { throw null; } set { } } public string StorageContainerName { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -624,11 +798,15 @@ public enum SqlVmAutoPatchingDayOfWeek public partial class SqlVmAutoPatchingSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmAutoPatchingSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch? AdditionalVmPatch { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingDayOfWeek? DayOfWeek { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } public int? MaintenanceWindowDurationInMinutes { get { throw null; } set { } } public int? MaintenanceWindowStartingHour { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -647,6 +825,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration right) { throw null; } public override string ToString() { throw null; } } @@ -662,6 +841,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType right) { throw null; } public override string ToString() { throw null; } } @@ -678,9 +858,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType right) { throw null; } public override string ToString() { throw null; } } + public partial class SqlVmDiskConfigAssessmentContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVmDiskConfigAssessmentContent() { } + public bool? RunDiskConfigRules { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SqlVmDiskConfigurationType : System.IEquatable { @@ -695,6 +890,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType right) { throw null; } public override string ToString() { throw null; } } @@ -711,6 +907,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency right) { throw null; } public override string ToString() { throw null; } } @@ -727,6 +924,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku right) { throw null; } public override string ToString() { throw null; } } @@ -734,7 +932,10 @@ public partial class SqlVmGroupPatch : System.ClientModel.Primitives.IJsonModel< { public SqlVmGroupPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -753,9 +954,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType right) { throw null; } public override string ToString() { throw null; } } + public partial class SqlVmIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVmIdentity() { } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType? Type { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SqlVmKeyVaultCredentialSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmKeyVaultCredentialSettings() { } @@ -764,18 +981,63 @@ public SqlVmKeyVaultCredentialSettings() { } public bool? IsEnabled { get { throw null; } set { } } public string ServicePrincipalName { get { throw null; } set { } } public string ServicePrincipalSecret { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SqlVmOperationDisplay : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SqlVmOperationDisplay() { } + public string Description { get { throw null; } } + public string Operation { get { throw null; } } + public string Provider { get { throw null; } } + public string Resource { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmOperationOrigin : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmOperationOrigin(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin System { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin User { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } + public override string ToString() { throw null; } + } + public enum SqlVmOsType + { + Windows = 0, + Linux = 1, + } public partial class SqlVmPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -786,12 +1048,16 @@ public partial class SqlVmStorageConfigurationSettings : System.ClientModel.Prim { public SqlVmStorageConfigurationSettings() { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? DiskConfigurationType { get { throw null; } set { } } + public bool? EnableStorageConfigBlade { get { throw null; } set { } } public bool? IsSqlSystemDBOnDataDisk { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlDataSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlLogSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType? StorageWorkloadType { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -812,9 +1078,81 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType right) { throw null; } public override string ToString() { throw null; } } + public partial class SqlVmTroubleshooting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVmTroubleshooting() { } + public System.DateTimeOffset? EndTimeUtc { get { throw null; } set { } } + public System.DateTimeOffset? StartTimeUtc { get { throw null; } set { } } + public string TroubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? TroubleshootingScenario { get { throw null; } set { } } + public string VirtualMachineResourceId { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmTroubleshootingScenario : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmTroubleshootingScenario(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario UnhealthyReplica { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SqlVmTroubleshootingStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SqlVmTroubleshootingStatus() { } + public System.DateTimeOffset? EndTimeUtc { get { throw null; } } + public System.DateTimeOffset? LastTriggerTimeUtc { get { throw null; } } + public string RootCause { get { throw null; } } + public System.DateTimeOffset? StartTimeUtc { get { throw null; } } + public string TroubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? TroubleshootingScenario { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmVmIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmVmIdentityType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType None { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SqlWorkloadType : System.IEquatable { @@ -829,6 +1167,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType right) { throw null; } public override string ToString() { throw null; } } @@ -845,6 +1184,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType right) { throw null; } public override string ToString() { throw null; } } @@ -854,7 +1194,10 @@ public WindowsServerFailoverClusterDomainCredentials() { } public string ClusterBootstrapAccountPassword { get { throw null; } set { } } public string ClusterOperatorAccountPassword { get { throw null; } set { } } public string SqlServiceAccountPassword { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -869,11 +1212,15 @@ public WindowsServerFailoverClusterDomainProfile() { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType? ClusterSubnetType { get { throw null; } set { } } public string DomainFqdn { get { throw null; } set { } } public string FileShareWitnessPath { get { throw null; } set { } } + public bool? IsSqlServiceAccountGmsa { get { throw null; } set { } } public string OrganizationalUnitPath { get { throw null; } set { } } public string SqlServiceAccount { get { throw null; } set { } } public string StorageAccountPrimaryKey { get { throw null; } set { } } public System.Uri StorageAccountUri { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs index 0d526c9271fb..9ccb90795ca3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs @@ -27,7 +27,10 @@ public AvailabilityGroupListenerData() { } public System.Collections.Generic.IList MultiSubnetIPConfigurations { get { throw null; } } public int? Port { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -40,7 +43,7 @@ public partial class AvailabilityGroupListenerResource : Azure.ResourceManager.A protected AvailabilityGroupListenerResource() { } public virtual Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -61,6 +64,8 @@ internal AzureResourceManagerSqlVirtualMachineContext() { } } public static partial class SqlVirtualMachineExtensions { + public static Azure.Pageable GetAll(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAllAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSqlVm(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSqlVmAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -95,11 +100,15 @@ protected SqlVmCollection() { } public partial class SqlVmData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? AdditionalVmPatch { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings AssessmentSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings AutoBackupSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings AutoPatchingSettings { get { throw null; } set { } } + public bool? EnableAutomaticUpgrade { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings KeyVaultCredentialSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? OsType { get { throw null; } } public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get { throw null; } set { } } public string SqlImageOffer { get { throw null; } set { } } @@ -107,11 +116,17 @@ public SqlVmData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? SqlManagement { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? SqlServerLicenseType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SqlVmGroupResourceId { get { throw null; } set { } } + public string SqlVmName { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings StorageConfigurationSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus TroubleshootingStatus { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity VirtualMachineIdentitySettings { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineResourceId { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials WindowsServerFailoverClusterDomainCredentials { get { throw null; } set { } } public System.Net.IPAddress WindowsServerFailoverClusterStaticIP { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.SqlVmData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.SqlVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -144,8 +159,12 @@ public SqlVmGroupData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? ScaleType { get { throw null; } } public string SqlImageOffer { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? SqlImageSku { get { throw null; } set { } } + public string SqlVmGroupName { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile WindowsServerFailoverClusterDomainProfile { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -160,7 +179,7 @@ protected SqlVmGroupResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmGroupName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -190,9 +209,11 @@ protected SqlVmResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation FetchDCAssessment(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent sqlVmDiskConfigAssessmentContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FetchDCAssessmentAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent sqlVmDiskConfigAssessmentContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Redeploy(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -208,6 +229,8 @@ protected SqlVmResource() { } Azure.ResourceManager.SqlVirtualMachine.SqlVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Troubleshoot(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting sqlVmTroubleshooting, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TroubleshootAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting sqlVmTroubleshooting, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -239,14 +262,32 @@ protected MockableSqlVirtualMachineSubscriptionResource() { } public virtual Azure.Pageable GetSqlVms(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSqlVmsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MockableSqlVirtualMachineTenantResource : Azure.ResourceManager.ArmResource + { + protected MockableSqlVirtualMachineTenantResource() { } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.SqlVirtualMachine.Models { public static partial class ArmSqlVirtualMachineModelFactory { public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData AvailabilityGroupListenerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, string availabilityGroupName = null, System.Collections.Generic.IEnumerable loadBalancerConfigurations = null, System.Collections.Generic.IEnumerable multiSubnetIPConfigurations = null, bool? createDefaultAvailabilityGroupIfNotExist = default(bool?), int? port = default(int?), System.Collections.Generic.IEnumerable availabilityGroupReplicas = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration AvailabilityGroupListenerLoadBalancerConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress = null, Azure.Core.ResourceIdentifier publicIPAddressResourceId = null, Azure.Core.ResourceIdentifier loadBalancerResourceId = null, int? probePort = default(int?), System.Collections.Generic.IEnumerable sqlVmInstances = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Info Info(string name = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay display = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? origin = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlStorageSettings(System.Collections.Generic.IEnumerable luns = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default(int?), int? dataGrowth = default(int?), int? logFileSize = default(int?), int? logGrowth = default(int?), int? dataFileCount = default(int?), bool? persistFolder = default(bool?), string persistFolderPath = null, System.Collections.Generic.IEnumerable logicalUnitNumbers = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings SqlVmAutoBackupSettings(bool? isEnabled = default(bool?), bool? isEncryptionEnabled = default(bool?), int? retentionPeriodInDays = default(int?), System.Uri storageAccountUri = null, string storageContainerName = null, string storageAccessKey = null, string password = null, bool? areSystemDbsIncludedInBackup = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? backupScheduleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? fullBackupFrequency = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency?), System.Collections.Generic.IEnumerable daysOfWeek = null, int? fullBackupStartHour = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? leastPrivilegeMode = default(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType?), string sqlVmName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.Core.ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku, Azure.Core.ResourceIdentifier sqlVmGroupResourceId, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, System.Net.IPAddress windowsServerFailoverClusterStaticIP, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null, string sqlVmGroupName = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch SqlVmGroupPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay SqlVmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch SqlVmPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting SqlVmTroubleshooting(System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null, string virtualMachineResourceId = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus SqlVmTroubleshootingStatus(string rootCause = null, System.DateTimeOffset? lastTriggerTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null) { throw null; } } public partial class AvailabilityGroupListenerLoadBalancerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -256,7 +297,10 @@ public AvailabilityGroupListenerLoadBalancerConfiguration() { } public int? ProbePort { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPAddressResourceId { get { throw null; } set { } } public System.Collections.Generic.IList SqlVmInstances { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -268,7 +312,10 @@ public partial class AvailabilityGroupListenerPrivateIPAddress : System.ClientMo public AvailabilityGroupListenerPrivateIPAddress() { } public System.Net.IPAddress IPAddress { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetResourceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -283,7 +330,10 @@ public AvailabilityGroupReplica() { } public Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode? ReadableSecondary { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole? Role { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SqlVmInstanceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -303,6 +353,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode right) { throw null; } public override string ToString() { throw null; } } @@ -319,6 +370,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode right) { throw null; } public override string ToString() { throw null; } } @@ -335,21 +387,72 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public override string ToString() { throw null; } } + public partial class Info : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal Info() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay Display { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? Origin { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LeastPrivilegeMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LeastPrivilegeMode(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode Enabled { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class MultiSubnetIPConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MultiSubnetIPConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress, string sqlVmInstance) { } public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress PrivateIPAddress { get { throw null; } set { } } public string SqlVmInstance { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class OperationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OperationProperty() { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ReadableSecondaryMode : System.IEquatable { @@ -364,6 +467,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode right) { throw null; } public override string ToString() { throw null; } } @@ -374,7 +478,10 @@ public SqlConnectivityUpdateSettings() { } public int? Port { get { throw null; } set { } } public string SqlAuthUpdatePassword { get { throw null; } set { } } public string SqlAuthUpdateUserName { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -397,6 +504,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku right) { throw null; } public override string ToString() { throw null; } } @@ -410,7 +518,10 @@ public SqlInstanceSettings() { } public int? MaxDop { get { throw null; } set { } } public int? MaxServerMemoryInMB { get { throw null; } set { } } public int? MinServerMemoryInMB { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -431,18 +542,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode right) { throw null; } public override string ToString() { throw null; } } public partial class SqlServerConfigurationsManagementSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlServerConfigurationsManagementSettings() { } + public string AzureAdAuthenticationClientId { get { throw null; } set { } } public bool? IsRServicesEnabled { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings SqlConnectivityUpdateSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings SqlInstanceSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings SqlStorageUpdateSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType? SqlWorkloadType { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -463,6 +579,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType right) { throw null; } public override string ToString() { throw null; } } @@ -480,6 +597,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType right) { throw null; } public override string ToString() { throw null; } } @@ -488,7 +606,11 @@ public partial class SqlStorageSettings : System.ClientModel.Primitives.IJsonMod public SqlStorageSettings() { } public string DefaultFilePath { get { throw null; } set { } } public System.Collections.Generic.IList Luns { get { throw null; } } + public bool? UseStoragePool { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -501,7 +623,10 @@ public SqlStorageUpdateSettings() { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? DiskConfigurationType { get { throw null; } set { } } public int? DiskCount { get { throw null; } set { } } public int? StartingDeviceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -520,13 +645,52 @@ public SqlTempDBSettings() { } public System.Collections.Generic.IList LogicalUnitNumbers { get { throw null; } } public bool? PersistFolder { get { throw null; } set { } } public string PersistFolderPath { get { throw null; } set { } } + public bool? UseStoragePool { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmAdditionalOsPatch : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmAdditionalOsPatch(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch WSUS { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch WU { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch WUMU { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmAdditionalVmPatch : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmAdditionalVmPatch(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch MicrosoftUpdate { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch right) { throw null; } + public override string ToString() { throw null; } + } public enum SqlVmAssessmentDayOfWeek { Monday = 0, @@ -545,7 +709,10 @@ public SqlVmAssessmentSchedule() { } public int? MonthlyOccurrence { get { throw null; } set { } } public string StartTime { get { throw null; } set { } } public int? WeeklyInterval { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -558,7 +725,10 @@ public SqlVmAssessmentSettings() { } public bool? IsEnabled { get { throw null; } set { } } public bool? RunImmediately { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule Schedule { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -583,6 +753,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek right) { throw null; } public override string ToString() { throw null; } } @@ -603,7 +774,10 @@ public SqlVmAutoBackupSettings() { } public string StorageAccessKey { get { throw null; } set { } } public System.Uri StorageAccountUri { get { throw null; } set { } } public string StorageContainerName { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -624,11 +798,15 @@ public enum SqlVmAutoPatchingDayOfWeek public partial class SqlVmAutoPatchingSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmAutoPatchingSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch? AdditionalVmPatch { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingDayOfWeek? DayOfWeek { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } public int? MaintenanceWindowDurationInMinutes { get { throw null; } set { } } public int? MaintenanceWindowStartingHour { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -647,6 +825,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration right) { throw null; } public override string ToString() { throw null; } } @@ -662,6 +841,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType right) { throw null; } public override string ToString() { throw null; } } @@ -678,9 +858,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType right) { throw null; } public override string ToString() { throw null; } } + public partial class SqlVmDiskConfigAssessmentContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVmDiskConfigAssessmentContent() { } + public bool? RunDiskConfigRules { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SqlVmDiskConfigurationType : System.IEquatable { @@ -695,6 +890,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType right) { throw null; } public override string ToString() { throw null; } } @@ -711,6 +907,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency right) { throw null; } public override string ToString() { throw null; } } @@ -727,6 +924,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku right) { throw null; } public override string ToString() { throw null; } } @@ -734,7 +932,10 @@ public partial class SqlVmGroupPatch : System.ClientModel.Primitives.IJsonModel< { public SqlVmGroupPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -753,9 +954,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType right) { throw null; } public override string ToString() { throw null; } } + public partial class SqlVmIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVmIdentity() { } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType? Type { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SqlVmKeyVaultCredentialSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmKeyVaultCredentialSettings() { } @@ -764,18 +981,63 @@ public SqlVmKeyVaultCredentialSettings() { } public bool? IsEnabled { get { throw null; } set { } } public string ServicePrincipalName { get { throw null; } set { } } public string ServicePrincipalSecret { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SqlVmOperationDisplay : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SqlVmOperationDisplay() { } + public string Description { get { throw null; } } + public string Operation { get { throw null; } } + public string Provider { get { throw null; } } + public string Resource { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmOperationOrigin : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmOperationOrigin(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin System { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin User { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } + public override string ToString() { throw null; } + } + public enum SqlVmOsType + { + Windows = 0, + Linux = 1, + } public partial class SqlVmPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -786,12 +1048,16 @@ public partial class SqlVmStorageConfigurationSettings : System.ClientModel.Prim { public SqlVmStorageConfigurationSettings() { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? DiskConfigurationType { get { throw null; } set { } } + public bool? EnableStorageConfigBlade { get { throw null; } set { } } public bool? IsSqlSystemDBOnDataDisk { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlDataSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlLogSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType? StorageWorkloadType { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -812,9 +1078,81 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType right) { throw null; } public override string ToString() { throw null; } } + public partial class SqlVmTroubleshooting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVmTroubleshooting() { } + public System.DateTimeOffset? EndTimeUtc { get { throw null; } set { } } + public System.DateTimeOffset? StartTimeUtc { get { throw null; } set { } } + public string TroubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? TroubleshootingScenario { get { throw null; } set { } } + public string VirtualMachineResourceId { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmTroubleshootingScenario : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmTroubleshootingScenario(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario UnhealthyReplica { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SqlVmTroubleshootingStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SqlVmTroubleshootingStatus() { } + public System.DateTimeOffset? EndTimeUtc { get { throw null; } } + public System.DateTimeOffset? LastTriggerTimeUtc { get { throw null; } } + public string RootCause { get { throw null; } } + public System.DateTimeOffset? StartTimeUtc { get { throw null; } } + public string TroubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? TroubleshootingScenario { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmVmIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmVmIdentityType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType None { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SqlWorkloadType : System.IEquatable { @@ -829,6 +1167,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType right) { throw null; } public override string ToString() { throw null; } } @@ -845,6 +1184,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType right) { throw null; } public override string ToString() { throw null; } } @@ -854,7 +1194,10 @@ public WindowsServerFailoverClusterDomainCredentials() { } public string ClusterBootstrapAccountPassword { get { throw null; } set { } } public string ClusterOperatorAccountPassword { get { throw null; } set { } } public string SqlServiceAccountPassword { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -869,11 +1212,15 @@ public WindowsServerFailoverClusterDomainProfile() { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType? ClusterSubnetType { get { throw null; } set { } } public string DomainFqdn { get { throw null; } set { } } public string FileShareWitnessPath { get { throw null; } set { } } + public bool? IsSqlServiceAccountGmsa { get { throw null; } set { } } public string OrganizationalUnitPath { get { throw null; } set { } } public string SqlServiceAccount { get { throw null; } set { } } public string StorageAccountPrimaryKey { get { throw null; } set { } } public System.Uri StorageAccountUri { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs index 0d526c9271fb..9ccb90795ca3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs @@ -27,7 +27,10 @@ public AvailabilityGroupListenerData() { } public System.Collections.Generic.IList MultiSubnetIPConfigurations { get { throw null; } } public int? Port { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -40,7 +43,7 @@ public partial class AvailabilityGroupListenerResource : Azure.ResourceManager.A protected AvailabilityGroupListenerResource() { } public virtual Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -61,6 +64,8 @@ internal AzureResourceManagerSqlVirtualMachineContext() { } } public static partial class SqlVirtualMachineExtensions { + public static Azure.Pageable GetAll(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetAllAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSqlVm(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSqlVmAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -95,11 +100,15 @@ protected SqlVmCollection() { } public partial class SqlVmData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? AdditionalVmPatch { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings AssessmentSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings AutoBackupSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings AutoPatchingSettings { get { throw null; } set { } } + public bool? EnableAutomaticUpgrade { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings KeyVaultCredentialSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? OsType { get { throw null; } } public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get { throw null; } set { } } public string SqlImageOffer { get { throw null; } set { } } @@ -107,11 +116,17 @@ public SqlVmData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? SqlManagement { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? SqlServerLicenseType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SqlVmGroupResourceId { get { throw null; } set { } } + public string SqlVmName { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings StorageConfigurationSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus TroubleshootingStatus { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity VirtualMachineIdentitySettings { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualMachineResourceId { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials WindowsServerFailoverClusterDomainCredentials { get { throw null; } set { } } public System.Net.IPAddress WindowsServerFailoverClusterStaticIP { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.SqlVmData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.SqlVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -144,8 +159,12 @@ public SqlVmGroupData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? ScaleType { get { throw null; } } public string SqlImageOffer { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? SqlImageSku { get { throw null; } set { } } + public string SqlVmGroupName { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile WindowsServerFailoverClusterDomainProfile { get { throw null; } set { } } + protected virtual Azure.ResourceManager.Models.ResourceData JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.Models.ResourceData PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -160,7 +179,7 @@ protected SqlVmGroupResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmGroupName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -190,9 +209,11 @@ protected SqlVmResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmName) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation FetchDCAssessment(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent sqlVmDiskConfigAssessmentContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FetchDCAssessmentAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent sqlVmDiskConfigAssessmentContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Redeploy(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -208,6 +229,8 @@ protected SqlVmResource() { } Azure.ResourceManager.SqlVirtualMachine.SqlVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Troubleshoot(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting sqlVmTroubleshooting, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> TroubleshootAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting sqlVmTroubleshooting, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -239,14 +262,32 @@ protected MockableSqlVirtualMachineSubscriptionResource() { } public virtual Azure.Pageable GetSqlVms(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSqlVmsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MockableSqlVirtualMachineTenantResource : Azure.ResourceManager.ArmResource + { + protected MockableSqlVirtualMachineTenantResource() { } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } } namespace Azure.ResourceManager.SqlVirtualMachine.Models { public static partial class ArmSqlVirtualMachineModelFactory { public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData AvailabilityGroupListenerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, string availabilityGroupName = null, System.Collections.Generic.IEnumerable loadBalancerConfigurations = null, System.Collections.Generic.IEnumerable multiSubnetIPConfigurations = null, bool? createDefaultAvailabilityGroupIfNotExist = default(bool?), int? port = default(int?), System.Collections.Generic.IEnumerable availabilityGroupReplicas = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration AvailabilityGroupListenerLoadBalancerConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress = null, Azure.Core.ResourceIdentifier publicIPAddressResourceId = null, Azure.Core.ResourceIdentifier loadBalancerResourceId = null, int? probePort = default(int?), System.Collections.Generic.IEnumerable sqlVmInstances = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Info Info(string name = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay display = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? origin = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlStorageSettings(System.Collections.Generic.IEnumerable luns = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default(int?), int? dataGrowth = default(int?), int? logFileSize = default(int?), int? logGrowth = default(int?), int? dataFileCount = default(int?), bool? persistFolder = default(bool?), string persistFolderPath = null, System.Collections.Generic.IEnumerable logicalUnitNumbers = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings SqlVmAutoBackupSettings(bool? isEnabled = default(bool?), bool? isEncryptionEnabled = default(bool?), int? retentionPeriodInDays = default(int?), System.Uri storageAccountUri = null, string storageContainerName = null, string storageAccessKey = null, string password = null, bool? areSystemDbsIncludedInBackup = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? backupScheduleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? fullBackupFrequency = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency?), System.Collections.Generic.IEnumerable daysOfWeek = null, int? fullBackupStartHour = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? leastPrivilegeMode = default(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType?), string sqlVmName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.Core.ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku, Azure.Core.ResourceIdentifier sqlVmGroupResourceId, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, System.Net.IPAddress windowsServerFailoverClusterStaticIP, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null, string sqlVmGroupName = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch SqlVmGroupPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay SqlVmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch SqlVmPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting SqlVmTroubleshooting(System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null, string virtualMachineResourceId = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus SqlVmTroubleshootingStatus(string rootCause = null, System.DateTimeOffset? lastTriggerTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null) { throw null; } } public partial class AvailabilityGroupListenerLoadBalancerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -256,7 +297,10 @@ public AvailabilityGroupListenerLoadBalancerConfiguration() { } public int? ProbePort { get { throw null; } set { } } public Azure.Core.ResourceIdentifier PublicIPAddressResourceId { get { throw null; } set { } } public System.Collections.Generic.IList SqlVmInstances { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -268,7 +312,10 @@ public partial class AvailabilityGroupListenerPrivateIPAddress : System.ClientMo public AvailabilityGroupListenerPrivateIPAddress() { } public System.Net.IPAddress IPAddress { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetResourceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -283,7 +330,10 @@ public AvailabilityGroupReplica() { } public Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode? ReadableSecondary { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole? Role { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SqlVmInstanceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplica System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -303,6 +353,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode right) { throw null; } public override string ToString() { throw null; } } @@ -319,6 +370,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode right) { throw null; } public override string ToString() { throw null; } } @@ -335,21 +387,72 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public override string ToString() { throw null; } } + public partial class Info : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal Info() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay Display { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? Origin { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LeastPrivilegeMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LeastPrivilegeMode(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode Enabled { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class MultiSubnetIPConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MultiSubnetIPConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress, string sqlVmInstance) { } public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress PrivateIPAddress { get { throw null; } set { } } public string SqlVmInstance { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.MultiSubnetIPConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class OperationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal OperationProperty() { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ReadableSecondaryMode : System.IEquatable { @@ -364,6 +467,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode right) { throw null; } public override string ToString() { throw null; } } @@ -374,7 +478,10 @@ public SqlConnectivityUpdateSettings() { } public int? Port { get { throw null; } set { } } public string SqlAuthUpdatePassword { get { throw null; } set { } } public string SqlAuthUpdateUserName { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -397,6 +504,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku right) { throw null; } public override string ToString() { throw null; } } @@ -410,7 +518,10 @@ public SqlInstanceSettings() { } public int? MaxDop { get { throw null; } set { } } public int? MaxServerMemoryInMB { get { throw null; } set { } } public int? MinServerMemoryInMB { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -431,18 +542,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode right) { throw null; } public override string ToString() { throw null; } } public partial class SqlServerConfigurationsManagementSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlServerConfigurationsManagementSettings() { } + public string AzureAdAuthenticationClientId { get { throw null; } set { } } public bool? IsRServicesEnabled { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlConnectivityUpdateSettings SqlConnectivityUpdateSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlInstanceSettings SqlInstanceSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings SqlStorageUpdateSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType? SqlWorkloadType { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -463,6 +579,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType right) { throw null; } public override string ToString() { throw null; } } @@ -480,6 +597,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType right) { throw null; } public override string ToString() { throw null; } } @@ -488,7 +606,11 @@ public partial class SqlStorageSettings : System.ClientModel.Primitives.IJsonMod public SqlStorageSettings() { } public string DefaultFilePath { get { throw null; } set { } } public System.Collections.Generic.IList Luns { get { throw null; } } + public bool? UseStoragePool { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -501,7 +623,10 @@ public SqlStorageUpdateSettings() { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? DiskConfigurationType { get { throw null; } set { } } public int? DiskCount { get { throw null; } set { } } public int? StartingDeviceId { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageUpdateSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -520,13 +645,52 @@ public SqlTempDBSettings() { } public System.Collections.Generic.IList LogicalUnitNumbers { get { throw null; } } public bool? PersistFolder { get { throw null; } set { } } public string PersistFolderPath { get { throw null; } set { } } + public bool? UseStoragePool { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmAdditionalOsPatch : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmAdditionalOsPatch(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch WSUS { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch WU { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch WUMU { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmAdditionalVmPatch : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmAdditionalVmPatch(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch MicrosoftUpdate { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch right) { throw null; } + public override string ToString() { throw null; } + } public enum SqlVmAssessmentDayOfWeek { Monday = 0, @@ -545,7 +709,10 @@ public SqlVmAssessmentSchedule() { } public int? MonthlyOccurrence { get { throw null; } set { } } public string StartTime { get { throw null; } set { } } public int? WeeklyInterval { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -558,7 +725,10 @@ public SqlVmAssessmentSettings() { } public bool? IsEnabled { get { throw null; } set { } } public bool? RunImmediately { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSchedule Schedule { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -583,6 +753,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek right) { throw null; } public override string ToString() { throw null; } } @@ -603,7 +774,10 @@ public SqlVmAutoBackupSettings() { } public string StorageAccessKey { get { throw null; } set { } } public System.Uri StorageAccountUri { get { throw null; } set { } } public string StorageContainerName { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -624,11 +798,15 @@ public enum SqlVmAutoPatchingDayOfWeek public partial class SqlVmAutoPatchingSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmAutoPatchingSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalVmPatch? AdditionalVmPatch { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingDayOfWeek? DayOfWeek { get { throw null; } set { } } public bool? IsEnabled { get { throw null; } set { } } public int? MaintenanceWindowDurationInMinutes { get { throw null; } set { } } public int? MaintenanceWindowStartingHour { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -647,6 +825,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration right) { throw null; } public override string ToString() { throw null; } } @@ -662,6 +841,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType right) { throw null; } public override string ToString() { throw null; } } @@ -678,9 +858,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType right) { throw null; } public override string ToString() { throw null; } } + public partial class SqlVmDiskConfigAssessmentContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVmDiskConfigAssessmentContent() { } + public bool? RunDiskConfigRules { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigAssessmentContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SqlVmDiskConfigurationType : System.IEquatable { @@ -695,6 +890,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType right) { throw null; } public override string ToString() { throw null; } } @@ -711,6 +907,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency right) { throw null; } public override string ToString() { throw null; } } @@ -727,6 +924,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku right) { throw null; } public override string ToString() { throw null; } } @@ -734,7 +932,10 @@ public partial class SqlVmGroupPatch : System.ClientModel.Primitives.IJsonModel< { public SqlVmGroupPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -753,9 +954,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType right) { throw null; } public override string ToString() { throw null; } } + public partial class SqlVmIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVmIdentity() { } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType? Type { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SqlVmKeyVaultCredentialSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmKeyVaultCredentialSettings() { } @@ -764,18 +981,63 @@ public SqlVmKeyVaultCredentialSettings() { } public bool? IsEnabled { get { throw null; } set { } } public string ServicePrincipalName { get { throw null; } set { } } public string ServicePrincipalSecret { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class SqlVmOperationDisplay : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SqlVmOperationDisplay() { } + public string Description { get { throw null; } } + public string Operation { get { throw null; } } + public string Provider { get { throw null; } } + public string Resource { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmOperationOrigin : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmOperationOrigin(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin System { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin User { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } + public override string ToString() { throw null; } + } + public enum SqlVmOsType + { + Windows = 0, + Linux = 1, + } public partial class SqlVmPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SqlVmPatch() { } public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -786,12 +1048,16 @@ public partial class SqlVmStorageConfigurationSettings : System.ClientModel.Prim { public SqlVmStorageConfigurationSettings() { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? DiskConfigurationType { get { throw null; } set { } } + public bool? EnableStorageConfigBlade { get { throw null; } set { } } public bool? IsSqlSystemDBOnDataDisk { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlDataSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlLogSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType? StorageWorkloadType { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -812,9 +1078,81 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType right) { throw null; } public override string ToString() { throw null; } } + public partial class SqlVmTroubleshooting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVmTroubleshooting() { } + public System.DateTimeOffset? EndTimeUtc { get { throw null; } set { } } + public System.DateTimeOffset? StartTimeUtc { get { throw null; } set { } } + public string TroubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? TroubleshootingScenario { get { throw null; } set { } } + public string VirtualMachineResourceId { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmTroubleshootingScenario : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmTroubleshootingScenario(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario UnhealthyReplica { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SqlVmTroubleshootingStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SqlVmTroubleshootingStatus() { } + public System.DateTimeOffset? EndTimeUtc { get { throw null; } } + public System.DateTimeOffset? LastTriggerTimeUtc { get { throw null; } } + public string RootCause { get { throw null; } } + public System.DateTimeOffset? StartTimeUtc { get { throw null; } } + public string TroubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? TroubleshootingScenario { get { throw null; } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmVmIdentityType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmVmIdentityType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType None { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmVmIdentityType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct SqlWorkloadType : System.IEquatable { @@ -829,6 +1167,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType right) { throw null; } public override string ToString() { throw null; } } @@ -845,6 +1184,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override int GetHashCode() { throw null; } public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType right) { throw null; } public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? (string value) { throw null; } public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType right) { throw null; } public override string ToString() { throw null; } } @@ -854,7 +1194,10 @@ public WindowsServerFailoverClusterDomainCredentials() { } public string ClusterBootstrapAccountPassword { get { throw null; } set { } } public string ClusterOperatorAccountPassword { get { throw null; } set { } } public string SqlServiceAccountPassword { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -869,11 +1212,15 @@ public WindowsServerFailoverClusterDomainProfile() { } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType? ClusterSubnetType { get { throw null; } set { } } public string DomainFqdn { get { throw null; } set { } } public string FileShareWitnessPath { get { throw null; } set { } } + public bool? IsSqlServiceAccountGmsa { get { throw null; } set { } } public string OrganizationalUnitPath { get { throw null; } set { } } public string SqlServiceAccount { get { throw null; } set { } } public string StorageAccountPrimaryKey { get { throw null; } set { } } public System.Uri StorageAccountUri { get { throw null; } set { } } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs index 5e37407d160c..a300054a3345 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs @@ -27,7 +27,7 @@ public static partial class ArmSqlVirtualMachineModelFactory /// The intended executor of the operation.". /// Additional descriptions for the operation. /// A new instance for mocking. - public static Info Info(string name = default, OperationDisplay display = default, OperationOrigin? origin = default, IReadOnlyDictionary properties = default) + public static Info Info(string name = default, SqlVmOperationDisplay display = default, SqlVmOperationOrigin? origin = default, IReadOnlyDictionary properties = default) { properties ??= new ChangeTrackingDictionary(); @@ -39,10 +39,10 @@ public static Info Info(string name = default, OperationDisplay display = defaul /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. - /// A new instance for mocking. - public static OperationDisplay OperationDisplay(string provider = default, string resource = default, string operation = default, string description = default) + /// A new instance for mocking. + public static SqlVmOperationDisplay SqlVmOperationDisplay(string provider = default, string resource = default, string operation = default, string description = default) { - return new OperationDisplay(provider, resource, operation, description, additionalBinaryDataProperties: null); + return new SqlVmOperationDisplay(provider, resource, operation, description, additionalBinaryDataProperties: null); } /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. @@ -123,9 +123,10 @@ public static AvailabilityGroupListenerLoadBalancerConfiguration AvailabilityGro /// Additional VM Patching solution enabled on the Virtual Machine. /// Virtual Machine Identity details used for Sql IaaS extension configurations. /// Operating System of the current SQL Virtual Machine. + /// Name of the SQL virtual machine. /// DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server. /// A new instance for mocking. - public static SqlVmData SqlVmData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, ResourceIdentifier virtualMachineResourceId = default, string provisioningState = default, string sqlImageOffer = default, SqlServerLicenseType? sqlServerLicenseType = default, SqlManagementMode? sqlManagement = default, LeastPrivilegeMode? leastPrivilegeMode = default, SqlImageSku? sqlImageSku = default, ResourceIdentifier sqlVmGroupResourceId = default, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = default, IPAddress windowsServerFailoverClusterStaticIP = default, SqlVmAutoPatchingSettings autoPatchingSettings = default, SqlVmAutoBackupSettings autoBackupSettings = default, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = default, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default, SqlVmStorageConfigurationSettings storageConfigurationSettings = default, TroubleshootingStatus troubleshootingStatus = default, SqlVmAssessmentSettings assessmentSettings = default, bool? enableAutomaticUpgrade = default, AdditionalOsPatch? additionalVmPatch = default, VirtualMachineIdentity virtualMachineIdentitySettings = default, OsType? osType = default, ManagedServiceIdentity identity = default) + public static SqlVmData SqlVmData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, ResourceIdentifier virtualMachineResourceId = default, string provisioningState = default, string sqlImageOffer = default, SqlServerLicenseType? sqlServerLicenseType = default, SqlManagementMode? sqlManagement = default, LeastPrivilegeMode? leastPrivilegeMode = default, SqlImageSku? sqlImageSku = default, ResourceIdentifier sqlVmGroupResourceId = default, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = default, IPAddress windowsServerFailoverClusterStaticIP = default, SqlVmAutoPatchingSettings autoPatchingSettings = default, SqlVmAutoBackupSettings autoBackupSettings = default, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = default, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default, SqlVmStorageConfigurationSettings storageConfigurationSettings = default, SqlVmTroubleshootingStatus troubleshootingStatus = default, SqlVmAssessmentSettings assessmentSettings = default, bool? enableAutomaticUpgrade = default, SqlVmAdditionalOsPatch? additionalVmPatch = default, SqlVmIdentity virtualMachineIdentitySettings = default, SqlVmOsType? osType = default, string sqlVmName = default, ManagedServiceIdentity identity = default) { tags ??= new ChangeTrackingDictionary(); @@ -160,6 +161,7 @@ public static SqlVmData SqlVmData(ResourceIdentifier id = default, string name = virtualMachineIdentitySettings, osType, null), + sqlVmName, identity); } @@ -249,10 +251,10 @@ public static SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default, i /// End time in UTC timezone. /// SQL VM troubleshooting scenario. /// The name of the availability group. - /// A new instance for mocking. - public static TroubleshootingStatus TroubleshootingStatus(string rootCause = default, DateTimeOffset? lastTriggerTimeUtc = default, DateTimeOffset? startTimeUtc = default, DateTimeOffset? endTimeUtc = default, TroubleshootingScenario? troubleshootingScenario = default, string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = default) + /// A new instance for mocking. + public static SqlVmTroubleshootingStatus SqlVmTroubleshootingStatus(string rootCause = default, DateTimeOffset? lastTriggerTimeUtc = default, DateTimeOffset? startTimeUtc = default, DateTimeOffset? endTimeUtc = default, SqlVmTroubleshootingScenario? troubleshootingScenario = default, string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = default) { - return new TroubleshootingStatus( + return new SqlVmTroubleshootingStatus( rootCause, lastTriggerTimeUtc, startTimeUtc, @@ -285,8 +287,9 @@ public static SqlVmPatch SqlVmPatch(IDictionary tags = default) /// Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type. /// Cluster type. /// Cluster Active Directory domain profile. + /// Name of the SQL virtual machine group. /// A new instance for mocking. - public static SqlVmGroupData SqlVmGroupData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, string provisioningState = default, string sqlImageOffer = default, SqlVmGroupImageSku? sqlImageSku = default, SqlVmGroupScaleType? scaleType = default, SqlVmClusterManagerType? clusterManagerType = default, SqlVmClusterConfiguration? clusterConfiguration = default, WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = default) + public static SqlVmGroupData SqlVmGroupData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, string provisioningState = default, string sqlImageOffer = default, SqlVmGroupImageSku? sqlImageSku = default, SqlVmGroupScaleType? scaleType = default, SqlVmClusterManagerType? clusterManagerType = default, SqlVmClusterConfiguration? clusterConfiguration = default, WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = default, string sqlVmGroupName = default) { tags ??= new ChangeTrackingDictionary(); @@ -306,7 +309,8 @@ public static SqlVmGroupData SqlVmGroupData(ResourceIdentifier id = default, str clusterManagerType, clusterConfiguration, windowsServerFailoverClusterDomainProfile, - null)); + null), + sqlVmGroupName); } /// An update to a SQL virtual machine group. @@ -325,7 +329,7 @@ public static SqlVmGroupPatch SqlVmGroupPatch(IDictionary tags = /// The name of the availability group. /// Virtual machine resource id for response. /// A new instance for mocking. - public static SqlVmTroubleshooting SqlVmTroubleshooting(DateTimeOffset? startTimeUtc = default, DateTimeOffset? endTimeUtc = default, TroubleshootingScenario? troubleshootingScenario = default, string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = default, string virtualMachineResourceId = default) + public static SqlVmTroubleshooting SqlVmTroubleshooting(DateTimeOffset? startTimeUtc = default, DateTimeOffset? endTimeUtc = default, SqlVmTroubleshootingScenario? troubleshootingScenario = default, string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = default, string virtualMachineResourceId = default) { return new SqlVmTroubleshooting( startTimeUtc, @@ -336,6 +340,27 @@ public static SqlVmTroubleshooting SqlVmTroubleshooting(DateTimeOffset? startTim additionalBinaryDataProperties: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// Provisioning state to track the async operation status. + /// SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016. + /// SQL image sku. + /// Scale type. + /// Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type. + /// Cluster type. + /// Cluster Active Directory domain profile. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static SqlVmGroupData SqlVmGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string provisioningState, string sqlImageOffer, SqlVmGroupImageSku? sqlImageSku, SqlVmGroupScaleType? scaleType, SqlVmClusterManagerType? clusterManagerType, SqlVmClusterConfiguration? clusterConfiguration, WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile) + { + return SqlVmGroupData(id, name, resourceType, systemData, tags, location, provisioningState, sqlImageOffer, sqlImageSku, scaleType, clusterManagerType, clusterConfiguration, windowsServerFailoverClusterDomainProfile, sqlVmGroupName: default); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -363,7 +388,7 @@ public static SqlVmTroubleshooting SqlVmTroubleshooting(DateTimeOffset? startTim [EditorBrowsable(EditorBrowsableState.Never)] public static SqlVmData SqlVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, SqlServerLicenseType? sqlServerLicenseType, SqlManagementMode? sqlManagement, SqlImageSku? sqlImageSku, ResourceIdentifier sqlVmGroupResourceId, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, IPAddress windowsServerFailoverClusterStaticIP, SqlVmAutoPatchingSettings autoPatchingSettings, SqlVmAutoBackupSettings autoBackupSettings, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, SqlVmStorageConfigurationSettings storageConfigurationSettings, SqlVmAssessmentSettings assessmentSettings) { - return SqlVmData(id, name, resourceType, systemData, tags, location, virtualMachineResourceId, provisioningState, sqlImageOffer, sqlServerLicenseType, sqlManagement, leastPrivilegeMode: default, sqlImageSku, sqlVmGroupResourceId, windowsServerFailoverClusterDomainCredentials, windowsServerFailoverClusterStaticIP, autoPatchingSettings, autoBackupSettings, keyVaultCredentialSettings, serverConfigurationsManagementSettings, storageConfigurationSettings, troubleshootingStatus: default, assessmentSettings, enableAutomaticUpgrade: default, additionalVmPatch: default, virtualMachineIdentitySettings: default, osType: default, identity); + return SqlVmData(id, name, resourceType, systemData, tags, location, virtualMachineResourceId, provisioningState, sqlImageOffer, sqlServerLicenseType, sqlManagement, leastPrivilegeMode: default, sqlImageSku, sqlVmGroupResourceId, windowsServerFailoverClusterDomainCredentials, windowsServerFailoverClusterStaticIP, autoPatchingSettings, autoBackupSettings, keyVaultCredentialSettings, serverConfigurationsManagementSettings, storageConfigurationSettings, troubleshootingStatus: default, assessmentSettings, enableAutomaticUpgrade: default, additionalVmPatch: default, virtualMachineIdentitySettings: default, osType: default, sqlVmName: default, identity); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT.cs index 0428fe600eed..4bea0f7ea13b 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT.cs @@ -20,21 +20,21 @@ internal partial class AvailabilityGroupListenersGetByGroupAsyncCollectionResult private readonly AvailabilityGroupListeners _client; private readonly string _subscriptionId; private readonly string _resourceGroupName; - private readonly string _sqlVirtualMachineGroupName; + private readonly string _sqlVmGroupName; private readonly RequestContext _context; /// Initializes a new instance of AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. /// The AvailabilityGroupListeners client used to send requests. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT(AvailabilityGroupListeners client, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + public AvailabilityGroupListenersGetByGroupAsyncCollectionResultOfT(AvailabilityGroupListeners client, string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContext context) : base(context?.CancellationToken ?? default) { _client = client; _subscriptionId = subscriptionId; _resourceGroupName = resourceGroupName; - _sqlVirtualMachineGroupName = sqlVirtualMachineGroupName; + _sqlVmGroupName = sqlVmGroupName; _context = context; } @@ -67,7 +67,7 @@ public override async IAsyncEnumerable> AsPa /// The next link to use for the next page of results. private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) { - HttpMessage message = nextLink != null ? _client.CreateNextGetByGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context) : _client.CreateGetByGroupRequest(_subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context); + HttpMessage message = nextLink != null ? _client.CreateNextGetByGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVmGroupName, _context) : _client.CreateGetByGroupRequest(_subscriptionId, _resourceGroupName, _sqlVmGroupName, _context); using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.GetAll"); scope.Start(); try diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupCollectionResultOfT.cs index 3d99b3015052..3f5d96d1bcd2 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupCollectionResultOfT.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/AvailabilityGroupListenersGetByGroupCollectionResultOfT.cs @@ -19,21 +19,21 @@ internal partial class AvailabilityGroupListenersGetByGroupCollectionResultOfT : private readonly AvailabilityGroupListeners _client; private readonly string _subscriptionId; private readonly string _resourceGroupName; - private readonly string _sqlVirtualMachineGroupName; + private readonly string _sqlVmGroupName; private readonly RequestContext _context; /// Initializes a new instance of AvailabilityGroupListenersGetByGroupCollectionResultOfT, which is used to iterate over the pages of a collection. /// The AvailabilityGroupListeners client used to send requests. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AvailabilityGroupListenersGetByGroupCollectionResultOfT(AvailabilityGroupListeners client, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + public AvailabilityGroupListenersGetByGroupCollectionResultOfT(AvailabilityGroupListeners client, string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContext context) : base(context?.CancellationToken ?? default) { _client = client; _subscriptionId = subscriptionId; _resourceGroupName = resourceGroupName; - _sqlVirtualMachineGroupName = sqlVirtualMachineGroupName; + _sqlVmGroupName = sqlVmGroupName; _context = context; } @@ -66,7 +66,7 @@ public override IEnumerable> AsPages(string /// The next link to use for the next page of results. private Response GetNextResponse(int? pageSizeHint, Uri nextLink) { - HttpMessage message = nextLink != null ? _client.CreateNextGetByGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context) : _client.CreateGetByGroupRequest(_subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context); + HttpMessage message = nextLink != null ? _client.CreateNextGetByGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVmGroupName, _context) : _client.CreateGetByGroupRequest(_subscriptionId, _resourceGroupName, _sqlVmGroupName, _context); using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("AvailabilityGroupListenerCollection.GetAll"); scope.Start(); try diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT.cs index 8b2dd05e7724..c7645c9b7b9a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT.cs @@ -20,21 +20,21 @@ internal partial class SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionRes private readonly SqlVirtualMachines _client; private readonly string _subscriptionId; private readonly string _resourceGroupName; - private readonly string _sqlVirtualMachineGroupName; + private readonly string _sqlVmGroupName; private readonly RequestContext _context; /// Initializes a new instance of SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SqlVirtualMachines client used to send requests. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT(SqlVirtualMachines client, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + public SqlVirtualMachinesGetSqlVmsBySqlVmGroupAsyncCollectionResultOfT(SqlVirtualMachines client, string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContext context) : base(context?.CancellationToken ?? default) { _client = client; _subscriptionId = subscriptionId; _resourceGroupName = resourceGroupName; - _sqlVirtualMachineGroupName = sqlVirtualMachineGroupName; + _sqlVmGroupName = sqlVmGroupName; _context = context; } @@ -67,7 +67,7 @@ public override async IAsyncEnumerable> AsPages(string continuat /// The next link to use for the next page of results. private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) { - HttpMessage message = nextLink != null ? _client.CreateNextGetSqlVmsBySqlVmGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context) : _client.CreateGetSqlVmsBySqlVmGroupRequest(_subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context); + HttpMessage message = nextLink != null ? _client.CreateNextGetSqlVmsBySqlVmGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVmGroupName, _context) : _client.CreateGetSqlVmsBySqlVmGroupRequest(_subscriptionId, _resourceGroupName, _sqlVmGroupName, _context); using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("SqlVmGroupResource.GetSqlVmsBySqlVmGroup"); scope.Start(); try diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT.cs index 2d64dd25a53a..57ddb82c0ab8 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT.cs @@ -19,21 +19,21 @@ internal partial class SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOf private readonly SqlVirtualMachines _client; private readonly string _subscriptionId; private readonly string _resourceGroupName; - private readonly string _sqlVirtualMachineGroupName; + private readonly string _sqlVmGroupName; private readonly RequestContext _context; /// Initializes a new instance of SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT, which is used to iterate over the pages of a collection. /// The SqlVirtualMachines client used to send requests. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT(SqlVirtualMachines client, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) : base(context?.CancellationToken ?? default) + public SqlVirtualMachinesGetSqlVmsBySqlVmGroupCollectionResultOfT(SqlVirtualMachines client, string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContext context) : base(context?.CancellationToken ?? default) { _client = client; _subscriptionId = subscriptionId; _resourceGroupName = resourceGroupName; - _sqlVirtualMachineGroupName = sqlVirtualMachineGroupName; + _sqlVmGroupName = sqlVmGroupName; _context = context; } @@ -66,7 +66,7 @@ public override IEnumerable> AsPages(string continuationToken, i /// The next link to use for the next page of results. private Response GetNextResponse(int? pageSizeHint, Uri nextLink) { - HttpMessage message = nextLink != null ? _client.CreateNextGetSqlVmsBySqlVmGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context) : _client.CreateGetSqlVmsBySqlVmGroupRequest(_subscriptionId, _resourceGroupName, _sqlVirtualMachineGroupName, _context); + HttpMessage message = nextLink != null ? _client.CreateNextGetSqlVmsBySqlVmGroupRequest(nextLink, _subscriptionId, _resourceGroupName, _sqlVmGroupName, _context) : _client.CreateGetSqlVmsBySqlVmGroupRequest(_subscriptionId, _resourceGroupName, _sqlVmGroupName, _context); using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("SqlVmGroupResource.GetSqlVmsBySqlVmGroup"); scope.Start(); try diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineResourceGroupResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineResourceGroupResource.cs index 0f497bf99b1f..aeb3d4d0b110 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineResourceGroupResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineResourceGroupResource.cs @@ -55,17 +55,17 @@ public virtual SqlVmCollection GetSqlVms() /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetSqlVmAsync(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) + public virtual async Task> GetSqlVmAsync(string sqlVmName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - return await GetSqlVms().GetAsync(sqlVirtualMachineName, expand, cancellationToken).ConfigureAwait(false); + return await GetSqlVms().GetAsync(sqlVmName, expand, cancellationToken).ConfigureAwait(false); } /// @@ -85,17 +85,17 @@ public virtual async Task> GetSqlVmAsync(string sqlVirtu /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetSqlVm(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) + public virtual Response GetSqlVm(string sqlVmName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - return GetSqlVms().Get(sqlVirtualMachineName, expand, cancellationToken); + return GetSqlVms().Get(sqlVmName, expand, cancellationToken); } /// Gets a collection of SqlVmGroups in the . @@ -122,16 +122,16 @@ public virtual SqlVmGroupCollection GetSqlVmGroups() /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetSqlVmGroupAsync(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + public virtual async Task> GetSqlVmGroupAsync(string sqlVmGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - return await GetSqlVmGroups().GetAsync(sqlVirtualMachineGroupName, cancellationToken).ConfigureAwait(false); + return await GetSqlVmGroups().GetAsync(sqlVmGroupName, cancellationToken).ConfigureAwait(false); } /// @@ -151,16 +151,16 @@ public virtual async Task> GetSqlVmGroupAsync(strin /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetSqlVmGroup(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + public virtual Response GetSqlVmGroup(string sqlVmGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - return GetSqlVmGroups().Get(sqlVirtualMachineGroupName, cancellationToken); + return GetSqlVmGroups().Get(sqlVmGroupName, cancellationToken); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs index 7c954ed1ef9a..867c34fded10 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs @@ -123,16 +123,16 @@ public static SqlVmCollection GetSqlVms(this ResourceGroupResource resourceGroup /// /// /// The the method will execute against. - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. /// is null. [ForwardsClientCalls] - public static async Task> GetSqlVmAsync(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) + public static async Task> GetSqlVmAsync(this ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = default, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmAsync(sqlVirtualMachineName, expand, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmAsync(sqlVmName, expand, cancellationToken).ConfigureAwait(false); } /// @@ -143,16 +143,16 @@ public static async Task> GetSqlVmAsync(this ResourceGro /// /// /// The the method will execute against. - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. /// is null. [ForwardsClientCalls] - public static Response GetSqlVm(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) + public static Response GetSqlVm(this ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = default, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVm(sqlVirtualMachineName, expand, cancellationToken); + return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVm(sqlVmName, expand, cancellationToken); } /// @@ -180,15 +180,15 @@ public static SqlVmGroupCollection GetSqlVmGroups(this ResourceGroupResource res /// /// /// The the method will execute against. - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. /// is null. [ForwardsClientCalls] - public static async Task> GetSqlVmGroupAsync(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + public static async Task> GetSqlVmGroupAsync(this ResourceGroupResource resourceGroupResource, string sqlVmGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroupAsync(sqlVirtualMachineGroupName, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroupAsync(sqlVmGroupName, cancellationToken).ConfigureAwait(false); } /// @@ -199,15 +199,15 @@ public static async Task> GetSqlVmGroupAsync(this R /// /// /// The the method will execute against. - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. /// is null. [ForwardsClientCalls] - public static Response GetSqlVmGroup(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + public static Response GetSqlVmGroup(this ResourceGroupResource resourceGroupResource, string sqlVmGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroup(sqlVirtualMachineGroupName, cancellationToken); + return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroup(sqlVmGroupName, cancellationToken); } /// diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs index 95ce4d88fb92..f8212b65471c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs @@ -29,7 +29,6 @@ namespace Azure.ResourceManager.SqlVirtualMachine [ModelReaderWriterBuildable(typeof(Info))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(MultiSubnetIPConfiguration))] - [ModelReaderWriterBuildable(typeof(OperationDisplay))] [ModelReaderWriterBuildable(typeof(OperationListResult))] [ModelReaderWriterBuildable(typeof(OperationProperty))] [ModelReaderWriterBuildable(typeof(ResponseError))] @@ -52,18 +51,19 @@ namespace Azure.ResourceManager.SqlVirtualMachine [ModelReaderWriterBuildable(typeof(SqlVmGroupData))] [ModelReaderWriterBuildable(typeof(SqlVmGroupPatch))] [ModelReaderWriterBuildable(typeof(SqlVmGroupResource))] + [ModelReaderWriterBuildable(typeof(SqlVmIdentity))] [ModelReaderWriterBuildable(typeof(SqlVmKeyVaultCredentialSettings))] + [ModelReaderWriterBuildable(typeof(SqlVmOperationDisplay))] [ModelReaderWriterBuildable(typeof(SqlVmPatch))] [ModelReaderWriterBuildable(typeof(SqlVmResource))] [ModelReaderWriterBuildable(typeof(SqlVmStorageConfigurationSettings))] [ModelReaderWriterBuildable(typeof(SqlVmTroubleshooting))] + [ModelReaderWriterBuildable(typeof(SqlVmTroubleshootingStatus))] [ModelReaderWriterBuildable(typeof(SqlWorkloadTypeUpdateSettings))] [ModelReaderWriterBuildable(typeof(SystemData))] [ModelReaderWriterBuildable(typeof(TroubleshootingAdditionalProperties))] - [ModelReaderWriterBuildable(typeof(TroubleshootingStatus))] [ModelReaderWriterBuildable(typeof(UnhealthyReplicaInfo))] [ModelReaderWriterBuildable(typeof(UserAssignedIdentity))] - [ModelReaderWriterBuildable(typeof(VirtualMachineIdentity))] [ModelReaderWriterBuildable(typeof(WindowsServerFailoverClusterDomainCredentials))] [ModelReaderWriterBuildable(typeof(WindowsServerFailoverClusterDomainProfile))] public partial class AzureResourceManagerSqlVirtualMachineContext : ModelReaderWriterContext diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs index 63dc37812f8f..875478d330c5 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs @@ -103,8 +103,8 @@ internal static Info DeserializeInfo(JsonElement element, ModelReaderWriterOptio return null; } string name = default; - OperationDisplay display = default; - OperationOrigin? origin = default; + SqlVmOperationDisplay display = default; + SqlVmOperationOrigin? origin = default; IReadOnlyDictionary properties = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -120,7 +120,7 @@ internal static Info DeserializeInfo(JsonElement element, ModelReaderWriterOptio { continue; } - display = OperationDisplay.DeserializeOperationDisplay(prop.Value, options); + display = SqlVmOperationDisplay.DeserializeSqlVmOperationDisplay(prop.Value, options); continue; } if (prop.NameEquals("origin"u8)) @@ -129,7 +129,7 @@ internal static Info DeserializeInfo(JsonElement element, ModelReaderWriterOptio { continue; } - origin = new OperationOrigin(prop.Value.GetString()); + origin = new SqlVmOperationOrigin(prop.Value.GetString()); continue; } if (prop.NameEquals("properties"u8)) diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs index 3f69b71ccb18..6975873c848e 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs @@ -29,7 +29,7 @@ internal Info() /// The intended executor of the operation.". /// Additional descriptions for the operation. /// Keeps track of any properties unknown to the library. - internal Info(string name, OperationDisplay display, OperationOrigin? origin, IReadOnlyDictionary properties, IDictionary additionalBinaryDataProperties) + internal Info(string name, SqlVmOperationDisplay display, SqlVmOperationOrigin? origin, IReadOnlyDictionary properties, IDictionary additionalBinaryDataProperties) { Name = name; Display = display; @@ -42,10 +42,10 @@ internal Info(string name, OperationDisplay display, OperationOrigin? origin, IR public string Name { get; } /// he localized display information for this particular operation / action. - public OperationDisplay Display { get; } + public SqlVmOperationDisplay Display { get; } /// The intended executor of the operation.". - public OperationOrigin? Origin { get; } + public SqlVmOperationOrigin? Origin { get; } /// Additional descriptions for the operation. public IReadOnlyDictionary Properties { get; } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs index bf325a75304e..b67d71f06753 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs @@ -198,12 +198,12 @@ internal static SqlVirtualMachineProperties DeserializeSqlVirtualMachineProperti SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = default; SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default; SqlVmStorageConfigurationSettings storageConfigurationSettings = default; - TroubleshootingStatus troubleshootingStatus = default; + SqlVmTroubleshootingStatus troubleshootingStatus = default; SqlVmAssessmentSettings assessmentSettings = default; bool? enableAutomaticUpgrade = default; - AdditionalOsPatch? additionalVmPatch = default; - VirtualMachineIdentity virtualMachineIdentitySettings = default; - OsType? osType = default; + SqlVmAdditionalOsPatch? additionalVmPatch = default; + SqlVmIdentity virtualMachineIdentitySettings = default; + SqlVmOsType? osType = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -340,7 +340,7 @@ internal static SqlVirtualMachineProperties DeserializeSqlVirtualMachineProperti { continue; } - troubleshootingStatus = TroubleshootingStatus.DeserializeTroubleshootingStatus(prop.Value, options); + troubleshootingStatus = SqlVmTroubleshootingStatus.DeserializeSqlVmTroubleshootingStatus(prop.Value, options); continue; } if (prop.NameEquals("assessmentSettings"u8)) @@ -367,7 +367,7 @@ internal static SqlVirtualMachineProperties DeserializeSqlVirtualMachineProperti { continue; } - additionalVmPatch = new AdditionalOsPatch(prop.Value.GetString()); + additionalVmPatch = new SqlVmAdditionalOsPatch(prop.Value.GetString()); continue; } if (prop.NameEquals("virtualMachineIdentitySettings"u8)) @@ -376,7 +376,7 @@ internal static SqlVirtualMachineProperties DeserializeSqlVirtualMachineProperti { continue; } - virtualMachineIdentitySettings = VirtualMachineIdentity.DeserializeVirtualMachineIdentity(prop.Value, options); + virtualMachineIdentitySettings = SqlVmIdentity.DeserializeSqlVmIdentity(prop.Value, options); continue; } if (prop.NameEquals("osType"u8)) @@ -385,7 +385,7 @@ internal static SqlVirtualMachineProperties DeserializeSqlVirtualMachineProperti { continue; } - osType = prop.Value.GetString().ToOsType(); + osType = prop.Value.GetString().ToSqlVmOsType(); continue; } if (options.Format != "W") diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs index c8f46478076c..222fc38c6b69 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs @@ -46,7 +46,7 @@ public SqlVirtualMachineProperties() /// Virtual Machine Identity details used for Sql IaaS extension configurations. /// Operating System of the current SQL Virtual Machine. /// Keeps track of any properties unknown to the library. - internal SqlVirtualMachineProperties(ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, SqlServerLicenseType? sqlServerLicenseType, SqlManagementMode? sqlManagement, LeastPrivilegeMode? leastPrivilegeMode, SqlImageSku? sqlImageSku, ResourceIdentifier sqlVmGroupResourceId, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, IPAddress windowsServerFailoverClusterStaticIP, SqlVmAutoPatchingSettings autoPatchingSettings, SqlVmAutoBackupSettings autoBackupSettings, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, SqlVmStorageConfigurationSettings storageConfigurationSettings, TroubleshootingStatus troubleshootingStatus, SqlVmAssessmentSettings assessmentSettings, bool? enableAutomaticUpgrade, AdditionalOsPatch? additionalVmPatch, VirtualMachineIdentity virtualMachineIdentitySettings, OsType? osType, IDictionary additionalBinaryDataProperties) + internal SqlVirtualMachineProperties(ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, SqlServerLicenseType? sqlServerLicenseType, SqlManagementMode? sqlManagement, LeastPrivilegeMode? leastPrivilegeMode, SqlImageSku? sqlImageSku, ResourceIdentifier sqlVmGroupResourceId, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, IPAddress windowsServerFailoverClusterStaticIP, SqlVmAutoPatchingSettings autoPatchingSettings, SqlVmAutoBackupSettings autoBackupSettings, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, SqlVmStorageConfigurationSettings storageConfigurationSettings, SqlVmTroubleshootingStatus troubleshootingStatus, SqlVmAssessmentSettings assessmentSettings, bool? enableAutomaticUpgrade, SqlVmAdditionalOsPatch? additionalVmPatch, SqlVmIdentity virtualMachineIdentitySettings, SqlVmOsType? osType, IDictionary additionalBinaryDataProperties) { VirtualMachineResourceId = virtualMachineResourceId; ProvisioningState = provisioningState; @@ -118,7 +118,7 @@ internal SqlVirtualMachineProperties(ResourceIdentifier virtualMachineResourceId public SqlVmStorageConfigurationSettings StorageConfigurationSettings { get; set; } /// Troubleshooting status. - public TroubleshootingStatus TroubleshootingStatus { get; } + public SqlVmTroubleshootingStatus TroubleshootingStatus { get; } /// SQL best practices Assessment Settings. public SqlVmAssessmentSettings AssessmentSettings { get; set; } @@ -127,12 +127,12 @@ internal SqlVirtualMachineProperties(ResourceIdentifier virtualMachineResourceId public bool? EnableAutomaticUpgrade { get; set; } /// Additional VM Patching solution enabled on the Virtual Machine. - public AdditionalOsPatch? AdditionalVmPatch { get; } + public SqlVmAdditionalOsPatch? AdditionalVmPatch { get; } /// Virtual Machine Identity details used for Sql IaaS extension configurations. - public VirtualMachineIdentity VirtualMachineIdentitySettings { get; set; } + public SqlVmIdentity VirtualMachineIdentitySettings { get; set; } /// Operating System of the current SQL Virtual Machine. - public OsType? OsType { get; } + public SqlVmOsType? OsType { get; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalOsPatch.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAdditionalOsPatch.cs similarity index 51% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalOsPatch.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAdditionalOsPatch.cs index 6aca37d234e8..9ff5f9bc0cca 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalOsPatch.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAdditionalOsPatch.cs @@ -12,17 +12,17 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Additional VM Patching solution enabled on the Virtual Machine. - public readonly partial struct AdditionalOsPatch : IEquatable + public readonly partial struct SqlVmAdditionalOsPatch : IEquatable { private readonly string _value; private const string WUValue = "WU"; private const string WUMUValue = "WUMU"; private const string WSUSValue = "WSUS"; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The value. /// is null. - public AdditionalOsPatch(string value) + public SqlVmAdditionalOsPatch(string value) { Argument.AssertNotNull(value, nameof(value)); @@ -30,38 +30,38 @@ public AdditionalOsPatch(string value) } /// Gets the WU. - public static AdditionalOsPatch WU { get; } = new AdditionalOsPatch(WUValue); + public static SqlVmAdditionalOsPatch WU { get; } = new SqlVmAdditionalOsPatch(WUValue); /// Gets the WUMU. - public static AdditionalOsPatch WUMU { get; } = new AdditionalOsPatch(WUMUValue); + public static SqlVmAdditionalOsPatch WUMU { get; } = new SqlVmAdditionalOsPatch(WUMUValue); /// Gets the WSUS. - public static AdditionalOsPatch WSUS { get; } = new AdditionalOsPatch(WSUSValue); + public static SqlVmAdditionalOsPatch WSUS { get; } = new SqlVmAdditionalOsPatch(WSUSValue); - /// Determines if two values are the same. + /// Determines if two values are the same. /// The left value to compare. /// The right value to compare. - public static bool operator ==(AdditionalOsPatch left, AdditionalOsPatch right) => left.Equals(right); + public static bool operator ==(SqlVmAdditionalOsPatch left, SqlVmAdditionalOsPatch right) => left.Equals(right); - /// Determines if two values are not the same. + /// Determines if two values are not the same. /// The left value to compare. /// The right value to compare. - public static bool operator !=(AdditionalOsPatch left, AdditionalOsPatch right) => !left.Equals(right); + public static bool operator !=(SqlVmAdditionalOsPatch left, SqlVmAdditionalOsPatch right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a string to a . /// The value. - public static implicit operator AdditionalOsPatch(string value) => new AdditionalOsPatch(value); + public static implicit operator SqlVmAdditionalOsPatch(string value) => new SqlVmAdditionalOsPatch(value); - /// Converts a string to a . + /// Converts a string to a . /// The value. - public static implicit operator AdditionalOsPatch?(string value) => value == null ? null : new AdditionalOsPatch(value); + public static implicit operator SqlVmAdditionalOsPatch?(string value) => value == null ? null : new SqlVmAdditionalOsPatch(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AdditionalOsPatch other && Equals(other); + public override bool Equals(object obj) => obj is SqlVmAdditionalOsPatch other && Equals(other); /// - public bool Equals(AdditionalOsPatch other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(SqlVmAdditionalOsPatch other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalVmPatch.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAdditionalVmPatch.cs similarity index 51% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalVmPatch.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAdditionalVmPatch.cs index 0aa259a2d7a5..accd96481da3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalVmPatch.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAdditionalVmPatch.cs @@ -12,16 +12,16 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Additional Patch to be enable or enabled on the SQL Virtual Machine. - public readonly partial struct AdditionalVmPatch : IEquatable + public readonly partial struct SqlVmAdditionalVmPatch : IEquatable { private readonly string _value; private const string NotSetValue = "NotSet"; private const string MicrosoftUpdateValue = "MicrosoftUpdate"; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The value. /// is null. - public AdditionalVmPatch(string value) + public SqlVmAdditionalVmPatch(string value) { Argument.AssertNotNull(value, nameof(value)); @@ -29,35 +29,35 @@ public AdditionalVmPatch(string value) } /// Gets the NotSet. - public static AdditionalVmPatch NotSet { get; } = new AdditionalVmPatch(NotSetValue); + public static SqlVmAdditionalVmPatch NotSet { get; } = new SqlVmAdditionalVmPatch(NotSetValue); /// Gets the MicrosoftUpdate. - public static AdditionalVmPatch MicrosoftUpdate { get; } = new AdditionalVmPatch(MicrosoftUpdateValue); + public static SqlVmAdditionalVmPatch MicrosoftUpdate { get; } = new SqlVmAdditionalVmPatch(MicrosoftUpdateValue); - /// Determines if two values are the same. + /// Determines if two values are the same. /// The left value to compare. /// The right value to compare. - public static bool operator ==(AdditionalVmPatch left, AdditionalVmPatch right) => left.Equals(right); + public static bool operator ==(SqlVmAdditionalVmPatch left, SqlVmAdditionalVmPatch right) => left.Equals(right); - /// Determines if two values are not the same. + /// Determines if two values are not the same. /// The left value to compare. /// The right value to compare. - public static bool operator !=(AdditionalVmPatch left, AdditionalVmPatch right) => !left.Equals(right); + public static bool operator !=(SqlVmAdditionalVmPatch left, SqlVmAdditionalVmPatch right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a string to a . /// The value. - public static implicit operator AdditionalVmPatch(string value) => new AdditionalVmPatch(value); + public static implicit operator SqlVmAdditionalVmPatch(string value) => new SqlVmAdditionalVmPatch(value); - /// Converts a string to a . + /// Converts a string to a . /// The value. - public static implicit operator AdditionalVmPatch?(string value) => value == null ? null : new AdditionalVmPatch(value); + public static implicit operator SqlVmAdditionalVmPatch?(string value) => value == null ? null : new SqlVmAdditionalVmPatch(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AdditionalVmPatch other && Equals(other); + public override bool Equals(object obj) => obj is SqlVmAdditionalVmPatch other && Equals(other); /// - public bool Equals(AdditionalVmPatch other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(SqlVmAdditionalVmPatch other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs index 818de96678dc..29a8e62ea3a3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs @@ -105,7 +105,7 @@ internal static SqlVmAutoPatchingSettings DeserializeSqlVmAutoPatchingSettings(J SqlVmAutoPatchingDayOfWeek? dayOfWeek = default; int? maintenanceWindowStartingHour = default; int? maintenanceWindowDurationInMinutes = default; - AdditionalVmPatch? additionalVmPatch = default; + SqlVmAdditionalVmPatch? additionalVmPatch = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -151,7 +151,7 @@ internal static SqlVmAutoPatchingSettings DeserializeSqlVmAutoPatchingSettings(J { continue; } - additionalVmPatch = new AdditionalVmPatch(prop.Value.GetString()); + additionalVmPatch = new SqlVmAdditionalVmPatch(prop.Value.GetString()); continue; } if (options.Format != "W") diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.cs index b847f647a3f3..2d804a0274ce 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.cs @@ -28,7 +28,7 @@ public SqlVmAutoPatchingSettings() /// Duration of patching. /// Additional Patch to be enable or enabled on the SQL Virtual Machine. /// Keeps track of any properties unknown to the library. - internal SqlVmAutoPatchingSettings(bool? isEnabled, SqlVmAutoPatchingDayOfWeek? dayOfWeek, int? maintenanceWindowStartingHour, int? maintenanceWindowDurationInMinutes, AdditionalVmPatch? additionalVmPatch, IDictionary additionalBinaryDataProperties) + internal SqlVmAutoPatchingSettings(bool? isEnabled, SqlVmAutoPatchingDayOfWeek? dayOfWeek, int? maintenanceWindowStartingHour, int? maintenanceWindowDurationInMinutes, SqlVmAdditionalVmPatch? additionalVmPatch, IDictionary additionalBinaryDataProperties) { IsEnabled = isEnabled; DayOfWeek = dayOfWeek; @@ -51,6 +51,6 @@ internal SqlVmAutoPatchingSettings(bool? isEnabled, SqlVmAutoPatchingDayOfWeek? public int? MaintenanceWindowDurationInMinutes { get; set; } /// Additional Patch to be enable or enabled on the SQL Virtual Machine. - public AdditionalVmPatch? AdditionalVmPatch { get; set; } + public SqlVmAdditionalVmPatch? AdditionalVmPatch { get; set; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmIdentity.Serialization.cs similarity index 69% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmIdentity.Serialization.cs index 1616631a74f7..9f992591124d 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmIdentity.Serialization.cs @@ -15,11 +15,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Virtual Machine Identity details used for Sql IaaS extension configurations. - public partial class VirtualMachineIdentity : IJsonModel + public partial class SqlVmIdentity : IJsonModel { /// The JSON writer. /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -30,10 +30,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(VirtualMachineIdentity)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SqlVmIdentity)} does not support writing '{format}' format."); } if (Optional.IsDefined(Type)) { @@ -64,30 +64,30 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit /// The JSON reader. /// The client options for reading and writing models. - VirtualMachineIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + SqlVmIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); /// The JSON reader. /// The client options for reading and writing models. - protected virtual VirtualMachineIdentity JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual SqlVmIdentity JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(VirtualMachineIdentity)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SqlVmIdentity)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVirtualMachineIdentity(document.RootElement, options); + return DeserializeSqlVmIdentity(document.RootElement, options); } /// The JSON element to deserialize. /// The client options for reading and writing models. - internal static VirtualMachineIdentity DeserializeVirtualMachineIdentity(JsonElement element, ModelReaderWriterOptions options) + internal static SqlVmIdentity DeserializeSqlVmIdentity(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - VmIdentityType? @type = default; + SqlVmVmIdentityType? @type = default; ResourceIdentifier resourceId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -98,7 +98,7 @@ internal static VirtualMachineIdentity DeserializeVirtualMachineIdentity(JsonEle { continue; } - @type = new VmIdentityType(prop.Value.GetString()); + @type = new SqlVmVmIdentityType(prop.Value.GetString()); continue; } if (prop.NameEquals("resourceId"u8)) @@ -115,47 +115,47 @@ internal static VirtualMachineIdentity DeserializeVirtualMachineIdentity(JsonEle additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new VirtualMachineIdentity(@type, resourceId, additionalBinaryDataProperties); + return new SqlVmIdentity(@type, resourceId, additionalBinaryDataProperties); } /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); /// The client options for reading and writing models. protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); default: - throw new FormatException($"The model {nameof(VirtualMachineIdentity)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVmIdentity)} does not support writing '{options.Format}' format."); } } /// The data to parse. /// The client options for reading and writing models. - VirtualMachineIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + SqlVmIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); /// The data to parse. /// The client options for reading and writing models. - protected virtual VirtualMachineIdentity PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual SqlVmIdentity PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - return DeserializeVirtualMachineIdentity(document.RootElement, options); + return DeserializeSqlVmIdentity(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(VirtualMachineIdentity)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVmIdentity)} does not support reading '{options.Format}' format."); } } /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmIdentity.cs similarity index 74% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmIdentity.cs index 64872c62ba6d..9ef15e40a2f0 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmIdentity.cs @@ -12,21 +12,21 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Virtual Machine Identity details used for Sql IaaS extension configurations. - public partial class VirtualMachineIdentity + public partial class SqlVmIdentity { /// Keeps track of any properties unknown to the library. private protected readonly IDictionary _additionalBinaryDataProperties; - /// Initializes a new instance of . - public VirtualMachineIdentity() + /// Initializes a new instance of . + public SqlVmIdentity() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Identity type of the virtual machine. Specify None to opt-out of Managed Identities. /// ARM Resource Id of the identity. Only required when UserAssigned identity is selected. /// Keeps track of any properties unknown to the library. - internal VirtualMachineIdentity(VmIdentityType? @type, ResourceIdentifier resourceId, IDictionary additionalBinaryDataProperties) + internal SqlVmIdentity(SqlVmVmIdentityType? @type, ResourceIdentifier resourceId, IDictionary additionalBinaryDataProperties) { Type = @type; ResourceId = resourceId; @@ -34,7 +34,7 @@ internal VirtualMachineIdentity(VmIdentityType? @type, ResourceIdentifier resour } /// Identity type of the virtual machine. Specify None to opt-out of Managed Identities. - public VmIdentityType? Type { get; set; } + public SqlVmVmIdentityType? Type { get; set; } /// ARM Resource Id of the identity. Only required when UserAssigned identity is selected. public ResourceIdentifier ResourceId { get; set; } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.Serialization.cs similarity index 73% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.Serialization.cs index e7093ffbd829..192443ba07f5 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.Serialization.cs @@ -14,11 +14,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Display metadata associated with the operation. - public partial class OperationDisplay : IJsonModel + public partial class SqlVmOperationDisplay : IJsonModel { /// The JSON writer. /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -29,10 +29,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(OperationDisplay)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SqlVmOperationDisplay)} does not support writing '{format}' format."); } if (options.Format != "W" && Optional.IsDefined(Provider)) { @@ -73,24 +73,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit /// The JSON reader. /// The client options for reading and writing models. - OperationDisplay IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + SqlVmOperationDisplay IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); /// The JSON reader. /// The client options for reading and writing models. - protected virtual OperationDisplay JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual SqlVmOperationDisplay JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(OperationDisplay)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SqlVmOperationDisplay)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOperationDisplay(document.RootElement, options); + return DeserializeSqlVmOperationDisplay(document.RootElement, options); } /// The JSON element to deserialize. /// The client options for reading and writing models. - internal static OperationDisplay DeserializeOperationDisplay(JsonElement element, ModelReaderWriterOptions options) + internal static SqlVmOperationDisplay DeserializeSqlVmOperationDisplay(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { @@ -128,47 +128,47 @@ internal static OperationDisplay DeserializeOperationDisplay(JsonElement element additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new OperationDisplay(provider, resource, operation, description, additionalBinaryDataProperties); + return new SqlVmOperationDisplay(provider, resource, operation, description, additionalBinaryDataProperties); } /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); /// The client options for reading and writing models. protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); default: - throw new FormatException($"The model {nameof(OperationDisplay)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVmOperationDisplay)} does not support writing '{options.Format}' format."); } } /// The data to parse. /// The client options for reading and writing models. - OperationDisplay IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + SqlVmOperationDisplay IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); /// The data to parse. /// The client options for reading and writing models. - protected virtual OperationDisplay PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual SqlVmOperationDisplay PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - return DeserializeOperationDisplay(document.RootElement, options); + return DeserializeSqlVmOperationDisplay(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(OperationDisplay)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVmOperationDisplay)} does not support reading '{options.Format}' format."); } } /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.cs similarity index 83% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.cs index 8b35e4e4e973..6e7757200adf 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.cs @@ -11,23 +11,23 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Display metadata associated with the operation. - public partial class OperationDisplay + public partial class SqlVmOperationDisplay { /// Keeps track of any properties unknown to the library. private protected readonly IDictionary _additionalBinaryDataProperties; - /// Initializes a new instance of . - internal OperationDisplay() + /// Initializes a new instance of . + internal SqlVmOperationDisplay() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. /// Keeps track of any properties unknown to the library. - internal OperationDisplay(string provider, string resource, string operation, string description, IDictionary additionalBinaryDataProperties) + internal SqlVmOperationDisplay(string provider, string resource, string operation, string description, IDictionary additionalBinaryDataProperties) { Provider = provider; Resource = resource; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationOrigin.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationOrigin.cs similarity index 51% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationOrigin.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationOrigin.cs index 3ac59257f7a3..31e98b870727 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationOrigin.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationOrigin.cs @@ -12,16 +12,16 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// The intended executor of the operation. - public readonly partial struct OperationOrigin : IEquatable + public readonly partial struct SqlVmOperationOrigin : IEquatable { private readonly string _value; private const string UserValue = "user"; private const string SystemValue = "system"; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The value. /// is null. - public OperationOrigin(string value) + public SqlVmOperationOrigin(string value) { Argument.AssertNotNull(value, nameof(value)); @@ -29,35 +29,35 @@ public OperationOrigin(string value) } /// Gets the User. - public static OperationOrigin User { get; } = new OperationOrigin(UserValue); + public static SqlVmOperationOrigin User { get; } = new SqlVmOperationOrigin(UserValue); /// Gets the System. - public static OperationOrigin System { get; } = new OperationOrigin(SystemValue); + public static SqlVmOperationOrigin System { get; } = new SqlVmOperationOrigin(SystemValue); - /// Determines if two values are the same. + /// Determines if two values are the same. /// The left value to compare. /// The right value to compare. - public static bool operator ==(OperationOrigin left, OperationOrigin right) => left.Equals(right); + public static bool operator ==(SqlVmOperationOrigin left, SqlVmOperationOrigin right) => left.Equals(right); - /// Determines if two values are not the same. + /// Determines if two values are not the same. /// The left value to compare. /// The right value to compare. - public static bool operator !=(OperationOrigin left, OperationOrigin right) => !left.Equals(right); + public static bool operator !=(SqlVmOperationOrigin left, SqlVmOperationOrigin right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a string to a . /// The value. - public static implicit operator OperationOrigin(string value) => new OperationOrigin(value); + public static implicit operator SqlVmOperationOrigin(string value) => new SqlVmOperationOrigin(value); - /// Converts a string to a . + /// Converts a string to a . /// The value. - public static implicit operator OperationOrigin?(string value) => value == null ? null : new OperationOrigin(value); + public static implicit operator SqlVmOperationOrigin?(string value) => value == null ? null : new SqlVmOperationOrigin(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OperationOrigin other && Equals(other); + public override bool Equals(object obj) => obj is SqlVmOperationOrigin other && Equals(other); /// - public bool Equals(OperationOrigin other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(SqlVmOperationOrigin other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOsType.Serialization.cs similarity index 61% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOsType.Serialization.cs index f99166b81af7..38d95468f1a5 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOsType.Serialization.cs @@ -9,28 +9,28 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - internal static partial class OsTypeExtensions + internal static partial class SqlVmOsTypeExtensions { /// The value to serialize. - public static string ToSerialString(this OsType value) => value switch + public static string ToSerialString(this SqlVmOsType value) => value switch { - OsType.Windows => "Windows", - OsType.Linux => "Linux", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown OsType value.") + SqlVmOsType.Windows => "Windows", + SqlVmOsType.Linux => "Linux", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SqlVmOsType value.") }; /// The value to deserialize. - public static OsType ToOsType(this string value) + public static SqlVmOsType ToSqlVmOsType(this string value) { if (StringComparer.OrdinalIgnoreCase.Equals(value, "Windows")) { - return OsType.Windows; + return SqlVmOsType.Windows; } if (StringComparer.OrdinalIgnoreCase.Equals(value, "Linux")) { - return OsType.Linux; + return SqlVmOsType.Linux; } - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown OsType value."); + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SqlVmOsType value."); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOsType.cs similarity index 93% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOsType.cs index 3de8ee88cc28..0dcb83361354 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OsType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOsType.cs @@ -8,7 +8,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Operating System of the current SQL Virtual Machine. - public enum OsType + public enum SqlVmOsType { /// Windows. Windows, diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.Serialization.cs index b2a5349317f4..77ae35a89296 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.Serialization.cs @@ -105,7 +105,7 @@ internal static SqlVmTroubleshooting DeserializeSqlVmTroubleshooting(JsonElement } DateTimeOffset? startTimeUtc = default; DateTimeOffset? endTimeUtc = default; - TroubleshootingScenario? troubleshootingScenario = default; + SqlVmTroubleshootingScenario? troubleshootingScenario = default; TroubleshootingAdditionalProperties properties = default; string virtualMachineResourceId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -135,7 +135,7 @@ internal static SqlVmTroubleshooting DeserializeSqlVmTroubleshooting(JsonElement { continue; } - troubleshootingScenario = new TroubleshootingScenario(prop.Value.GetString()); + troubleshootingScenario = new SqlVmTroubleshootingScenario(prop.Value.GetString()); continue; } if (prop.NameEquals("properties"u8)) diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.cs index 126bf65342a0..577cfb325fea 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.cs @@ -28,7 +28,7 @@ public SqlVmTroubleshooting() /// Troubleshooting properties. /// Virtual machine resource id for response. /// Keeps track of any properties unknown to the library. - internal SqlVmTroubleshooting(DateTimeOffset? startTimeUtc, DateTimeOffset? endTimeUtc, TroubleshootingScenario? troubleshootingScenario, TroubleshootingAdditionalProperties properties, string virtualMachineResourceId, IDictionary additionalBinaryDataProperties) + internal SqlVmTroubleshooting(DateTimeOffset? startTimeUtc, DateTimeOffset? endTimeUtc, SqlVmTroubleshootingScenario? troubleshootingScenario, TroubleshootingAdditionalProperties properties, string virtualMachineResourceId, IDictionary additionalBinaryDataProperties) { StartTimeUtc = startTimeUtc; EndTimeUtc = endTimeUtc; @@ -45,7 +45,7 @@ internal SqlVmTroubleshooting(DateTimeOffset? startTimeUtc, DateTimeOffset? endT public DateTimeOffset? EndTimeUtc { get; set; } /// SQL VM troubleshooting scenario. - public TroubleshootingScenario? TroubleshootingScenario { get; set; } + public SqlVmTroubleshootingScenario? TroubleshootingScenario { get; set; } /// Troubleshooting properties. internal TroubleshootingAdditionalProperties Properties { get; set; } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshootingScenario.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshootingScenario.cs new file mode 100644 index 000000000000..22711dc109d0 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshootingScenario.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.ResourceManager.SqlVirtualMachine; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// SQL VM troubleshooting scenario. + public readonly partial struct SqlVmTroubleshootingScenario : IEquatable + { + private readonly string _value; + private const string UnhealthyReplicaValue = "UnhealthyReplica"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public SqlVmTroubleshootingScenario(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Gets the UnhealthyReplica. + public static SqlVmTroubleshootingScenario UnhealthyReplica { get; } = new SqlVmTroubleshootingScenario(UnhealthyReplicaValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(SqlVmTroubleshootingScenario left, SqlVmTroubleshootingScenario right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(SqlVmTroubleshootingScenario left, SqlVmTroubleshootingScenario right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmTroubleshootingScenario(string value) => new SqlVmTroubleshootingScenario(value); + + /// Converts a string to a . + /// The value. + public static implicit operator SqlVmTroubleshootingScenario?(string value) => value == null ? null : new SqlVmTroubleshootingScenario(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SqlVmTroubleshootingScenario other && Equals(other); + + /// + public bool Equals(SqlVmTroubleshootingScenario other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + + /// + public override string ToString() => _value; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshootingStatus.Serialization.cs similarity index 76% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshootingStatus.Serialization.cs index 6c8599536a75..e1b0d5a743fd 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshootingStatus.Serialization.cs @@ -14,11 +14,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Status of last troubleshooting operation on this SQL VM. - public partial class TroubleshootingStatus : IJsonModel + public partial class SqlVmTroubleshootingStatus : IJsonModel { /// The JSON writer. /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -29,10 +29,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(TroubleshootingStatus)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(SqlVmTroubleshootingStatus)} does not support writing '{format}' format."); } if (options.Format != "W" && Optional.IsDefined(RootCause)) { @@ -83,24 +83,24 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit /// The JSON reader. /// The client options for reading and writing models. - TroubleshootingStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + SqlVmTroubleshootingStatus IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); /// The JSON reader. /// The client options for reading and writing models. - protected virtual TroubleshootingStatus JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual SqlVmTroubleshootingStatus JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(TroubleshootingStatus)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(SqlVmTroubleshootingStatus)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeTroubleshootingStatus(document.RootElement, options); + return DeserializeSqlVmTroubleshootingStatus(document.RootElement, options); } /// The JSON element to deserialize. /// The client options for reading and writing models. - internal static TroubleshootingStatus DeserializeTroubleshootingStatus(JsonElement element, ModelReaderWriterOptions options) + internal static SqlVmTroubleshootingStatus DeserializeSqlVmTroubleshootingStatus(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { @@ -110,7 +110,7 @@ internal static TroubleshootingStatus DeserializeTroubleshootingStatus(JsonEleme DateTimeOffset? lastTriggerTimeUtc = default; DateTimeOffset? startTimeUtc = default; DateTimeOffset? endTimeUtc = default; - TroubleshootingScenario? troubleshootingScenario = default; + SqlVmTroubleshootingScenario? troubleshootingScenario = default; TroubleshootingAdditionalProperties properties = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) @@ -153,7 +153,7 @@ internal static TroubleshootingStatus DeserializeTroubleshootingStatus(JsonEleme { continue; } - troubleshootingScenario = new TroubleshootingScenario(prop.Value.GetString()); + troubleshootingScenario = new SqlVmTroubleshootingScenario(prop.Value.GetString()); continue; } if (prop.NameEquals("properties"u8)) @@ -170,7 +170,7 @@ internal static TroubleshootingStatus DeserializeTroubleshootingStatus(JsonEleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new TroubleshootingStatus( + return new SqlVmTroubleshootingStatus( rootCause, lastTriggerTimeUtc, startTimeUtc, @@ -181,43 +181,43 @@ internal static TroubleshootingStatus DeserializeTroubleshootingStatus(JsonEleme } /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); /// The client options for reading and writing models. protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); default: - throw new FormatException($"The model {nameof(TroubleshootingStatus)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVmTroubleshootingStatus)} does not support writing '{options.Format}' format."); } } /// The data to parse. /// The client options for reading and writing models. - TroubleshootingStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + SqlVmTroubleshootingStatus IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); /// The data to parse. /// The client options for reading and writing models. - protected virtual TroubleshootingStatus PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual SqlVmTroubleshootingStatus PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - return DeserializeTroubleshootingStatus(document.RootElement, options); + return DeserializeSqlVmTroubleshootingStatus(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(TroubleshootingStatus)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVmTroubleshootingStatus)} does not support reading '{options.Format}' format."); } } /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshootingStatus.cs similarity index 77% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshootingStatus.cs index d6b4d1a6a704..53666e40e78c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshootingStatus.cs @@ -11,17 +11,17 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Status of last troubleshooting operation on this SQL VM. - public partial class TroubleshootingStatus + public partial class SqlVmTroubleshootingStatus { /// Keeps track of any properties unknown to the library. private protected readonly IDictionary _additionalBinaryDataProperties; - /// Initializes a new instance of . - internal TroubleshootingStatus() + /// Initializes a new instance of . + internal SqlVmTroubleshootingStatus() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Root cause of the issue. /// Last troubleshooting trigger time in UTC timezone. /// Start time in UTC timezone. @@ -29,7 +29,7 @@ internal TroubleshootingStatus() /// SQL VM troubleshooting scenario. /// Troubleshooting properties. /// Keeps track of any properties unknown to the library. - internal TroubleshootingStatus(string rootCause, DateTimeOffset? lastTriggerTimeUtc, DateTimeOffset? startTimeUtc, DateTimeOffset? endTimeUtc, TroubleshootingScenario? troubleshootingScenario, TroubleshootingAdditionalProperties properties, IDictionary additionalBinaryDataProperties) + internal SqlVmTroubleshootingStatus(string rootCause, DateTimeOffset? lastTriggerTimeUtc, DateTimeOffset? startTimeUtc, DateTimeOffset? endTimeUtc, SqlVmTroubleshootingScenario? troubleshootingScenario, TroubleshootingAdditionalProperties properties, IDictionary additionalBinaryDataProperties) { RootCause = rootCause; LastTriggerTimeUtc = lastTriggerTimeUtc; @@ -53,7 +53,7 @@ internal TroubleshootingStatus(string rootCause, DateTimeOffset? lastTriggerTime public DateTimeOffset? EndTimeUtc { get; } /// SQL VM troubleshooting scenario. - public TroubleshootingScenario? TroubleshootingScenario { get; } + public SqlVmTroubleshootingScenario? TroubleshootingScenario { get; } /// Troubleshooting properties. internal TroubleshootingAdditionalProperties Properties { get; } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VmIdentityType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmVmIdentityType.cs similarity index 52% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VmIdentityType.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmVmIdentityType.cs index 7b611d6a7622..9f135a8c73bf 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VmIdentityType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmVmIdentityType.cs @@ -12,17 +12,17 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Identity type of the virtual machine. Specify None to opt-out of Managed Identities. - public readonly partial struct VmIdentityType : IEquatable + public readonly partial struct SqlVmVmIdentityType : IEquatable { private readonly string _value; private const string NoneValue = "None"; private const string SystemAssignedValue = "SystemAssigned"; private const string UserAssignedValue = "UserAssigned"; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The value. /// is null. - public VmIdentityType(string value) + public SqlVmVmIdentityType(string value) { Argument.AssertNotNull(value, nameof(value)); @@ -30,38 +30,38 @@ public VmIdentityType(string value) } /// Gets the None. - public static VmIdentityType None { get; } = new VmIdentityType(NoneValue); + public static SqlVmVmIdentityType None { get; } = new SqlVmVmIdentityType(NoneValue); /// Gets the SystemAssigned. - public static VmIdentityType SystemAssigned { get; } = new VmIdentityType(SystemAssignedValue); + public static SqlVmVmIdentityType SystemAssigned { get; } = new SqlVmVmIdentityType(SystemAssignedValue); /// Gets the UserAssigned. - public static VmIdentityType UserAssigned { get; } = new VmIdentityType(UserAssignedValue); + public static SqlVmVmIdentityType UserAssigned { get; } = new SqlVmVmIdentityType(UserAssignedValue); - /// Determines if two values are the same. + /// Determines if two values are the same. /// The left value to compare. /// The right value to compare. - public static bool operator ==(VmIdentityType left, VmIdentityType right) => left.Equals(right); + public static bool operator ==(SqlVmVmIdentityType left, SqlVmVmIdentityType right) => left.Equals(right); - /// Determines if two values are not the same. + /// Determines if two values are not the same. /// The left value to compare. /// The right value to compare. - public static bool operator !=(VmIdentityType left, VmIdentityType right) => !left.Equals(right); + public static bool operator !=(SqlVmVmIdentityType left, SqlVmVmIdentityType right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a string to a . /// The value. - public static implicit operator VmIdentityType(string value) => new VmIdentityType(value); + public static implicit operator SqlVmVmIdentityType(string value) => new SqlVmVmIdentityType(value); - /// Converts a string to a . + /// Converts a string to a . /// The value. - public static implicit operator VmIdentityType?(string value) => value == null ? null : new VmIdentityType(value); + public static implicit operator SqlVmVmIdentityType?(string value) => value == null ? null : new SqlVmVmIdentityType(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VmIdentityType other && Equals(other); + public override bool Equals(object obj) => obj is SqlVmVmIdentityType other && Equals(other); /// - public bool Equals(VmIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(SqlVmVmIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingScenario.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingScenario.cs deleted file mode 100644 index 2bc0e94c5049..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingScenario.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using Azure.ResourceManager.SqlVirtualMachine; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// SQL VM troubleshooting scenario. - public readonly partial struct TroubleshootingScenario : IEquatable - { - private readonly string _value; - private const string UnhealthyReplicaValue = "UnhealthyReplica"; - - /// Initializes a new instance of . - /// The value. - /// is null. - public TroubleshootingScenario(string value) - { - Argument.AssertNotNull(value, nameof(value)); - - _value = value; - } - - /// Gets the UnhealthyReplica. - public static TroubleshootingScenario UnhealthyReplica { get; } = new TroubleshootingScenario(UnhealthyReplicaValue); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(TroubleshootingScenario left, TroubleshootingScenario right) => left.Equals(right); - - /// Determines if two values are not the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator !=(TroubleshootingScenario left, TroubleshootingScenario right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator TroubleshootingScenario(string value) => new TroubleshootingScenario(value); - - /// Converts a string to a . - /// The value. - public static implicit operator TroubleshootingScenario?(string value) => value == null ? null : new TroubleshootingScenario(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TroubleshootingScenario other && Equals(other); - - /// - public bool Equals(TroubleshootingScenario other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - - /// - public override string ToString() => _value; - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs index c0a0ba2b4d8d..10df6ef87db6 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs @@ -41,7 +41,7 @@ internal AvailabilityGroupListeners(ClientDiagnostics clientDiagnostics, HttpPip /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, string expand, RequestContext context) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, string expand, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -50,7 +50,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVirtualMachineGroupName, true); + uri.AppendPath(sqlVmGroupName, true); uri.AppendPath("/availabilityGroupListeners/", false); uri.AppendPath(availabilityGroupListenerName, true); uri.AppendQuery("api-version", _apiVersion, true); @@ -66,7 +66,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, RequestContent content, RequestContext context) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, RequestContent content, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -75,7 +75,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVirtualMachineGroupName, true); + uri.AppendPath(sqlVmGroupName, true); uri.AppendPath("/availabilityGroupListeners/", false); uri.AppendPath(availabilityGroupListenerName, true); uri.AppendQuery("api-version", _apiVersion, true); @@ -89,7 +89,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, RequestContext context) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -98,7 +98,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVirtualMachineGroupName, true); + uri.AppendPath(sqlVmGroupName, true); uri.AppendPath("/availabilityGroupListeners/", false); uri.AppendPath(availabilityGroupListenerName, true); uri.AppendQuery("api-version", _apiVersion, true); @@ -109,7 +109,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - internal HttpMessage CreateGetByGroupRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) + internal HttpMessage CreateGetByGroupRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -118,7 +118,7 @@ internal HttpMessage CreateGetByGroupRequest(string subscriptionId, string resou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVirtualMachineGroupName, true); + uri.AppendPath(sqlVmGroupName, true); uri.AppendPath("/availabilityGroupListeners", false); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); @@ -129,7 +129,7 @@ internal HttpMessage CreateGetByGroupRequest(string subscriptionId, string resou return message; } - internal HttpMessage CreateNextGetByGroupRequest(Uri nextPage, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) + internal HttpMessage CreateNextGetByGroupRequest(Uri nextPage, string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(nextPage); diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs index 50ca51962d3b..354651fdcd07 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs @@ -41,7 +41,7 @@ internal SqlVirtualMachineGroups(ClientDiagnostics clientDiagnostics, HttpPipeli /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -50,7 +50,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVirtualMachineGroupName, true); + uri.AppendPath(sqlVmGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; @@ -60,7 +60,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContent content, RequestContext context) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContent content, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -69,7 +69,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVirtualMachineGroupName, true); + uri.AppendPath(sqlVmGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; @@ -81,7 +81,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContent content, RequestContext context) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContent content, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -90,7 +90,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVirtualMachineGroupName, true); + uri.AppendPath(sqlVmGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; @@ -102,7 +102,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -111,7 +111,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVirtualMachineGroupName, true); + uri.AppendPath(sqlVmGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineTroubleshootRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineTroubleshootRestOperations.cs index d4b7fccc0f40..ed2b2ee818dd 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineTroubleshootRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineTroubleshootRestOperations.cs @@ -41,7 +41,7 @@ internal SqlVirtualMachineTroubleshoot(ClientDiagnostics clientDiagnostics, Http /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } - internal HttpMessage CreateTroubleshootRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContent content, RequestContext context) + internal HttpMessage CreateTroubleshootRequest(string subscriptionId, string resourceGroupName, string sqlVmName, RequestContent content, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -50,7 +50,7 @@ internal HttpMessage CreateTroubleshootRequest(string subscriptionId, string res uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath(sqlVmName, true); uri.AppendPath("/troubleshoot", false); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs index a9e6de3fcfab..badcd208dbdb 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs @@ -41,7 +41,7 @@ internal SqlVirtualMachines(ClientDiagnostics clientDiagnostics, HttpPipeline pi /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, string expand, RequestContext context) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVmName, string expand, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -50,7 +50,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath(sqlVmName, true); uri.AppendQuery("api-version", _apiVersion, true); if (expand != null) { @@ -64,7 +64,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContent content, RequestContext context) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmName, RequestContent content, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -73,7 +73,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath(sqlVmName, true); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; @@ -85,7 +85,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r return message; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContent content, RequestContext context) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmName, RequestContent content, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -94,7 +94,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath(sqlVmName, true); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; @@ -106,7 +106,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContext context) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVmName, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -115,7 +115,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath(sqlVmName, true); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; @@ -182,7 +182,7 @@ internal HttpMessage CreateNextGetAllRequest(Uri nextPage, string subscriptionId return message; } - internal HttpMessage CreateStartAssessmentRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContext context) + internal HttpMessage CreateStartAssessmentRequest(string subscriptionId, string resourceGroupName, string sqlVmName, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -191,7 +191,7 @@ internal HttpMessage CreateStartAssessmentRequest(string subscriptionId, string uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath(sqlVmName, true); uri.AppendPath("/startAssessment", false); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); @@ -201,7 +201,7 @@ internal HttpMessage CreateStartAssessmentRequest(string subscriptionId, string return message; } - internal HttpMessage CreateFetchDCAssessmentRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContent content, RequestContext context) + internal HttpMessage CreateFetchDCAssessmentRequest(string subscriptionId, string resourceGroupName, string sqlVmName, RequestContent content, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -210,7 +210,7 @@ internal HttpMessage CreateFetchDCAssessmentRequest(string subscriptionId, strin uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath(sqlVmName, true); uri.AppendPath("/fetchDCAssessment", false); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); @@ -222,7 +222,7 @@ internal HttpMessage CreateFetchDCAssessmentRequest(string subscriptionId, strin return message; } - internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, RequestContext context) + internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourceGroupName, string sqlVmName, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -231,7 +231,7 @@ internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourc uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); - uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath(sqlVmName, true); uri.AppendPath("/redeploy", false); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); @@ -241,7 +241,7 @@ internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourc return message; } - internal HttpMessage CreateGetSqlVmsBySqlVmGroupRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) + internal HttpMessage CreateGetSqlVmsBySqlVmGroupRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -250,7 +250,7 @@ internal HttpMessage CreateGetSqlVmsBySqlVmGroupRequest(string subscriptionId, s uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/", false); - uri.AppendPath(sqlVirtualMachineGroupName, true); + uri.AppendPath(sqlVmGroupName, true); uri.AppendPath("/sqlVirtualMachines", false); uri.AppendQuery("api-version", _apiVersion, true); HttpMessage message = Pipeline.CreateMessage(); @@ -261,7 +261,7 @@ internal HttpMessage CreateGetSqlVmsBySqlVmGroupRequest(string subscriptionId, s return message; } - internal HttpMessage CreateNextGetSqlVmsBySqlVmGroupRequest(Uri nextPage, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, RequestContext context) + internal HttpMessage CreateNextGetSqlVmsBySqlVmGroupRequest(Uri nextPage, string subscriptionId, string resourceGroupName, string sqlVmGroupName, RequestContext context) { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(nextPage); diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs index 0e9858e521a2..09f62c890400 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs @@ -77,14 +77,14 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The SQL virtual machine. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sqlVirtualMachineName, SqlVmData data, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sqlVmName, SqlVmData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); Argument.AssertNotNull(data, nameof(data)); using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.CreateOrUpdate"); @@ -95,7 +95,7 @@ public virtual async Task> CreateOrUpdateAsync(WaitU { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachinesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, SqlVmData.ToRequestContent(data), context); + HttpMessage message = _sqlVirtualMachinesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, SqlVmData.ToRequestContent(data), context); Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( new SqlVmOperationSource(Client), @@ -135,14 +135,14 @@ public virtual async Task> CreateOrUpdateAsync(WaitU /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The SQL virtual machine. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sqlVirtualMachineName, SqlVmData data, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sqlVmName, SqlVmData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); Argument.AssertNotNull(data, nameof(data)); using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.CreateOrUpdate"); @@ -153,7 +153,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachinesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, SqlVmData.ToRequestContent(data), context); + HttpMessage message = _sqlVirtualMachinesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, SqlVmData.ToRequestContent(data), context); Response response = Pipeline.ProcessMessage(message, context); SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( new SqlVmOperationSource(Client), @@ -192,14 +192,14 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetAsync(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetAsync(string sqlVmName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Get"); scope.Start(); @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string sqlVirtualMac { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, context); Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); Response response = Response.FromValue(SqlVmData.FromResponse(result), result); if (response.Value == null) @@ -242,14 +242,14 @@ public virtual async Task> GetAsync(string sqlVirtualMac /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response Get(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Get(string sqlVmName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Get"); scope.Start(); @@ -259,7 +259,7 @@ public virtual Response Get(string sqlVirtualMachineName, string { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, context); Response result = Pipeline.ProcessMessage(message, context); Response response = Response.FromValue(SqlVmData.FromResponse(result), result); if (response.Value == null) @@ -348,14 +348,14 @@ public virtual Pageable GetAll(CancellationToken cancellationToke /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> ExistsAsync(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> ExistsAsync(string sqlVmName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Exists"); scope.Start(); @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string sqlVirtualMachineNa { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, context); await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); Response result = message.Response; Response response = default; @@ -406,14 +406,14 @@ public virtual async Task> ExistsAsync(string sqlVirtualMachineNa /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response Exists(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Exists(string sqlVmName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Exists"); scope.Start(); @@ -423,7 +423,7 @@ public virtual Response Exists(string sqlVirtualMachineName, string expand { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, context); Pipeline.Send(message, context.CancellationToken); Response result = message.Response; Response response = default; @@ -464,14 +464,14 @@ public virtual Response Exists(string sqlVirtualMachineName, string expand /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetIfExistsAsync(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetIfExistsAsync(string sqlVmName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.GetIfExists"); scope.Start(); @@ -481,7 +481,7 @@ public virtual async Task> GetIfExistsAsync(stri { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, context); await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); Response result = message.Response; Response response = default; @@ -526,14 +526,14 @@ public virtual async Task> GetIfExistsAsync(stri /// /// /// - /// Name of the SQL virtual machine. + /// Name of the SQL virtual machine. /// The child resources to include in the response. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual NullableResponse GetIfExists(string sqlVirtualMachineName, string expand = default, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual NullableResponse GetIfExists(string sqlVmName, string expand = default, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.GetIfExists"); scope.Start(); @@ -543,7 +543,7 @@ public virtual NullableResponse GetIfExists(string sqlVirtualMach { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, context); + HttpMessage message = _sqlVirtualMachinesRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, context); Pipeline.Send(message, context.CancellationToken); Response result = message.Response; Response response = default; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.Serialization.cs index 410c5a94560e..ab492c6b2424 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.Serialization.cs @@ -89,6 +89,7 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW IDictionary tags = default; AzureLocation location = default; SqlVirtualMachineProperties properties = default; + string sqlVmName = default; ManagedServiceIdentity identity = default; foreach (var prop in element.EnumerateObject()) { @@ -182,6 +183,7 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW tags ?? new ChangeTrackingDictionary(), location, properties, + sqlVmName, identity); } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs index 0bff59c3c784..d490a5a6567c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs @@ -35,17 +35,22 @@ public SqlVmData(AzureLocation location) : base(location) /// Resource tags. /// The geo-location where the resource lives. /// Resource properties. + /// Name of the SQL virtual machine. /// DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server. - internal SqlVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, SqlVirtualMachineProperties properties, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) + internal SqlVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, SqlVirtualMachineProperties properties, string sqlVmName, ManagedServiceIdentity identity) : base(id, name, resourceType, systemData, tags, location) { _additionalBinaryDataProperties = additionalBinaryDataProperties; Properties = properties; + SqlVmName = sqlVmName; Identity = identity; } /// Resource properties. internal SqlVirtualMachineProperties Properties { get; set; } + /// Name of the SQL virtual machine. + public string SqlVmName { get; } + /// DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server. public ManagedServiceIdentity Identity { get; set; } @@ -297,7 +302,7 @@ public SqlVmStorageConfigurationSettings StorageConfigurationSettings } /// Troubleshooting status. - public TroubleshootingStatus TroubleshootingStatus + public SqlVmTroubleshootingStatus TroubleshootingStatus { get { @@ -340,7 +345,7 @@ public bool? EnableAutomaticUpgrade } /// Additional VM Patching solution enabled on the Virtual Machine. - public AdditionalOsPatch? AdditionalVmPatch + public SqlVmAdditionalOsPatch? AdditionalVmPatch { get { @@ -349,7 +354,7 @@ public AdditionalOsPatch? AdditionalVmPatch } /// Virtual Machine Identity details used for Sql IaaS extension configurations. - public VirtualMachineIdentity VirtualMachineIdentitySettings + public SqlVmIdentity VirtualMachineIdentitySettings { get { @@ -366,7 +371,7 @@ public VirtualMachineIdentity VirtualMachineIdentitySettings } /// Operating System of the current SQL Virtual Machine. - public OsType? OsType + public SqlVmOsType? OsType { get { diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupCollection.cs index 84c829f10336..0f6c7f29dd27 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupCollection.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupCollection.cs @@ -77,14 +77,14 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The SQL virtual machine group. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sqlVirtualMachineGroupName, SqlVmGroupData data, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sqlVmGroupName, SqlVmGroupData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); Argument.AssertNotNull(data, nameof(data)); using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.CreateOrUpdate"); @@ -95,7 +95,7 @@ public virtual async Task> CreateOrUpdateAsync( { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, SqlVmGroupData.ToRequestContent(data), context); + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, SqlVmGroupData.ToRequestContent(data), context); Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( new SqlVmGroupOperationSource(Client), @@ -135,14 +135,14 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The SQL virtual machine group. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sqlVirtualMachineGroupName, SqlVmGroupData data, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sqlVmGroupName, SqlVmGroupData data, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); Argument.AssertNotNull(data, nameof(data)); using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.CreateOrUpdate"); @@ -153,7 +153,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, SqlVmGroupData.ToRequestContent(data), context); + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, SqlVmGroupData.ToRequestContent(data), context); Response response = Pipeline.ProcessMessage(message, context); SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( new SqlVmGroupOperationSource(Client), @@ -192,13 +192,13 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetAsync(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetAsync(string sqlVmGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Get"); scope.Start(); @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string sqlVirtu { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, context); Response result = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); if (response.Value == null) @@ -241,13 +241,13 @@ public virtual async Task> GetAsync(string sqlVirtu /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response Get(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Get(string sqlVmGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Get"); scope.Start(); @@ -257,7 +257,7 @@ public virtual Response Get(string sqlVirtualMachineGroupNam { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, context); Response result = Pipeline.ProcessMessage(message, context); Response response = Response.FromValue(SqlVmGroupData.FromResponse(result), result); if (response.Value == null) @@ -346,13 +346,13 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> ExistsAsync(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> ExistsAsync(string sqlVmGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Exists"); scope.Start(); @@ -362,7 +362,7 @@ public virtual async Task> ExistsAsync(string sqlVirtualMachineGr { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, context); await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); Response result = message.Response; Response response = default; @@ -403,13 +403,13 @@ public virtual async Task> ExistsAsync(string sqlVirtualMachineGr /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response Exists(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual Response Exists(string sqlVmGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.Exists"); scope.Start(); @@ -419,7 +419,7 @@ public virtual Response Exists(string sqlVirtualMachineGroupName, Cancella { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, context); Pipeline.Send(message, context.CancellationToken); Response result = message.Response; Response response = default; @@ -460,13 +460,13 @@ public virtual Response Exists(string sqlVirtualMachineGroupName, Cancella /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetIfExistsAsync(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual async Task> GetIfExistsAsync(string sqlVmGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.GetIfExists"); scope.Start(); @@ -476,7 +476,7 @@ public virtual async Task> GetIfExistsAsync { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, context); await Pipeline.SendAsync(message, context.CancellationToken).ConfigureAwait(false); Response result = message.Response; Response response = default; @@ -521,13 +521,13 @@ public virtual async Task> GetIfExistsAsync /// /// /// - /// Name of the SQL virtual machine group. + /// Name of the SQL virtual machine group. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual NullableResponse GetIfExists(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public virtual NullableResponse GetIfExists(string sqlVmGroupName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupCollection.GetIfExists"); scope.Start(); @@ -537,7 +537,7 @@ public virtual NullableResponse GetIfExists(string sqlVirtua { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, context); + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateGetRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, context); Pipeline.Send(message, context.CancellationToken); Response result = message.Response; Response response = default; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.Serialization.cs index 1d19069956d0..39049d49db3b 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.Serialization.cs @@ -84,6 +84,7 @@ internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, Mo IDictionary tags = default; AzureLocation location = default; SqlVirtualMachineGroupProperties properties = default; + string sqlVmGroupName = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("id"u8)) @@ -166,7 +167,8 @@ internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, Mo additionalBinaryDataProperties, tags ?? new ChangeTrackingDictionary(), location, - properties); + properties, + sqlVmGroupName); } /// The client options for reading and writing models. diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs index 99b5d65f9bb1..8e2ff68eeedf 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs @@ -34,15 +34,20 @@ public SqlVmGroupData(AzureLocation location) : base(location) /// Resource tags. /// The geo-location where the resource lives. /// Resource properties. - internal SqlVmGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, SqlVirtualMachineGroupProperties properties) : base(id, name, resourceType, systemData, tags, location) + /// Name of the SQL virtual machine group. + internal SqlVmGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary additionalBinaryDataProperties, IDictionary tags, AzureLocation location, SqlVirtualMachineGroupProperties properties, string sqlVmGroupName) : base(id, name, resourceType, systemData, tags, location) { _additionalBinaryDataProperties = additionalBinaryDataProperties; Properties = properties; + SqlVmGroupName = sqlVmGroupName; } /// Resource properties. internal SqlVirtualMachineGroupProperties Properties { get; set; } + /// Name of the SQL virtual machine group. + public string SqlVmGroupName { get; } + /// Provisioning state to track the async operation status. public string ProvisioningState { diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs index 151812b61d00..e43ca16adda9 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs @@ -215,12 +215,12 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The SQL virtual machine group. + /// The SQL virtual machine group. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlVmGroupPatch sqlVmGroupPatch, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlVmGroupPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(sqlVmGroupPatch, nameof(sqlVmGroupPatch)); + Argument.AssertNotNull(patch, nameof(patch)); using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Update"); scope.Start(); @@ -230,7 +230,7 @@ public virtual async Task> UpdateAsync(WaitUnti { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmGroupPatch.ToRequestContent(sqlVmGroupPatch), context); + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmGroupPatch.ToRequestContent(patch), context); Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( new SqlVmGroupOperationSource(Client), @@ -274,12 +274,12 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The SQL virtual machine group. + /// The SQL virtual machine group. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmGroupPatch sqlVmGroupPatch, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmGroupPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(sqlVmGroupPatch, nameof(sqlVmGroupPatch)); + Argument.AssertNotNull(patch, nameof(patch)); using DiagnosticScope scope = _sqlVirtualMachineGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Update"); scope.Start(); @@ -289,7 +289,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SqlV { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmGroupPatch.ToRequestContent(sqlVmGroupPatch), context); + HttpMessage message = _sqlVirtualMachineGroupsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmGroupPatch.ToRequestContent(patch), context); Response response = Pipeline.ProcessMessage(message, context); SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( new SqlVmGroupOperationSource(Client), diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs index c4cfe1337a20..46fcc0d43dde 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs @@ -217,12 +217,12 @@ public virtual Response Get(string expand = default, Cancellation /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The SQL virtual machine. + /// The SQL virtual machine. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlVmPatch sqlVmPatch, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlVmPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(sqlVmPatch, nameof(sqlVmPatch)); + Argument.AssertNotNull(patch, nameof(patch)); using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Update"); scope.Start(); @@ -232,7 +232,7 @@ public virtual async Task> UpdateAsync(WaitUntil wai { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachinesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmPatch.ToRequestContent(sqlVmPatch), context); + HttpMessage message = _sqlVirtualMachinesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmPatch.ToRequestContent(patch), context); Response response = await Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( new SqlVmOperationSource(Client), @@ -276,12 +276,12 @@ public virtual async Task> UpdateAsync(WaitUntil wai /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The SQL virtual machine. + /// The SQL virtual machine. /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmPatch sqlVmPatch, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmPatch patch, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(sqlVmPatch, nameof(sqlVmPatch)); + Argument.AssertNotNull(patch, nameof(patch)); using DiagnosticScope scope = _sqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Update"); scope.Start(); @@ -291,7 +291,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmPatc { CancellationToken = cancellationToken }; - HttpMessage message = _sqlVirtualMachinesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmPatch.ToRequestContent(sqlVmPatch), context); + HttpMessage message = _sqlVirtualMachinesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, SqlVmPatch.ToRequestContent(patch), context); Response response = Pipeline.ProcessMessage(message, context); SqlVirtualMachineArmOperation operation = new SqlVirtualMachineArmOperation( new SqlVmOperationSource(Client), diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml index 54032c2a6dcf..0c1c0682ad5c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/SqlVirtualMachine -commit: 113b466bf76cd86da547beee5300d2ef5210cfb3 +commit: 246fd84cacd497050166bc43d751b3b84a193539 repo: Azure/azure-rest-api-specs emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json" diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tspCodeModel.json b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tspCodeModel.json deleted file mode 100644 index 79efc70a979c..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tspCodeModel.json +++ /dev/null @@ -1,27279 +0,0 @@ -{ - "name": "Azure.ResourceManager.SqlVirtualMachine", - "apiVersions": [ - "2023-10-01" - ], - "enums": [ - { - "$id": "1", - "kind": "enum", - "name": "OperationOrigin", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationOrigin", - "valueType": { - "$id": "2", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "3", - "kind": "enumvalue", - "name": "user", - "value": "user", - "valueType": { - "$ref": "2" - }, - "enumType": { - "$ref": "1" - }, - "decorators": [] - }, - { - "$id": "4", - "kind": "enumvalue", - "name": "system", - "value": "system", - "valueType": { - "$ref": "2" - }, - "enumType": { - "$ref": "1" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "The intended executor of the operation.", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", - "decorators": [] - }, - { - "$id": "5", - "kind": "enum", - "name": "AvailabilityGroupReplicaRole", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Role", - "valueType": { - "$id": "6", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "7", - "kind": "enumvalue", - "name": "Primary", - "value": "Primary", - "valueType": { - "$ref": "6" - }, - "enumType": { - "$ref": "5" - }, - "decorators": [] - }, - { - "$id": "8", - "kind": "enumvalue", - "name": "Secondary", - "value": "Secondary", - "valueType": { - "$ref": "6" - }, - "enumType": { - "$ref": "5" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Replica Role in availability group.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "9", - "kind": "enum", - "name": "AvailabilityGroupReplicaCommitMode", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Commit", - "valueType": { - "$id": "10", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "11", - "kind": "enumvalue", - "name": "Synchronous_Commit", - "value": "Synchronous_Commit", - "valueType": { - "$ref": "10" - }, - "enumType": { - "$ref": "9" - }, - "decorators": [] - }, - { - "$id": "12", - "kind": "enumvalue", - "name": "Asynchronous_Commit", - "value": "Asynchronous_Commit", - "valueType": { - "$ref": "10" - }, - "enumType": { - "$ref": "9" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Replica commit mode in availability group.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "13", - "kind": "enum", - "name": "AvailabilityGroupReplicaFailoverMode", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Failover", - "valueType": { - "$id": "14", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "15", - "kind": "enumvalue", - "name": "Automatic", - "value": "Automatic", - "valueType": { - "$ref": "14" - }, - "enumType": { - "$ref": "13" - }, - "decorators": [] - }, - { - "$id": "16", - "kind": "enumvalue", - "name": "Manual", - "value": "Manual", - "valueType": { - "$ref": "14" - }, - "enumType": { - "$ref": "13" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Replica failover mode in availability group.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "17", - "kind": "enum", - "name": "ReadableSecondaryMode", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ReadableSecondary", - "valueType": { - "$id": "18", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "19", - "kind": "enumvalue", - "name": "No", - "value": "No", - "valueType": { - "$ref": "18" - }, - "enumType": { - "$ref": "17" - }, - "decorators": [] - }, - { - "$id": "20", - "kind": "enumvalue", - "name": "All", - "value": "All", - "valueType": { - "$ref": "18" - }, - "enumType": { - "$ref": "17" - }, - "decorators": [] - }, - { - "$id": "21", - "kind": "enumvalue", - "name": "Read_Only", - "value": "Read_Only", - "valueType": { - "$ref": "18" - }, - "enumType": { - "$ref": "17" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Replica readable secondary mode in availability group.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "22", - "kind": "enum", - "name": "createdByType", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.createdByType", - "valueType": { - "$id": "23", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "24", - "kind": "enumvalue", - "name": "User", - "value": "User", - "valueType": { - "$ref": "23" - }, - "enumType": { - "$ref": "22" - }, - "doc": "The entity was created by a user.", - "decorators": [] - }, - { - "$id": "25", - "kind": "enumvalue", - "name": "Application", - "value": "Application", - "valueType": { - "$ref": "23" - }, - "enumType": { - "$ref": "22" - }, - "doc": "The entity was created by an application.", - "decorators": [] - }, - { - "$id": "26", - "kind": "enumvalue", - "name": "ManagedIdentity", - "value": "ManagedIdentity", - "valueType": { - "$ref": "23" - }, - "enumType": { - "$ref": "22" - }, - "doc": "The entity was created by a managed identity.", - "decorators": [] - }, - { - "$id": "27", - "kind": "enumvalue", - "name": "Key", - "value": "Key", - "valueType": { - "$ref": "23" - }, - "enumType": { - "$ref": "22" - }, - "doc": "The entity was created by a key.", - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "The kind of entity that created the resource.", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "28", - "kind": "enum", - "name": "ResourceProvisioningState", - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceProvisioningState", - "valueType": { - "$id": "29", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "30", - "kind": "enumvalue", - "name": "Succeeded", - "value": "Succeeded", - "valueType": { - "$ref": "29" - }, - "enumType": { - "$ref": "28" - }, - "doc": "Resource has been created.", - "decorators": [] - }, - { - "$id": "31", - "kind": "enumvalue", - "name": "Failed", - "value": "Failed", - "valueType": { - "$ref": "29" - }, - "enumType": { - "$ref": "28" - }, - "doc": "Resource creation failed.", - "decorators": [] - }, - { - "$id": "32", - "kind": "enumvalue", - "name": "Canceled", - "value": "Canceled", - "valueType": { - "$ref": "29" - }, - "enumType": { - "$ref": "28" - }, - "doc": "Resource creation was canceled.", - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "The provisioning state of a resource type.", - "isFixed": false, - "isFlags": false, - "usage": "LroPolling", - "decorators": [] - }, - { - "$id": "33", - "kind": "enum", - "name": "SqlServerLicenseType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlServerLicenseType", - "valueType": { - "$id": "34", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "35", - "kind": "enumvalue", - "name": "Payg", - "value": "PAYG", - "valueType": { - "$ref": "34" - }, - "enumType": { - "$ref": "33" - }, - "decorators": [] - }, - { - "$id": "36", - "kind": "enumvalue", - "name": "Ahub", - "value": "AHUB", - "valueType": { - "$ref": "34" - }, - "enumType": { - "$ref": "33" - }, - "decorators": [] - }, - { - "$id": "37", - "kind": "enumvalue", - "name": "DR", - "value": "DR", - "valueType": { - "$ref": "34" - }, - "enumType": { - "$ref": "33" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "SQL Server license type.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "38", - "kind": "enum", - "name": "SqlManagementMode", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlManagementMode", - "valueType": { - "$id": "39", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "40", - "kind": "enumvalue", - "name": "Full", - "value": "Full", - "valueType": { - "$ref": "39" - }, - "enumType": { - "$ref": "38" - }, - "decorators": [] - }, - { - "$id": "41", - "kind": "enumvalue", - "name": "LightWeight", - "value": "LightWeight", - "valueType": { - "$ref": "39" - }, - "enumType": { - "$ref": "38" - }, - "decorators": [] - }, - { - "$id": "42", - "kind": "enumvalue", - "name": "NoAgent", - "value": "NoAgent", - "valueType": { - "$ref": "39" - }, - "enumType": { - "$ref": "38" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "43", - "kind": "enum", - "name": "LeastPrivilegeMode", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LeastPrivilegeMode", - "valueType": { - "$id": "44", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "45", - "kind": "enumvalue", - "name": "Enabled", - "value": "Enabled", - "valueType": { - "$ref": "44" - }, - "enumType": { - "$ref": "43" - }, - "decorators": [] - }, - { - "$id": "46", - "kind": "enumvalue", - "name": "NotSet", - "value": "NotSet", - "valueType": { - "$ref": "44" - }, - "enumType": { - "$ref": "43" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "SQL IaaS Agent least privilege mode.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "47", - "kind": "enum", - "name": "SqlImageSku", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlImageSku", - "valueType": { - "$id": "48", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "49", - "kind": "enumvalue", - "name": "Developer", - "value": "Developer", - "valueType": { - "$ref": "48" - }, - "enumType": { - "$ref": "47" - }, - "decorators": [] - }, - { - "$id": "50", - "kind": "enumvalue", - "name": "Express", - "value": "Express", - "valueType": { - "$ref": "48" - }, - "enumType": { - "$ref": "47" - }, - "decorators": [] - }, - { - "$id": "51", - "kind": "enumvalue", - "name": "Standard", - "value": "Standard", - "valueType": { - "$ref": "48" - }, - "enumType": { - "$ref": "47" - }, - "decorators": [] - }, - { - "$id": "52", - "kind": "enumvalue", - "name": "Enterprise", - "value": "Enterprise", - "valueType": { - "$ref": "48" - }, - "enumType": { - "$ref": "47" - }, - "decorators": [] - }, - { - "$id": "53", - "kind": "enumvalue", - "name": "Web", - "value": "Web", - "valueType": { - "$ref": "48" - }, - "enumType": { - "$ref": "47" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "SQL Server edition type.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "54", - "kind": "enum", - "name": "SqlVmAutoPatchingDayOfWeek", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.DayOfWeek", - "valueType": { - "$id": "55", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "56", - "kind": "enumvalue", - "name": "Everyday", - "value": "Everyday", - "valueType": { - "$ref": "55" - }, - "enumType": { - "$ref": "54" - }, - "decorators": [] - }, - { - "$id": "57", - "kind": "enumvalue", - "name": "Monday", - "value": "Monday", - "valueType": { - "$ref": "55" - }, - "enumType": { - "$ref": "54" - }, - "decorators": [] - }, - { - "$id": "58", - "kind": "enumvalue", - "name": "Tuesday", - "value": "Tuesday", - "valueType": { - "$ref": "55" - }, - "enumType": { - "$ref": "54" - }, - "decorators": [] - }, - { - "$id": "59", - "kind": "enumvalue", - "name": "Wednesday", - "value": "Wednesday", - "valueType": { - "$ref": "55" - }, - "enumType": { - "$ref": "54" - }, - "decorators": [] - }, - { - "$id": "60", - "kind": "enumvalue", - "name": "Thursday", - "value": "Thursday", - "valueType": { - "$ref": "55" - }, - "enumType": { - "$ref": "54" - }, - "decorators": [] - }, - { - "$id": "61", - "kind": "enumvalue", - "name": "Friday", - "value": "Friday", - "valueType": { - "$ref": "55" - }, - "enumType": { - "$ref": "54" - }, - "decorators": [] - }, - { - "$id": "62", - "kind": "enumvalue", - "name": "Saturday", - "value": "Saturday", - "valueType": { - "$ref": "55" - }, - "enumType": { - "$ref": "54" - }, - "decorators": [] - }, - { - "$id": "63", - "kind": "enumvalue", - "name": "Sunday", - "value": "Sunday", - "valueType": { - "$ref": "55" - }, - "enumType": { - "$ref": "54" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Day of week to apply the patch on.", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "64", - "kind": "enum", - "name": "AdditionalVmPatch", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AdditionalVmPatch", - "valueType": { - "$id": "65", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "66", - "kind": "enumvalue", - "name": "NotSet", - "value": "NotSet", - "valueType": { - "$ref": "65" - }, - "enumType": { - "$ref": "64" - }, - "decorators": [] - }, - { - "$id": "67", - "kind": "enumvalue", - "name": "MicrosoftUpdate", - "value": "MicrosoftUpdate", - "valueType": { - "$ref": "65" - }, - "enumType": { - "$ref": "64" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Additional Patch to be enable or enabled on the SQL Virtual Machine.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "68", - "kind": "enum", - "name": "SqVmBackupScheduleType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.BackupScheduleType", - "valueType": { - "$id": "69", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "70", - "kind": "enumvalue", - "name": "Manual", - "value": "Manual", - "valueType": { - "$ref": "69" - }, - "enumType": { - "$ref": "68" - }, - "decorators": [] - }, - { - "$id": "71", - "kind": "enumvalue", - "name": "Automated", - "value": "Automated", - "valueType": { - "$ref": "69" - }, - "enumType": { - "$ref": "68" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Backup schedule type.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "72", - "kind": "enum", - "name": "SqlVmFullBackupFrequency", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.FullBackupFrequencyType", - "valueType": { - "$id": "73", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "74", - "kind": "enumvalue", - "name": "Daily", - "value": "Daily", - "valueType": { - "$ref": "73" - }, - "enumType": { - "$ref": "72" - }, - "decorators": [] - }, - { - "$id": "75", - "kind": "enumvalue", - "name": "Weekly", - "value": "Weekly", - "valueType": { - "$ref": "73" - }, - "enumType": { - "$ref": "72" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Frequency of full backups. In both cases, full backups begin during the next scheduled time window.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "76", - "kind": "enum", - "name": "SqlVmAutoBackupDayOfWeek", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupDaysOfWeek", - "valueType": { - "$id": "77", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "78", - "kind": "enumvalue", - "name": "Monday", - "value": "Monday", - "valueType": { - "$ref": "77" - }, - "enumType": { - "$ref": "76" - }, - "decorators": [] - }, - { - "$id": "79", - "kind": "enumvalue", - "name": "Tuesday", - "value": "Tuesday", - "valueType": { - "$ref": "77" - }, - "enumType": { - "$ref": "76" - }, - "decorators": [] - }, - { - "$id": "80", - "kind": "enumvalue", - "name": "Wednesday", - "value": "Wednesday", - "valueType": { - "$ref": "77" - }, - "enumType": { - "$ref": "76" - }, - "decorators": [] - }, - { - "$id": "81", - "kind": "enumvalue", - "name": "Thursday", - "value": "Thursday", - "valueType": { - "$ref": "77" - }, - "enumType": { - "$ref": "76" - }, - "decorators": [] - }, - { - "$id": "82", - "kind": "enumvalue", - "name": "Friday", - "value": "Friday", - "valueType": { - "$ref": "77" - }, - "enumType": { - "$ref": "76" - }, - "decorators": [] - }, - { - "$id": "83", - "kind": "enumvalue", - "name": "Saturday", - "value": "Saturday", - "valueType": { - "$ref": "77" - }, - "enumType": { - "$ref": "76" - }, - "decorators": [] - }, - { - "$id": "84", - "kind": "enumvalue", - "name": "Sunday", - "value": "Sunday", - "valueType": { - "$ref": "77" - }, - "enumType": { - "$ref": "76" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "85", - "kind": "enum", - "name": "SqlServerConnectivityType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ConnectivityType", - "valueType": { - "$id": "86", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "87", - "kind": "enumvalue", - "name": "Local", - "value": "LOCAL", - "valueType": { - "$ref": "86" - }, - "enumType": { - "$ref": "85" - }, - "decorators": [] - }, - { - "$id": "88", - "kind": "enumvalue", - "name": "Private", - "value": "PRIVATE", - "valueType": { - "$ref": "86" - }, - "enumType": { - "$ref": "85" - }, - "decorators": [] - }, - { - "$id": "89", - "kind": "enumvalue", - "name": "Public", - "value": "PUBLIC", - "valueType": { - "$ref": "86" - }, - "enumType": { - "$ref": "85" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "SQL Server connectivity option.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "90", - "kind": "enum", - "name": "SqlWorkloadType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlWorkloadType", - "valueType": { - "$id": "91", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "92", - "kind": "enumvalue", - "name": "General", - "value": "GENERAL", - "valueType": { - "$ref": "91" - }, - "enumType": { - "$ref": "90" - }, - "decorators": [] - }, - { - "$id": "93", - "kind": "enumvalue", - "name": "Oltp", - "value": "OLTP", - "valueType": { - "$ref": "91" - }, - "enumType": { - "$ref": "90" - }, - "decorators": [] - }, - { - "$id": "94", - "kind": "enumvalue", - "name": "DW", - "value": "DW", - "valueType": { - "$ref": "91" - }, - "enumType": { - "$ref": "90" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "SQL Server workload type.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "95", - "kind": "enum", - "name": "SqlVmDiskConfigurationType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.DiskConfigurationType", - "valueType": { - "$id": "96", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "97", - "kind": "enumvalue", - "name": "New", - "value": "NEW", - "valueType": { - "$ref": "96" - }, - "enumType": { - "$ref": "95" - }, - "decorators": [] - }, - { - "$id": "98", - "kind": "enumvalue", - "name": "Extend", - "value": "EXTEND", - "valueType": { - "$ref": "96" - }, - "enumType": { - "$ref": "95" - }, - "decorators": [] - }, - { - "$id": "99", - "kind": "enumvalue", - "name": "Add", - "value": "ADD", - "valueType": { - "$ref": "96" - }, - "enumType": { - "$ref": "95" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Disk configuration to apply to SQL Server.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "100", - "kind": "enum", - "name": "SqlVmStorageWorkloadType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageWorkloadType", - "valueType": { - "$id": "101", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "102", - "kind": "enumvalue", - "name": "General", - "value": "GENERAL", - "valueType": { - "$ref": "101" - }, - "enumType": { - "$ref": "100" - }, - "decorators": [] - }, - { - "$id": "103", - "kind": "enumvalue", - "name": "Oltp", - "value": "OLTP", - "valueType": { - "$ref": "101" - }, - "enumType": { - "$ref": "100" - }, - "decorators": [] - }, - { - "$id": "104", - "kind": "enumvalue", - "name": "DW", - "value": "DW", - "valueType": { - "$ref": "101" - }, - "enumType": { - "$ref": "100" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Storage workload type.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "105", - "kind": "enum", - "name": "TroubleshootingScenario", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingScenario", - "valueType": { - "$id": "106", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "107", - "kind": "enumvalue", - "name": "UnhealthyReplica", - "value": "UnhealthyReplica", - "valueType": { - "$ref": "106" - }, - "enumType": { - "$ref": "105" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "SQL VM troubleshooting scenario.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "108", - "kind": "enum", - "name": "SqlVmAssessmentDayOfWeek", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AssessmentDayOfWeek", - "valueType": { - "$id": "109", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "110", - "kind": "enumvalue", - "name": "Monday", - "value": "Monday", - "valueType": { - "$ref": "109" - }, - "enumType": { - "$ref": "108" - }, - "decorators": [] - }, - { - "$id": "111", - "kind": "enumvalue", - "name": "Tuesday", - "value": "Tuesday", - "valueType": { - "$ref": "109" - }, - "enumType": { - "$ref": "108" - }, - "decorators": [] - }, - { - "$id": "112", - "kind": "enumvalue", - "name": "Wednesday", - "value": "Wednesday", - "valueType": { - "$ref": "109" - }, - "enumType": { - "$ref": "108" - }, - "decorators": [] - }, - { - "$id": "113", - "kind": "enumvalue", - "name": "Thursday", - "value": "Thursday", - "valueType": { - "$ref": "109" - }, - "enumType": { - "$ref": "108" - }, - "decorators": [] - }, - { - "$id": "114", - "kind": "enumvalue", - "name": "Friday", - "value": "Friday", - "valueType": { - "$ref": "109" - }, - "enumType": { - "$ref": "108" - }, - "decorators": [] - }, - { - "$id": "115", - "kind": "enumvalue", - "name": "Saturday", - "value": "Saturday", - "valueType": { - "$ref": "109" - }, - "enumType": { - "$ref": "108" - }, - "decorators": [] - }, - { - "$id": "116", - "kind": "enumvalue", - "name": "Sunday", - "value": "Sunday", - "valueType": { - "$ref": "109" - }, - "enumType": { - "$ref": "108" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Day of the week to run assessment.", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "117", - "kind": "enum", - "name": "AdditionalOsPatch", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AdditionalOsPatch", - "valueType": { - "$id": "118", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "119", - "kind": "enumvalue", - "name": "WU", - "value": "WU", - "valueType": { - "$ref": "118" - }, - "enumType": { - "$ref": "117" - }, - "decorators": [] - }, - { - "$id": "120", - "kind": "enumvalue", - "name": "WUMU", - "value": "WUMU", - "valueType": { - "$ref": "118" - }, - "enumType": { - "$ref": "117" - }, - "decorators": [] - }, - { - "$id": "121", - "kind": "enumvalue", - "name": "WSUS", - "value": "WSUS", - "valueType": { - "$ref": "118" - }, - "enumType": { - "$ref": "117" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Additional VM Patching solution enabled on the Virtual Machine", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "122", - "kind": "enum", - "name": "VmIdentityType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.VmIdentityType", - "valueType": { - "$id": "123", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "124", - "kind": "enumvalue", - "name": "None", - "value": "None", - "valueType": { - "$ref": "123" - }, - "enumType": { - "$ref": "122" - }, - "decorators": [] - }, - { - "$id": "125", - "kind": "enumvalue", - "name": "SystemAssigned", - "value": "SystemAssigned", - "valueType": { - "$ref": "123" - }, - "enumType": { - "$ref": "122" - }, - "decorators": [] - }, - { - "$id": "126", - "kind": "enumvalue", - "name": "UserAssigned", - "value": "UserAssigned", - "valueType": { - "$ref": "123" - }, - "enumType": { - "$ref": "122" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Identity type of the virtual machine. Specify None to opt-out of Managed Identities.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "127", - "kind": "enum", - "name": "OsType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OsType", - "valueType": { - "$id": "128", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "129", - "kind": "enumvalue", - "name": "Windows", - "value": "Windows", - "valueType": { - "$ref": "128" - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - }, - { - "$id": "130", - "kind": "enumvalue", - "name": "Linux", - "value": "Linux", - "valueType": { - "$ref": "128" - }, - "enumType": { - "$ref": "127" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Operating System of the current SQL Virtual Machine.", - "isFixed": true, - "isFlags": false, - "usage": "Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "131", - "kind": "enum", - "name": "ManagedServiceIdentityType", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", - "valueType": { - "$id": "132", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "133", - "kind": "enumvalue", - "name": "None", - "value": "None", - "valueType": { - "$ref": "132" - }, - "enumType": { - "$ref": "131" - }, - "doc": "No managed identity.", - "decorators": [] - }, - { - "$id": "134", - "kind": "enumvalue", - "name": "SystemAssigned", - "value": "SystemAssigned", - "valueType": { - "$ref": "132" - }, - "enumType": { - "$ref": "131" - }, - "doc": "System assigned managed identity.", - "decorators": [] - }, - { - "$id": "135", - "kind": "enumvalue", - "name": "UserAssigned", - "value": "UserAssigned", - "valueType": { - "$ref": "132" - }, - "enumType": { - "$ref": "131" - }, - "doc": "User assigned managed identity.", - "decorators": [] - }, - { - "$id": "136", - "kind": "enumvalue", - "name": "SystemAssigned,UserAssigned", - "value": "SystemAssigned,UserAssigned", - "valueType": { - "$ref": "132" - }, - "enumType": { - "$ref": "131" - }, - "doc": "System and user assigned managed identity.", - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "137", - "kind": "enum", - "name": "SqlVmGroupImageSku", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmGroupImageSku", - "valueType": { - "$id": "138", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "139", - "kind": "enumvalue", - "name": "Developer", - "value": "Developer", - "valueType": { - "$ref": "138" - }, - "enumType": { - "$ref": "137" - }, - "decorators": [] - }, - { - "$id": "140", - "kind": "enumvalue", - "name": "Enterprise", - "value": "Enterprise", - "valueType": { - "$ref": "138" - }, - "enumType": { - "$ref": "137" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "SQL image sku.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "141", - "kind": "enum", - "name": "SqlVmGroupScaleType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ScaleType", - "valueType": { - "$id": "142", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "143", - "kind": "enumvalue", - "name": "HA", - "value": "HA", - "valueType": { - "$ref": "142" - }, - "enumType": { - "$ref": "141" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Scale type.", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "144", - "kind": "enum", - "name": "SqlVmClusterManagerType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ClusterManagerType", - "valueType": { - "$id": "145", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "146", - "kind": "enumvalue", - "name": "WindowsServerFailoverCluster", - "value": "WSFC", - "valueType": { - "$ref": "145" - }, - "enumType": { - "$ref": "144" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type.", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "147", - "kind": "enum", - "name": "SqlVmClusterConfiguration", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ClusterConfiguration", - "valueType": { - "$id": "148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "149", - "kind": "enumvalue", - "name": "Domainful", - "value": "Domainful", - "valueType": { - "$ref": "148" - }, - "enumType": { - "$ref": "147" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Cluster type.", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "150", - "kind": "enum", - "name": "SqlVmClusterSubnetType", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ClusterSubnetType", - "valueType": { - "$id": "151", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "152", - "kind": "enumvalue", - "name": "SingleSubnet", - "value": "SingleSubnet", - "valueType": { - "$ref": "151" - }, - "enumType": { - "$ref": "150" - }, - "decorators": [] - }, - { - "$id": "153", - "kind": "enumvalue", - "name": "MultiSubnet", - "value": "MultiSubnet", - "valueType": { - "$ref": "151" - }, - "enumType": { - "$ref": "150" - }, - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "Cluster subnet type.", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "decorators": [] - }, - { - "$id": "154", - "kind": "enum", - "name": "Versions", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Versions", - "valueType": { - "$id": "155", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "156", - "kind": "enumvalue", - "name": "v2023_10_01", - "value": "2023-10-01", - "valueType": { - "$ref": "155" - }, - "enumType": { - "$ref": "154" - }, - "doc": "The 2023-10-01 API version.", - "decorators": [] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "The available API versions.", - "isFixed": true, - "isFlags": false, - "usage": "ApiVersionEnum", - "decorators": [] - } - ], - "constants": [ - { - "$id": "157", - "kind": "constant", - "name": "listContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "158", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "159", - "kind": "constant", - "name": "getContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "160", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "161", - "kind": "constant", - "name": "createOrUpdateContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "162", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "163", - "kind": "constant", - "name": "createOrUpdateContentType1", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "164", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "165", - "kind": "constant", - "name": "createOrUpdateContentType2", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "166", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "167", - "kind": "constant", - "name": "createOrUpdateContentType3", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "168", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "169", - "kind": "constant", - "name": "listByGroupContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "170", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "171", - "kind": "constant", - "name": "getContentType1", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "172", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "173", - "kind": "constant", - "name": "createOrUpdateContentType4", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "174", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "175", - "kind": "constant", - "name": "createOrUpdateContentType5", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "176", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "177", - "kind": "constant", - "name": "createOrUpdateContentType6", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "178", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "179", - "kind": "constant", - "name": "createOrUpdateContentType7", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "180", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "181", - "kind": "constant", - "name": "updateContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "182", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "183", - "kind": "constant", - "name": "updateContentType1", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "184", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "185", - "kind": "constant", - "name": "updateContentType2", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "186", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "187", - "kind": "constant", - "name": "updateContentType3", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "188", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "189", - "kind": "constant", - "name": "listByResourceGroupContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "190", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "191", - "kind": "constant", - "name": "listContentType1", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "192", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "193", - "kind": "constant", - "name": "fetchDCAssessmentContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "194", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "195", - "kind": "constant", - "name": "fetchDCAssessmentContentType1", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "196", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "197", - "kind": "constant", - "name": "listBySqlVmGroupContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "198", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "199", - "kind": "constant", - "name": "getContentType2", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "200", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "201", - "kind": "constant", - "name": "createOrUpdateContentType8", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "202", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "203", - "kind": "constant", - "name": "createOrUpdateContentType9", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "204", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "205", - "kind": "constant", - "name": "createOrUpdateContentType10", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "206", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "207", - "kind": "constant", - "name": "createOrUpdateContentType11", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "208", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "209", - "kind": "constant", - "name": "updateContentType4", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "210", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "211", - "kind": "constant", - "name": "updateContentType5", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "212", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "213", - "kind": "constant", - "name": "updateContentType6", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "214", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "215", - "kind": "constant", - "name": "updateContentType7", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "216", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "217", - "kind": "constant", - "name": "listByResourceGroupContentType1", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "218", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "219", - "kind": "constant", - "name": "listContentType2", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "220", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "221", - "kind": "constant", - "name": "troubleshootContentType", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "222", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "223", - "kind": "constant", - "name": "troubleshootContentType1", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "224", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "225", - "kind": "constant", - "name": "troubleshootContentType2", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "226", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - }, - { - "$id": "227", - "kind": "constant", - "name": "troubleshootContentType3", - "namespace": "", - "usage": "None", - "valueType": { - "$id": "228", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] - } - ], - "models": [ - { - "$id": "229", - "kind": "model", - "name": "OperationListResult", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationListResult", - "usage": "Output,Json", - "doc": "Virtual machine resource id for response.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "230", - "kind": "property", - "name": "value", - "serializedName": "value", - "doc": "The Operation items on this page", - "type": { - "$id": "231", - "kind": "array", - "name": "ArrayOperation", - "valueType": { - "$id": "232", - "kind": "model", - "name": "Info", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation", - "usage": "Output,Json", - "doc": "Result of the request to list SQL operations.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "233", - "kind": "property", - "name": "name", - "serializedName": "name", - "doc": "The name of the operation being performed on this particular object.\"", - "type": { - "$id": "234", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation.name", - "serializationOptions": { - "json": { - "name": "name" - } - }, - "isHttpMetadata": false - }, - { - "$id": "235", - "kind": "property", - "name": "display", - "serializedName": "display", - "doc": "he localized display information for this particular operation / action.", - "type": { - "$id": "236", - "kind": "model", - "name": "OperationDisplay", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationDisplay", - "usage": "Output,Json", - "doc": "Display metadata associated with the operation.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "237", - "kind": "property", - "name": "provider", - "serializedName": "provider", - "doc": "The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\".", - "type": { - "$id": "238", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationDisplay.provider", - "serializationOptions": { - "json": { - "name": "provider" - } - }, - "isHttpMetadata": false - }, - { - "$id": "239", - "kind": "property", - "name": "resource", - "serializedName": "resource", - "doc": "The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\".", - "type": { - "$id": "240", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationDisplay.resource", - "serializationOptions": { - "json": { - "name": "resource" - } - }, - "isHttpMetadata": false - }, - { - "$id": "241", - "kind": "property", - "name": "operation", - "serializedName": "operation", - "doc": "The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\".", - "type": { - "$id": "242", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationDisplay.operation", - "serializationOptions": { - "json": { - "name": "operation" - } - }, - "isHttpMetadata": false - }, - { - "$id": "243", - "kind": "property", - "name": "description", - "serializedName": "description", - "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", - "type": { - "$id": "244", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationDisplay.description", - "serializationOptions": { - "json": { - "name": "description" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation.display", - "serializationOptions": { - "json": { - "name": "display" - } - }, - "isHttpMetadata": false - }, - { - "$id": "245", - "kind": "property", - "name": "origin", - "serializedName": "origin", - "doc": "The intended executor of the operation.\"", - "type": { - "$ref": "1" - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation.origin", - "serializationOptions": { - "json": { - "name": "origin" - } - }, - "isHttpMetadata": false - }, - { - "$id": "246", - "kind": "property", - "name": "properties", - "serializedName": "properties", - "doc": "Additional descriptions for the operation.", - "type": { - "$id": "247", - "kind": "dict", - "keyType": { - "$id": "248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "249", - "kind": "model", - "name": "OperationProperty", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation.property.anonymous", - "usage": "Output,Json", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operation.properties", - "serializationOptions": { - "json": { - "name": "properties" - } - }, - "isHttpMetadata": false - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationListResult.value", - "serializationOptions": { - "json": { - "name": "value" - } - }, - "isHttpMetadata": false - }, - { - "$id": "250", - "kind": "property", - "name": "nextLink", - "serializedName": "nextLink", - "doc": "The link to the next page of items", - "type": { - "$id": "251", - "kind": "url", - "name": "ResourceLocation", - "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", - "baseType": { - "$id": "252", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.OperationListResult.nextLink", - "serializationOptions": { - "json": { - "name": "nextLink" - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$ref": "232" - }, - { - "$ref": "236" - }, - { - "$ref": "249" - }, - { - "$id": "253", - "kind": "model", - "name": "ErrorResponse", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse", - "usage": "Json,Exception", - "doc": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", - "summary": "Error response", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "254", - "kind": "property", - "name": "error", - "serializedName": "error", - "doc": "The error object.", - "type": { - "$id": "255", - "kind": "model", - "name": "ErrorDetail", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail", - "usage": "Json,Exception,LroPolling", - "doc": "The error detail.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "256", - "kind": "property", - "name": "code", - "serializedName": "code", - "doc": "The error code.", - "type": { - "$id": "257", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", - "serializationOptions": { - "json": { - "name": "code" - } - }, - "isHttpMetadata": false - }, - { - "$id": "258", - "kind": "property", - "name": "message", - "serializedName": "message", - "doc": "The error message.", - "type": { - "$id": "259", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", - "serializationOptions": { - "json": { - "name": "message" - } - }, - "isHttpMetadata": false - }, - { - "$id": "260", - "kind": "property", - "name": "target", - "serializedName": "target", - "doc": "The error target.", - "type": { - "$id": "261", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", - "serializationOptions": { - "json": { - "name": "target" - } - }, - "isHttpMetadata": false - }, - { - "$id": "262", - "kind": "property", - "name": "details", - "serializedName": "details", - "doc": "The error details.", - "type": { - "$id": "263", - "kind": "array", - "name": "ArrayErrorDetail", - "valueType": { - "$ref": "255" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", - "serializationOptions": { - "json": { - "name": "details" - } - }, - "isHttpMetadata": false - }, - { - "$id": "264", - "kind": "property", - "name": "additionalInfo", - "serializedName": "additionalInfo", - "doc": "The error additional info.", - "type": { - "$id": "265", - "kind": "array", - "name": "ArrayErrorAdditionalInfo", - "valueType": { - "$id": "266", - "kind": "model", - "name": "ErrorAdditionalInfo", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", - "usage": "Json,Exception,LroPolling", - "doc": "The resource management error additional info.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "267", - "kind": "property", - "name": "type", - "serializedName": "type", - "doc": "The additional info type.", - "type": { - "$id": "268", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", - "serializationOptions": { - "json": { - "name": "type" - } - }, - "isHttpMetadata": false - }, - { - "$id": "269", - "kind": "property", - "name": "info", - "serializedName": "info", - "doc": "The additional info.", - "type": { - "$id": "270", - "kind": "unknown", - "name": "unknown", - "crossLanguageDefinitionId": "", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", - "serializationOptions": { - "json": { - "name": "info" - } - }, - "isHttpMetadata": false - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", - "serializationOptions": { - "json": { - "name": "additionalInfo" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", - "serializationOptions": { - "json": { - "name": "error" - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$ref": "255" - }, - { - "$ref": "266" - }, - { - "$id": "271", - "kind": "model", - "name": "AvailabilityGroupListener", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListener", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "A SQL Server availability group listener.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - }, - { - "name": "Azure.ResourceManager.Private.@armResourceInternal", - "arguments": {} - }, - { - "name": "TypeSpec.Rest.@parentResource", - "arguments": {} - } - ], - "baseModel": { - "$id": "272", - "kind": "model", - "name": "ProxyResource", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ProxyResource", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location", - "summary": "Proxy Resource", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "baseModel": { - "$id": "273", - "kind": "model", - "name": "Resource", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Common fields that are returned in the response for all Azure Resource Manager resources", - "summary": "Resource", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "274", - "kind": "property", - "name": "id", - "serializedName": "id", - "doc": "Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", - "type": { - "$id": "275", - "kind": "string", - "name": "armResourceIdentifier", - "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", - "baseType": { - "$id": "276", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", - "serializationOptions": { - "json": { - "name": "id" - } - }, - "isHttpMetadata": false - }, - { - "$id": "277", - "kind": "property", - "name": "name", - "serializedName": "name", - "doc": "The name of the resource", - "type": { - "$id": "278", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", - "serializationOptions": { - "json": { - "name": "name" - } - }, - "isHttpMetadata": false - }, - { - "$id": "279", - "kind": "property", - "name": "type", - "serializedName": "type", - "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", - "type": { - "$id": "280", - "kind": "string", - "name": "armResourceType", - "crossLanguageDefinitionId": "Azure.Core.armResourceType", - "baseType": { - "$id": "281", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", - "serializationOptions": { - "json": { - "name": "type" - } - }, - "isHttpMetadata": false - }, - { - "$id": "282", - "kind": "property", - "name": "systemData", - "serializedName": "systemData", - "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", - "type": { - "$id": "283", - "kind": "model", - "name": "SystemData", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData", - "usage": "Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Metadata pertaining to creation and last modification of the resource.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "284", - "kind": "property", - "name": "createdBy", - "serializedName": "createdBy", - "doc": "The identity that created the resource.", - "type": { - "$id": "285", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", - "serializationOptions": { - "json": { - "name": "createdBy" - } - }, - "isHttpMetadata": false - }, - { - "$id": "286", - "kind": "property", - "name": "createdByType", - "serializedName": "createdByType", - "doc": "The type of identity that created the resource.", - "type": { - "$ref": "22" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", - "serializationOptions": { - "json": { - "name": "createdByType" - } - }, - "isHttpMetadata": false - }, - { - "$id": "287", - "kind": "property", - "name": "createdAt", - "serializedName": "createdAt", - "doc": "The timestamp of resource creation (UTC).", - "type": { - "$id": "288", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "289", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", - "serializationOptions": { - "json": { - "name": "createdAt" - } - }, - "isHttpMetadata": false - }, - { - "$id": "290", - "kind": "property", - "name": "lastModifiedBy", - "serializedName": "lastModifiedBy", - "doc": "The identity that last modified the resource.", - "type": { - "$id": "291", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", - "serializationOptions": { - "json": { - "name": "lastModifiedBy" - } - }, - "isHttpMetadata": false - }, - { - "$id": "292", - "kind": "property", - "name": "lastModifiedByType", - "serializedName": "lastModifiedByType", - "doc": "The type of identity that last modified the resource.", - "type": { - "$ref": "22" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", - "serializationOptions": { - "json": { - "name": "lastModifiedByType" - } - }, - "isHttpMetadata": false - }, - { - "$id": "293", - "kind": "property", - "name": "lastModifiedAt", - "serializedName": "lastModifiedAt", - "doc": "The timestamp of resource last modification (UTC)", - "type": { - "$id": "294", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "295", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", - "serializationOptions": { - "json": { - "name": "lastModifiedAt" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", - "serializationOptions": { - "json": { - "name": "systemData" - } - }, - "isHttpMetadata": false - } - ] - }, - "properties": [] - }, - "properties": [ - { - "$id": "296", - "kind": "property", - "name": "properties", - "serializedName": "properties", - "doc": "Resource properties.", - "type": { - "$id": "297", - "kind": "model", - "name": "AvailabilityGroupListenerProperties", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "The properties of an availability group listener.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "298", - "kind": "property", - "name": "provisioningState", - "serializedName": "provisioningState", - "doc": "Provisioning state to track the async operation status.", - "type": { - "$id": "299", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.provisioningState", - "serializationOptions": { - "json": { - "name": "provisioningState" - } - }, - "isHttpMetadata": false - }, - { - "$id": "300", - "kind": "property", - "name": "availabilityGroupName", - "serializedName": "availabilityGroupName", - "doc": "Name of the availability group.", - "type": { - "$id": "301", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.availabilityGroupName", - "serializationOptions": { - "json": { - "name": "availabilityGroupName" - } - }, - "isHttpMetadata": false - }, - { - "$id": "302", - "kind": "property", - "name": "loadBalancerConfigurations", - "serializedName": "loadBalancerConfigurations", - "doc": "List of load balancer configurations for an availability group listener.", - "type": { - "$id": "303", - "kind": "array", - "name": "ArrayLoadBalancerConfiguration", - "valueType": { - "$id": "304", - "kind": "model", - "name": "AvailabilityGroupListenerLoadBalancerConfiguration", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "A load balancer configuration for an availability group listener.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "305", - "kind": "property", - "name": "PrivateIPAddress", - "serializedName": "privateIpAddress", - "doc": "Private IP address.", - "type": { - "$id": "306", - "kind": "model", - "name": "AvailabilityGroupListenerPrivateIPAddress", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.PrivateIPAddress", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "A private IP address bound to the availability group listener.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "307", - "kind": "property", - "name": "IPAddress", - "serializedName": "ipAddress", - "doc": "Private IP address bound to the availability group listener.", - "type": { - "$id": "308", - "kind": "string", - "name": "ipV4Address", - "crossLanguageDefinitionId": "Azure.Core.ipV4Address", - "baseType": { - "$id": "309", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.PrivateIPAddress.ipAddress", - "serializationOptions": { - "json": { - "name": "ipAddress" - } - }, - "isHttpMetadata": false - }, - { - "$id": "310", - "kind": "property", - "name": "subnetResourceId", - "serializedName": "subnetResourceId", - "doc": "Subnet used to include private IP.", - "type": { - "$id": "311", - "kind": "string", - "name": "armResourceIdentifier", - "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", - "baseType": { - "$id": "312", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.PrivateIPAddress.subnetResourceId", - "serializationOptions": { - "json": { - "name": "subnetResourceId" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration.privateIpAddress", - "serializationOptions": { - "json": { - "name": "privateIpAddress" - } - }, - "isHttpMetadata": false - }, - { - "$id": "313", - "kind": "property", - "name": "PublicIPAddressResourceId", - "serializedName": "publicIpAddressResourceId", - "doc": "Resource id of the public IP.", - "type": { - "$id": "314", - "kind": "string", - "name": "armResourceIdentifier", - "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", - "baseType": { - "$id": "315", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration.publicIpAddressResourceId", - "serializationOptions": { - "json": { - "name": "publicIpAddressResourceId" - } - }, - "isHttpMetadata": false - }, - { - "$id": "316", - "kind": "property", - "name": "loadBalancerResourceId", - "serializedName": "loadBalancerResourceId", - "doc": "Resource id of the load balancer.", - "type": { - "$id": "317", - "kind": "string", - "name": "armResourceIdentifier", - "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", - "baseType": { - "$id": "318", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration.loadBalancerResourceId", - "serializationOptions": { - "json": { - "name": "loadBalancerResourceId" - } - }, - "isHttpMetadata": false - }, - { - "$id": "319", - "kind": "property", - "name": "probePort", - "serializedName": "probePort", - "doc": "Probe port.", - "type": { - "$id": "320", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration.probePort", - "serializationOptions": { - "json": { - "name": "probePort" - } - }, - "isHttpMetadata": false - }, - { - "$id": "321", - "kind": "property", - "name": "SqlVmInstances", - "serializedName": "sqlVirtualMachineInstances", - "doc": "List of the SQL virtual machine instance resource id's that are enrolled into the availability group listener.", - "type": { - "$id": "322", - "kind": "array", - "name": "Array", - "valueType": { - "$id": "323", - "kind": "string", - "name": "armResourceIdentifier", - "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", - "baseType": { - "$id": "324", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.LoadBalancerConfiguration.sqlVirtualMachineInstances", - "serializationOptions": { - "json": { - "name": "sqlVirtualMachineInstances" - } - }, - "isHttpMetadata": false - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.loadBalancerConfigurations", - "serializationOptions": { - "json": { - "name": "loadBalancerConfigurations" - } - }, - "isHttpMetadata": false - }, - { - "$id": "325", - "kind": "property", - "name": "MultiSubnetIPConfigurations", - "serializedName": "multiSubnetIpConfigurations", - "doc": "List of multi subnet IP configurations for an AG listener.", - "type": { - "$id": "326", - "kind": "array", - "name": "ArrayMultiSubnetIpConfiguration", - "valueType": { - "$id": "327", - "kind": "model", - "name": "MultiSubnetIPConfiguration", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.MultiSubnetIpConfiguration", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Multi subnet ip configuration for an availability group listener.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "328", - "kind": "property", - "name": "PrivateIPAddress", - "serializedName": "privateIpAddress", - "doc": "Private IP address.", - "type": { - "$ref": "306" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.MultiSubnetIpConfiguration.privateIpAddress", - "serializationOptions": { - "json": { - "name": "privateIpAddress" - } - }, - "isHttpMetadata": false - }, - { - "$id": "329", - "kind": "property", - "name": "SqlVmInstance", - "serializedName": "sqlVirtualMachineInstance", - "doc": "SQL virtual machine instance resource id that are enrolled into the availability group listener.", - "type": { - "$id": "330", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.MultiSubnetIpConfiguration.sqlVirtualMachineInstance", - "serializationOptions": { - "json": { - "name": "sqlVirtualMachineInstance" - } - }, - "isHttpMetadata": false - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.multiSubnetIpConfigurations", - "serializationOptions": { - "json": { - "name": "multiSubnetIpConfigurations" - } - }, - "isHttpMetadata": false - }, - { - "$id": "331", - "kind": "property", - "name": "createDefaultAvailabilityGroupIfNotExist", - "serializedName": "createDefaultAvailabilityGroupIfNotExist", - "doc": "Create a default availability group if it does not exist.", - "type": { - "$id": "332", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.createDefaultAvailabilityGroupIfNotExist", - "serializationOptions": { - "json": { - "name": "createDefaultAvailabilityGroupIfNotExist" - } - }, - "isHttpMetadata": false - }, - { - "$id": "333", - "kind": "property", - "name": "port", - "serializedName": "port", - "doc": "Listener port.", - "type": { - "$id": "334", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.port", - "serializationOptions": { - "json": { - "name": "port" - } - }, - "isHttpMetadata": false - }, - { - "$id": "335", - "kind": "property", - "name": "availabilityGroupConfiguration", - "serializedName": "availabilityGroupConfiguration", - "doc": "Availability Group configuration.", - "type": { - "$id": "336", - "kind": "model", - "name": "AvailabilityGroupConfiguration", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgConfiguration", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Availability group configuration.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "337", - "kind": "property", - "name": "replicas", - "serializedName": "replicas", - "doc": "Replica configurations.", - "type": { - "$id": "338", - "kind": "array", - "name": "ArrayAgReplica", - "valueType": { - "$id": "339", - "kind": "model", - "name": "AvailabilityGroupReplica", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Availability group replica configuration.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "340", - "kind": "property", - "name": "SqlVmInstanceId", - "serializedName": "sqlVirtualMachineInstanceId", - "doc": "Sql VirtualMachine Instance Id.", - "type": { - "$id": "341", - "kind": "string", - "name": "armResourceIdentifier", - "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", - "baseType": { - "$id": "342", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica.sqlVirtualMachineInstanceId", - "serializationOptions": { - "json": { - "name": "sqlVirtualMachineInstanceId" - } - }, - "isHttpMetadata": false - }, - { - "$id": "343", - "kind": "property", - "name": "role", - "serializedName": "role", - "doc": "Replica Role in availability group.", - "type": { - "$ref": "5" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica.role", - "serializationOptions": { - "json": { - "name": "role" - } - }, - "isHttpMetadata": false - }, - { - "$id": "344", - "kind": "property", - "name": "commit", - "serializedName": "commit", - "doc": "Replica commit mode in availability group.", - "type": { - "$ref": "9" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica.commit", - "serializationOptions": { - "json": { - "name": "commit" - } - }, - "isHttpMetadata": false - }, - { - "$id": "345", - "kind": "property", - "name": "failover", - "serializedName": "failover", - "doc": "Replica failover mode in availability group.", - "type": { - "$ref": "13" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica.failover", - "serializationOptions": { - "json": { - "name": "failover" - } - }, - "isHttpMetadata": false - }, - { - "$id": "346", - "kind": "property", - "name": "readableSecondary", - "serializedName": "readableSecondary", - "doc": "Replica readable secondary mode in availability group.", - "type": { - "$ref": "17" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgReplica.readableSecondary", - "serializationOptions": { - "json": { - "name": "readableSecondary" - } - }, - "isHttpMetadata": false - } - ] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AgConfiguration.replicas", - "serializationOptions": { - "json": { - "name": "replicas" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListenerProperties.availabilityGroupConfiguration", - "serializationOptions": { - "json": { - "name": "availabilityGroupConfiguration" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": true, - "decorators": [ - { - "name": "Azure.ResourceManager.@flattenProperty", - "arguments": {} - } - ], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListener.properties", - "serializationOptions": { - "json": { - "name": "properties" - } - }, - "isHttpMetadata": false - }, - { - "$id": "347", - "kind": "property", - "name": "name", - "serializedName": "name", - "doc": "Name of the availability group listener.", - "type": { - "$id": "348", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListener.name", - "serializationOptions": { - "json": { - "name": "name" - } - }, - "isHttpMetadata": true - } - ] - }, - { - "$ref": "297" - }, - { - "$ref": "304" - }, - { - "$ref": "306" - }, - { - "$ref": "327" - }, - { - "$ref": "336" - }, - { - "$ref": "339" - }, - { - "$ref": "272" - }, - { - "$ref": "273" - }, - { - "$ref": "283" - }, - { - "$id": "349", - "kind": "model", - "name": "ArmOperationStatusResourceProvisioningState", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus", - "usage": "LroPolling", - "doc": "Standard Azure Resource Manager operation status response", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "350", - "kind": "property", - "name": "status", - "serializedName": "status", - "doc": "The operation status", - "type": { - "$ref": "28" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", - "serializationOptions": { - "json": { - "name": "status" - } - }, - "isHttpMetadata": false - }, - { - "$id": "351", - "kind": "property", - "name": "id", - "serializedName": "id", - "doc": "The unique identifier for the operationStatus resource", - "type": { - "$id": "352", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", - "serializationOptions": { - "json": { - "name": "id" - } - }, - "isHttpMetadata": true - }, - { - "$id": "353", - "kind": "property", - "name": "name", - "serializedName": "name", - "doc": "The name of the operationStatus resource", - "type": { - "$id": "354", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", - "serializationOptions": { - "json": { - "name": "name" - } - }, - "isHttpMetadata": false - }, - { - "$id": "355", - "kind": "property", - "name": "startTime", - "serializedName": "startTime", - "doc": "Operation start time", - "type": { - "$id": "356", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "357", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", - "serializationOptions": { - "json": { - "name": "startTime" - } - }, - "isHttpMetadata": false - }, - { - "$id": "358", - "kind": "property", - "name": "endTime", - "serializedName": "endTime", - "doc": "Operation complete time", - "type": { - "$id": "359", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "360", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", - "serializationOptions": { - "json": { - "name": "endTime" - } - }, - "isHttpMetadata": false - }, - { - "$id": "361", - "kind": "property", - "name": "percentComplete", - "serializedName": "percentComplete", - "doc": "The progress made toward completing the operation", - "type": { - "$id": "362", - "kind": "float64", - "name": "float64", - "crossLanguageDefinitionId": "TypeSpec.float64", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", - "serializationOptions": { - "json": { - "name": "percentComplete" - } - }, - "isHttpMetadata": false - }, - { - "$id": "363", - "kind": "property", - "name": "error", - "serializedName": "error", - "doc": "Errors that occurred if the operation ended with Canceled or Failed status", - "type": { - "$ref": "255" - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", - "serializationOptions": { - "json": { - "name": "error" - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "364", - "kind": "model", - "name": "AvailabilityGroupListenerListResult", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", - "usage": "Output,Json", - "doc": "The response of a AvailabilityGroupListener list operation.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "365", - "kind": "property", - "name": "value", - "serializedName": "value", - "doc": "The AvailabilityGroupListener items on this page", - "type": { - "$id": "366", - "kind": "array", - "name": "ArrayAvailabilityGroupListener", - "valueType": { - "$ref": "271" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", - "serializationOptions": { - "json": { - "name": "value" - } - }, - "isHttpMetadata": false - }, - { - "$id": "367", - "kind": "property", - "name": "nextLink", - "serializedName": "nextLink", - "doc": "The link to the next page of items", - "type": { - "$id": "368", - "kind": "url", - "name": "ResourceLocation", - "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", - "baseType": { - "$id": "369", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", - "serializationOptions": { - "json": { - "name": "nextLink" - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "370", - "kind": "model", - "name": "SqlVm", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachine", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "A SQL virtual machine.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - }, - { - "name": "Azure.ResourceManager.Private.@armResourceInternal", - "arguments": {} - } - ], - "baseModel": { - "$id": "371", - "kind": "model", - "name": "TrackedResource", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'", - "summary": "Tracked Resource", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "baseModel": { - "$ref": "273" - }, - "properties": [ - { - "$id": "372", - "kind": "property", - "name": "tags", - "serializedName": "tags", - "doc": "Resource tags.", - "type": { - "$id": "373", - "kind": "dict", - "keyType": { - "$id": "374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "375", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", - "serializationOptions": { - "json": { - "name": "tags" - } - }, - "isHttpMetadata": false - }, - { - "$id": "376", - "kind": "property", - "name": "location", - "serializedName": "location", - "doc": "The geo-location where the resource lives", - "type": { - "$id": "377", - "kind": "string", - "name": "azureLocation", - "crossLanguageDefinitionId": "Azure.Core.azureLocation", - "baseType": { - "$id": "378", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", - "serializationOptions": { - "json": { - "name": "location" - } - }, - "isHttpMetadata": false - } - ] - }, - "properties": [ - { - "$id": "379", - "kind": "property", - "name": "properties", - "serializedName": "properties", - "doc": "Resource properties.", - "type": { - "$id": "380", - "kind": "model", - "name": "SqlVirtualMachineProperties", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "The SQL virtual machine properties.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "381", - "kind": "property", - "name": "virtualMachineResourceId", - "serializedName": "virtualMachineResourceId", - "doc": "ARM Resource id of underlying virtual machine created from SQL marketplace image.", - "type": { - "$id": "382", - "kind": "string", - "name": "armResourceIdentifier", - "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", - "baseType": { - "$id": "383", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.virtualMachineResourceId", - "serializationOptions": { - "json": { - "name": "virtualMachineResourceId" - } - }, - "isHttpMetadata": false - }, - { - "$id": "384", - "kind": "property", - "name": "provisioningState", - "serializedName": "provisioningState", - "doc": "Provisioning state to track the async operation status.", - "type": { - "$id": "385", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.provisioningState", - "serializationOptions": { - "json": { - "name": "provisioningState" - } - }, - "isHttpMetadata": false - }, - { - "$id": "386", - "kind": "property", - "name": "sqlImageOffer", - "serializedName": "sqlImageOffer", - "doc": "SQL image offer. Examples include SQL2016-WS2016, SQL2017-WS2016.", - "type": { - "$id": "387", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.sqlImageOffer", - "serializationOptions": { - "json": { - "name": "sqlImageOffer" - } - }, - "isHttpMetadata": false - }, - { - "$id": "388", - "kind": "property", - "name": "sqlServerLicenseType", - "serializedName": "sqlServerLicenseType", - "doc": "SQL Server license type.", - "type": { - "$ref": "33" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.sqlServerLicenseType", - "serializationOptions": { - "json": { - "name": "sqlServerLicenseType" - } - }, - "isHttpMetadata": false - }, - { - "$id": "389", - "kind": "property", - "name": "sqlManagement", - "serializedName": "sqlManagement", - "doc": "SQL Server Management type. NOTE: This parameter is not used anymore. API will automatically detect the Sql Management, refrain from using it.", - "type": { - "$ref": "38" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.sqlManagement", - "serializationOptions": { - "json": { - "name": "sqlManagement" - } - }, - "isHttpMetadata": false - }, - { - "$id": "390", - "kind": "property", - "name": "leastPrivilegeMode", - "serializedName": "leastPrivilegeMode", - "doc": "SQL IaaS Agent least privilege mode.", - "type": { - "$ref": "43" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.leastPrivilegeMode", - "serializationOptions": { - "json": { - "name": "leastPrivilegeMode" - } - }, - "isHttpMetadata": false - }, - { - "$id": "391", - "kind": "property", - "name": "sqlImageSku", - "serializedName": "sqlImageSku", - "doc": "SQL Server edition type.", - "type": { - "$ref": "47" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.sqlImageSku", - "serializationOptions": { - "json": { - "name": "sqlImageSku" - } - }, - "isHttpMetadata": false - }, - { - "$id": "392", - "kind": "property", - "name": "SqlVmGroupResourceId", - "serializedName": "sqlVirtualMachineGroupResourceId", - "doc": "ARM resource id of the SQL virtual machine group this SQL virtual machine is or will be part of.", - "type": { - "$id": "393", - "kind": "string", - "name": "armResourceIdentifier", - "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", - "baseType": { - "$id": "394", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.sqlVirtualMachineGroupResourceId", - "serializationOptions": { - "json": { - "name": "sqlVirtualMachineGroupResourceId" - } - }, - "isHttpMetadata": false - }, - { - "$id": "395", - "kind": "property", - "name": "WindowsServerFailoverClusterDomainCredentials", - "serializedName": "wsfcDomainCredentials", - "doc": "Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.", - "type": { - "$id": "396", - "kind": "model", - "name": "WindowsServerFailoverClusterDomainCredentials", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainCredentials", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "397", - "kind": "property", - "name": "clusterBootstrapAccountPassword", - "serializedName": "clusterBootstrapAccountPassword", - "doc": "Cluster bootstrap account password.", - "type": { - "$id": "398", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainCredentials.clusterBootstrapAccountPassword", - "serializationOptions": { - "json": { - "name": "clusterBootstrapAccountPassword" - } - }, - "isHttpMetadata": false - }, - { - "$id": "399", - "kind": "property", - "name": "clusterOperatorAccountPassword", - "serializedName": "clusterOperatorAccountPassword", - "doc": "Cluster operator account password.", - "type": { - "$id": "400", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainCredentials.clusterOperatorAccountPassword", - "serializationOptions": { - "json": { - "name": "clusterOperatorAccountPassword" - } - }, - "isHttpMetadata": false - }, - { - "$id": "401", - "kind": "property", - "name": "sqlServiceAccountPassword", - "serializedName": "sqlServiceAccountPassword", - "doc": "SQL service account password.", - "type": { - "$id": "402", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainCredentials.sqlServiceAccountPassword", - "serializationOptions": { - "json": { - "name": "sqlServiceAccountPassword" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.wsfcDomainCredentials", - "serializationOptions": { - "json": { - "name": "wsfcDomainCredentials" - } - }, - "isHttpMetadata": false - }, - { - "$id": "403", - "kind": "property", - "name": "WindowsServerFailoverClusterStaticIP", - "serializedName": "wsfcStaticIp", - "doc": "Domain credentials for setting up Windows Server Failover Cluster for SQL availability group.", - "type": { - "$id": "404", - "kind": "string", - "name": "ipV4Address", - "crossLanguageDefinitionId": "Azure.Core.ipV4Address", - "baseType": { - "$id": "405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.wsfcStaticIp", - "serializationOptions": { - "json": { - "name": "wsfcStaticIp" - } - }, - "isHttpMetadata": false - }, - { - "$id": "406", - "kind": "property", - "name": "autoPatchingSettings", - "serializedName": "autoPatchingSettings", - "doc": "Auto patching settings for applying critical security updates to SQL virtual machine.", - "type": { - "$id": "407", - "kind": "model", - "name": "SqlVmAutoPatchingSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Set a patching window during which Windows and SQL patches will be applied.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "408", - "kind": "property", - "name": "IsEnabled", - "serializedName": "enable", - "doc": "Enable or disable autopatching on SQL virtual machine.", - "type": { - "$id": "409", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings.enable", - "serializationOptions": { - "json": { - "name": "enable" - } - }, - "isHttpMetadata": false - }, - { - "$id": "410", - "kind": "property", - "name": "dayOfWeek", - "serializedName": "dayOfWeek", - "doc": "Day of week to apply the patch on.", - "type": { - "$ref": "54" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings.dayOfWeek", - "serializationOptions": { - "json": { - "name": "dayOfWeek" - } - }, - "isHttpMetadata": false - }, - { - "$id": "411", - "kind": "property", - "name": "maintenanceWindowStartingHour", - "serializedName": "maintenanceWindowStartingHour", - "doc": "Hour of the day when patching is initiated. Local VM time.", - "type": { - "$id": "412", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings.maintenanceWindowStartingHour", - "serializationOptions": { - "json": { - "name": "maintenanceWindowStartingHour" - } - }, - "isHttpMetadata": false - }, - { - "$id": "413", - "kind": "property", - "name": "MaintenanceWindowDurationInMinutes", - "serializedName": "maintenanceWindowDuration", - "doc": "Duration of patching.", - "type": { - "$id": "414", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings.maintenanceWindowDuration", - "serializationOptions": { - "json": { - "name": "maintenanceWindowDuration" - } - }, - "isHttpMetadata": false - }, - { - "$id": "415", - "kind": "property", - "name": "additionalVmPatch", - "serializedName": "additionalVmPatch", - "doc": "Additional Patch to be enable or enabled on the SQL Virtual Machine.", - "type": { - "$ref": "64" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoPatchingSettings.additionalVmPatch", - "serializationOptions": { - "json": { - "name": "additionalVmPatch" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.autoPatchingSettings", - "serializationOptions": { - "json": { - "name": "autoPatchingSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "416", - "kind": "property", - "name": "autoBackupSettings", - "serializedName": "autoBackupSettings", - "doc": "Auto backup settings for SQL Server.", - "type": { - "$id": "417", - "kind": "model", - "name": "SqlVmAutoBackupSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Configure backups for databases in your SQL virtual machine.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "418", - "kind": "property", - "name": "IsEnabled", - "serializedName": "enable", - "doc": "Enable or disable autobackup on SQL virtual machine.", - "type": { - "$id": "419", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.enable", - "serializationOptions": { - "json": { - "name": "enable" - } - }, - "isHttpMetadata": false - }, - { - "$id": "420", - "kind": "property", - "name": "IsEncryptionEnabled", - "serializedName": "enableEncryption", - "doc": "Enable or disable encryption for backup on SQL virtual machine.", - "type": { - "$id": "421", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.enableEncryption", - "serializationOptions": { - "json": { - "name": "enableEncryption" - } - }, - "isHttpMetadata": false - }, - { - "$id": "422", - "kind": "property", - "name": "RetentionPeriodInDays", - "serializedName": "retentionPeriod", - "doc": "Retention period of backup: 1-90 days.", - "type": { - "$id": "423", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.retentionPeriod", - "serializationOptions": { - "json": { - "name": "retentionPeriod" - } - }, - "isHttpMetadata": false - }, - { - "$id": "424", - "kind": "property", - "name": "storageAccountUrl", - "serializedName": "storageAccountUrl", - "doc": "Storage account url where backup will be taken to.", - "type": { - "$id": "425", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.storageAccountUrl", - "serializationOptions": { - "json": { - "name": "storageAccountUrl" - } - }, - "isHttpMetadata": false - }, - { - "$id": "426", - "kind": "property", - "name": "storageContainerName", - "serializedName": "storageContainerName", - "doc": "Storage container name where backup will be taken to.", - "type": { - "$id": "427", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.storageContainerName", - "serializationOptions": { - "json": { - "name": "storageContainerName" - } - }, - "isHttpMetadata": false - }, - { - "$id": "428", - "kind": "property", - "name": "storageAccessKey", - "serializedName": "storageAccessKey", - "doc": "Storage account key where backup will be taken to.", - "type": { - "$id": "429", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.storageAccessKey", - "serializationOptions": { - "json": { - "name": "storageAccessKey" - } - }, - "isHttpMetadata": false - }, - { - "$id": "430", - "kind": "property", - "name": "password", - "serializedName": "password", - "doc": "Password for encryption on backup.", - "type": { - "$id": "431", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.password", - "serializationOptions": { - "json": { - "name": "password" - } - }, - "isHttpMetadata": false - }, - { - "$id": "432", - "kind": "property", - "name": "AreSystemDbsIncludedInBackup", - "serializedName": "backupSystemDbs", - "doc": "Include or exclude system databases from auto backup.", - "type": { - "$id": "433", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.backupSystemDbs", - "serializationOptions": { - "json": { - "name": "backupSystemDbs" - } - }, - "isHttpMetadata": false - }, - { - "$id": "434", - "kind": "property", - "name": "backupScheduleType", - "serializedName": "backupScheduleType", - "doc": "Backup schedule type.", - "type": { - "$ref": "68" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.backupScheduleType", - "serializationOptions": { - "json": { - "name": "backupScheduleType" - } - }, - "isHttpMetadata": false - }, - { - "$id": "435", - "kind": "property", - "name": "fullBackupFrequency", - "serializedName": "fullBackupFrequency", - "doc": "Frequency of full backups. In both cases, full backups begin during the next scheduled time window.", - "type": { - "$ref": "72" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.fullBackupFrequency", - "serializationOptions": { - "json": { - "name": "fullBackupFrequency" - } - }, - "isHttpMetadata": false - }, - { - "$id": "436", - "kind": "property", - "name": "daysOfWeek", - "serializedName": "daysOfWeek", - "doc": "Days of the week for the backups when FullBackupFrequency is set to Weekly.", - "type": { - "$id": "437", - "kind": "array", - "name": "ArrayAutoBackupDaysOfWeek", - "valueType": { - "$ref": "76" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.daysOfWeek", - "serializationOptions": { - "json": { - "name": "daysOfWeek" - } - }, - "isHttpMetadata": false - }, - { - "$id": "438", - "kind": "property", - "name": "FullBackupStartHour", - "serializedName": "fullBackupStartTime", - "doc": "Start time of a given day during which full backups can take place. 0-23 hours.", - "type": { - "$id": "439", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.fullBackupStartTime", - "serializationOptions": { - "json": { - "name": "fullBackupStartTime" - } - }, - "isHttpMetadata": false - }, - { - "$id": "440", - "kind": "property", - "name": "fullBackupWindowHours", - "serializedName": "fullBackupWindowHours", - "doc": "Duration of the time window of a given day during which full backups can take place. 1-23 hours.", - "type": { - "$id": "441", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.fullBackupWindowHours", - "serializationOptions": { - "json": { - "name": "fullBackupWindowHours" - } - }, - "isHttpMetadata": false - }, - { - "$id": "442", - "kind": "property", - "name": "logBackupFrequency", - "serializedName": "logBackupFrequency", - "doc": "Frequency of log backups. 5-60 minutes.", - "type": { - "$id": "443", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AutoBackupSettings.logBackupFrequency", - "serializationOptions": { - "json": { - "name": "logBackupFrequency" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.autoBackupSettings", - "serializationOptions": { - "json": { - "name": "autoBackupSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "444", - "kind": "property", - "name": "keyVaultCredentialSettings", - "serializedName": "keyVaultCredentialSettings", - "doc": "Key vault credential settings.", - "type": { - "$id": "445", - "kind": "model", - "name": "SqlVmKeyVaultCredentialSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Configure your SQL virtual machine to be able to connect to the Azure Key Vault service.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "446", - "kind": "property", - "name": "IsEnabled", - "serializedName": "enable", - "doc": "Enable or disable key vault credential setting.", - "type": { - "$id": "447", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings.enable", - "serializationOptions": { - "json": { - "name": "enable" - } - }, - "isHttpMetadata": false - }, - { - "$id": "448", - "kind": "property", - "name": "credentialName", - "serializedName": "credentialName", - "doc": "Credential name.", - "type": { - "$id": "449", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings.credentialName", - "serializationOptions": { - "json": { - "name": "credentialName" - } - }, - "isHttpMetadata": false - }, - { - "$id": "450", - "kind": "property", - "name": "azureKeyVaultUrl", - "serializedName": "azureKeyVaultUrl", - "doc": "Azure Key Vault url.", - "type": { - "$id": "451", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings.azureKeyVaultUrl", - "serializationOptions": { - "json": { - "name": "azureKeyVaultUrl" - } - }, - "isHttpMetadata": false - }, - { - "$id": "452", - "kind": "property", - "name": "servicePrincipalName", - "serializedName": "servicePrincipalName", - "doc": "Service principal name to access key vault.", - "type": { - "$id": "453", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings.servicePrincipalName", - "serializationOptions": { - "json": { - "name": "servicePrincipalName" - } - }, - "isHttpMetadata": false - }, - { - "$id": "454", - "kind": "property", - "name": "servicePrincipalSecret", - "serializedName": "servicePrincipalSecret", - "doc": "Service principal name secret to access key vault.", - "type": { - "$id": "455", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.KeyVaultCredentialSettings.servicePrincipalSecret", - "serializationOptions": { - "json": { - "name": "servicePrincipalSecret" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.keyVaultCredentialSettings", - "serializationOptions": { - "json": { - "name": "keyVaultCredentialSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "456", - "kind": "property", - "name": "serverConfigurationsManagementSettings", - "serializedName": "serverConfigurationsManagementSettings", - "doc": "SQL Server configuration management settings.", - "type": { - "$id": "457", - "kind": "model", - "name": "SqlServerConfigurationsManagementSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Set the connectivity, storage and workload settings.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "458", - "kind": "property", - "name": "sqlConnectivityUpdateSettings", - "serializedName": "sqlConnectivityUpdateSettings", - "doc": "SQL connectivity type settings.", - "type": { - "$id": "459", - "kind": "model", - "name": "SqlConnectivityUpdateSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlConnectivityUpdateSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Set the access level and network port settings for SQL Server.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "460", - "kind": "property", - "name": "connectivityType", - "serializedName": "connectivityType", - "doc": "SQL Server connectivity option.", - "type": { - "$ref": "85" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlConnectivityUpdateSettings.connectivityType", - "serializationOptions": { - "json": { - "name": "connectivityType" - } - }, - "isHttpMetadata": false - }, - { - "$id": "461", - "kind": "property", - "name": "port", - "serializedName": "port", - "doc": "SQL Server port.", - "type": { - "$id": "462", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlConnectivityUpdateSettings.port", - "serializationOptions": { - "json": { - "name": "port" - } - }, - "isHttpMetadata": false - }, - { - "$id": "463", - "kind": "property", - "name": "sqlAuthUpdateUserName", - "serializedName": "sqlAuthUpdateUserName", - "doc": "SQL Server sysadmin login to create.", - "type": { - "$id": "464", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlConnectivityUpdateSettings.sqlAuthUpdateUserName", - "serializationOptions": { - "json": { - "name": "sqlAuthUpdateUserName" - } - }, - "isHttpMetadata": false - }, - { - "$id": "465", - "kind": "property", - "name": "sqlAuthUpdatePassword", - "serializedName": "sqlAuthUpdatePassword", - "doc": "SQL Server sysadmin login password.", - "type": { - "$id": "466", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlConnectivityUpdateSettings.sqlAuthUpdatePassword", - "serializationOptions": { - "json": { - "name": "sqlAuthUpdatePassword" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.sqlConnectivityUpdateSettings", - "serializationOptions": { - "json": { - "name": "sqlConnectivityUpdateSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "467", - "kind": "property", - "name": "sqlWorkloadTypeUpdateSettings", - "serializedName": "sqlWorkloadTypeUpdateSettings", - "doc": "SQL workload type settings.", - "type": { - "$id": "468", - "kind": "model", - "name": "SqlWorkloadTypeUpdateSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlWorkloadTypeUpdateSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Set workload type to optimize storage for SQL Server.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "469", - "kind": "property", - "name": "sqlWorkloadType", - "serializedName": "sqlWorkloadType", - "doc": "SQL Server workload type.", - "type": { - "$ref": "90" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlWorkloadTypeUpdateSettings.sqlWorkloadType", - "serializationOptions": { - "json": { - "name": "sqlWorkloadType" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.sqlWorkloadTypeUpdateSettings", - "serializationOptions": { - "json": { - "name": "sqlWorkloadTypeUpdateSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "470", - "kind": "property", - "name": "sqlStorageUpdateSettings", - "serializedName": "sqlStorageUpdateSettings", - "doc": "SQL storage update settings.", - "type": { - "$id": "471", - "kind": "model", - "name": "SqlStorageUpdateSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlStorageUpdateSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Set disk storage settings for SQL Server.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "472", - "kind": "property", - "name": "diskCount", - "serializedName": "diskCount", - "doc": "Virtual machine disk count.", - "type": { - "$id": "473", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlStorageUpdateSettings.diskCount", - "serializationOptions": { - "json": { - "name": "diskCount" - } - }, - "isHttpMetadata": false - }, - { - "$id": "474", - "kind": "property", - "name": "startingDeviceId", - "serializedName": "startingDeviceId", - "doc": "Device id of the first disk to be updated.", - "type": { - "$id": "475", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlStorageUpdateSettings.startingDeviceId", - "serializationOptions": { - "json": { - "name": "startingDeviceId" - } - }, - "isHttpMetadata": false - }, - { - "$id": "476", - "kind": "property", - "name": "diskConfigurationType", - "serializedName": "diskConfigurationType", - "doc": "Disk configuration to apply to SQL Server.", - "type": { - "$ref": "95" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlStorageUpdateSettings.diskConfigurationType", - "serializationOptions": { - "json": { - "name": "diskConfigurationType" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.sqlStorageUpdateSettings", - "serializationOptions": { - "json": { - "name": "sqlStorageUpdateSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "477", - "kind": "property", - "name": "additionalFeaturesServerConfigurations", - "serializedName": "additionalFeaturesServerConfigurations", - "doc": "Additional SQL feature settings.", - "type": { - "$id": "478", - "kind": "model", - "name": "AdditionalFeaturesServerConfigurations", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AdditionalFeaturesServerConfigurations", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Additional SQL Server feature settings.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "479", - "kind": "property", - "name": "isRServicesEnabled", - "serializedName": "isRServicesEnabled", - "doc": "Enable or disable R services (SQL 2016 onwards).", - "type": { - "$id": "480", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AdditionalFeaturesServerConfigurations.isRServicesEnabled", - "serializationOptions": { - "json": { - "name": "isRServicesEnabled" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.additionalFeaturesServerConfigurations", - "serializationOptions": { - "json": { - "name": "additionalFeaturesServerConfigurations" - } - }, - "isHttpMetadata": false - }, - { - "$id": "481", - "kind": "property", - "name": "sqlInstanceSettings", - "serializedName": "sqlInstanceSettings", - "doc": "SQL Instance settings.", - "type": { - "$id": "482", - "kind": "model", - "name": "SqlInstanceSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Set the server/instance-level settings for SQL Server.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "483", - "kind": "property", - "name": "collation", - "serializedName": "collation", - "doc": "SQL Server Collation.", - "type": { - "$id": "484", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.collation", - "serializationOptions": { - "json": { - "name": "collation" - } - }, - "isHttpMetadata": false - }, - { - "$id": "485", - "kind": "property", - "name": "maxDop", - "serializedName": "maxDop", - "doc": "SQL Server MAXDOP.", - "type": { - "$id": "486", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.maxDop", - "serializationOptions": { - "json": { - "name": "maxDop" - } - }, - "isHttpMetadata": false - }, - { - "$id": "487", - "kind": "property", - "name": "isOptimizeForAdHocWorkloadsEnabled", - "serializedName": "isOptimizeForAdHocWorkloadsEnabled", - "doc": "SQL Server Optimize for Adhoc workloads.", - "type": { - "$id": "488", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.isOptimizeForAdHocWorkloadsEnabled", - "serializationOptions": { - "json": { - "name": "isOptimizeForAdHocWorkloadsEnabled" - } - }, - "isHttpMetadata": false - }, - { - "$id": "489", - "kind": "property", - "name": "MinServerMemoryInMB", - "serializedName": "minServerMemoryMB", - "doc": "SQL Server minimum memory.", - "type": { - "$id": "490", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.minServerMemoryMB", - "serializationOptions": { - "json": { - "name": "minServerMemoryMB" - } - }, - "isHttpMetadata": false - }, - { - "$id": "491", - "kind": "property", - "name": "MaxServerMemoryInMB", - "serializedName": "maxServerMemoryMB", - "doc": "SQL Server maximum memory.", - "type": { - "$id": "492", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.maxServerMemoryMB", - "serializationOptions": { - "json": { - "name": "maxServerMemoryMB" - } - }, - "isHttpMetadata": false - }, - { - "$id": "493", - "kind": "property", - "name": "isLpimEnabled", - "serializedName": "isLpimEnabled", - "doc": "SQL Server LPIM.", - "type": { - "$id": "494", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.isLpimEnabled", - "serializationOptions": { - "json": { - "name": "isLpimEnabled" - } - }, - "isHttpMetadata": false - }, - { - "$id": "495", - "kind": "property", - "name": "isIfiEnabled", - "serializedName": "isIfiEnabled", - "doc": "SQL Server IFI.", - "type": { - "$id": "496", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLInstanceSettings.isIfiEnabled", - "serializationOptions": { - "json": { - "name": "isIfiEnabled" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.sqlInstanceSettings", - "serializationOptions": { - "json": { - "name": "sqlInstanceSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "497", - "kind": "property", - "name": "azureAdAuthenticationSettings", - "serializedName": "azureAdAuthenticationSettings", - "doc": "Azure AD authentication Settings.", - "type": { - "$id": "498", - "kind": "model", - "name": "AADAuthenticationSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AADAuthenticationSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Enable AAD authentication for SQL VM.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "499", - "kind": "property", - "name": "clientId", - "serializedName": "clientId", - "doc": "The client Id of the Managed Identity to query Microsoft Graph API. An empty string must be used for the system assigned Managed Identity", - "type": { - "$id": "500", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AADAuthenticationSettings.clientId", - "serializationOptions": { - "json": { - "name": "clientId" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.ServerConfigurationsManagementSettings.azureAdAuthenticationSettings", - "serializationOptions": { - "json": { - "name": "azureAdAuthenticationSettings" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.serverConfigurationsManagementSettings", - "serializationOptions": { - "json": { - "name": "serverConfigurationsManagementSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "501", - "kind": "property", - "name": "storageConfigurationSettings", - "serializedName": "storageConfigurationSettings", - "doc": "Storage Configuration Settings.", - "type": { - "$id": "502", - "kind": "model", - "name": "SqlVmStorageConfigurationSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Storage Configurations for SQL Data, Log and TempDb.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "503", - "kind": "property", - "name": "sqlDataSettings", - "serializedName": "sqlDataSettings", - "doc": "SQL Server Data Storage Settings.", - "type": { - "$id": "504", - "kind": "model", - "name": "SqlStorageSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLStorageSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Set disk storage settings for SQL Server.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "505", - "kind": "property", - "name": "Luns", - "serializedName": "luns", - "doc": "Logical Unit Numbers for the disks.", - "type": { - "$id": "506", - "kind": "array", - "name": "Array1", - "valueType": { - "$id": "507", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLStorageSettings.luns", - "serializationOptions": { - "json": { - "name": "luns" - } - }, - "isHttpMetadata": false - }, - { - "$id": "508", - "kind": "property", - "name": "defaultFilePath", - "serializedName": "defaultFilePath", - "doc": "SQL Server default file path", - "type": { - "$id": "509", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLStorageSettings.defaultFilePath", - "serializationOptions": { - "json": { - "name": "defaultFilePath" - } - }, - "isHttpMetadata": false - }, - { - "$id": "510", - "kind": "property", - "name": "useStoragePool", - "serializedName": "useStoragePool", - "doc": "Use storage pool to build a drive if true or not provided", - "type": { - "$id": "511", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLStorageSettings.useStoragePool", - "serializationOptions": { - "json": { - "name": "useStoragePool" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.sqlDataSettings", - "serializationOptions": { - "json": { - "name": "sqlDataSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "512", - "kind": "property", - "name": "sqlLogSettings", - "serializedName": "sqlLogSettings", - "doc": "SQL Server Log Storage Settings.", - "type": { - "$ref": "504" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.sqlLogSettings", - "serializationOptions": { - "json": { - "name": "sqlLogSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "513", - "kind": "property", - "name": "SqlTempDBSettings", - "serializedName": "sqlTempDbSettings", - "doc": "SQL Server TempDb Storage Settings.", - "type": { - "$id": "514", - "kind": "model", - "name": "SqlTempDBSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Set tempDb storage settings for SQL Server.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "515", - "kind": "property", - "name": "dataFileSize", - "serializedName": "dataFileSize", - "doc": "SQL Server tempdb data file size", - "type": { - "$id": "516", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.dataFileSize", - "serializationOptions": { - "json": { - "name": "dataFileSize" - } - }, - "isHttpMetadata": false - }, - { - "$id": "517", - "kind": "property", - "name": "dataGrowth", - "serializedName": "dataGrowth", - "doc": "SQL Server tempdb data file autoGrowth size", - "type": { - "$id": "518", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.dataGrowth", - "serializationOptions": { - "json": { - "name": "dataGrowth" - } - }, - "isHttpMetadata": false - }, - { - "$id": "519", - "kind": "property", - "name": "logFileSize", - "serializedName": "logFileSize", - "doc": "SQL Server tempdb log file size", - "type": { - "$id": "520", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.logFileSize", - "serializationOptions": { - "json": { - "name": "logFileSize" - } - }, - "isHttpMetadata": false - }, - { - "$id": "521", - "kind": "property", - "name": "logGrowth", - "serializedName": "logGrowth", - "doc": "SQL Server tempdb log file autoGrowth size", - "type": { - "$id": "522", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.logGrowth", - "serializationOptions": { - "json": { - "name": "logGrowth" - } - }, - "isHttpMetadata": false - }, - { - "$id": "523", - "kind": "property", - "name": "dataFileCount", - "serializedName": "dataFileCount", - "doc": "SQL Server tempdb data file count", - "type": { - "$id": "524", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.dataFileCount", - "serializationOptions": { - "json": { - "name": "dataFileCount" - } - }, - "isHttpMetadata": false - }, - { - "$id": "525", - "kind": "property", - "name": "persistFolder", - "serializedName": "persistFolder", - "doc": "SQL Server tempdb persist folder choice", - "type": { - "$id": "526", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.persistFolder", - "serializationOptions": { - "json": { - "name": "persistFolder" - } - }, - "isHttpMetadata": false - }, - { - "$id": "527", - "kind": "property", - "name": "persistFolderPath", - "serializedName": "persistFolderPath", - "doc": "SQL Server tempdb persist folder location", - "type": { - "$id": "528", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.persistFolderPath", - "serializationOptions": { - "json": { - "name": "persistFolderPath" - } - }, - "isHttpMetadata": false - }, - { - "$id": "529", - "kind": "property", - "name": "LogicalUnitNumbers", - "serializedName": "luns", - "doc": "Logical Unit Numbers for the disks.", - "type": { - "$ref": "506" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.luns", - "serializationOptions": { - "json": { - "name": "luns" - } - }, - "isHttpMetadata": false - }, - { - "$id": "530", - "kind": "property", - "name": "defaultFilePath", - "serializedName": "defaultFilePath", - "doc": "SQL Server default file path", - "type": { - "$id": "531", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.defaultFilePath", - "serializationOptions": { - "json": { - "name": "defaultFilePath" - } - }, - "isHttpMetadata": false - }, - { - "$id": "532", - "kind": "property", - "name": "useStoragePool", - "serializedName": "useStoragePool", - "doc": "Use storage pool to build a drive if true or not provided", - "type": { - "$id": "533", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SQLTempDbSettings.useStoragePool", - "serializationOptions": { - "json": { - "name": "useStoragePool" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.sqlTempDbSettings", - "serializationOptions": { - "json": { - "name": "sqlTempDbSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "534", - "kind": "property", - "name": "IsSqlSystemDBOnDataDisk", - "serializedName": "sqlSystemDbOnDataDisk", - "doc": "SQL Server SystemDb Storage on DataPool if true.", - "type": { - "$id": "535", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.sqlSystemDbOnDataDisk", - "serializationOptions": { - "json": { - "name": "sqlSystemDbOnDataDisk" - } - }, - "isHttpMetadata": false - }, - { - "$id": "536", - "kind": "property", - "name": "diskConfigurationType", - "serializedName": "diskConfigurationType", - "doc": "Disk configuration to apply to SQL Server.", - "type": { - "$ref": "95" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.diskConfigurationType", - "serializationOptions": { - "json": { - "name": "diskConfigurationType" - } - }, - "isHttpMetadata": false - }, - { - "$id": "537", - "kind": "property", - "name": "storageWorkloadType", - "serializedName": "storageWorkloadType", - "doc": "Storage workload type.", - "type": { - "$ref": "100" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.storageWorkloadType", - "serializationOptions": { - "json": { - "name": "storageWorkloadType" - } - }, - "isHttpMetadata": false - }, - { - "$id": "538", - "kind": "property", - "name": "enableStorageConfigBlade", - "serializedName": "enableStorageConfigBlade", - "doc": "Enable SQL IaaS Agent storage configuration blade in Azure Portal.", - "type": { - "$id": "539", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.StorageConfigurationSettings.enableStorageConfigBlade", - "serializationOptions": { - "json": { - "name": "enableStorageConfigBlade" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.storageConfigurationSettings", - "serializationOptions": { - "json": { - "name": "storageConfigurationSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "540", - "kind": "property", - "name": "troubleshootingStatus", - "serializedName": "troubleshootingStatus", - "doc": "Troubleshooting status", - "type": { - "$id": "541", - "kind": "model", - "name": "TroubleshootingStatus", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus", - "usage": "Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Status of last troubleshooting operation on this SQL VM", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "542", - "kind": "property", - "name": "rootCause", - "serializedName": "rootCause", - "doc": "Root cause of the issue", - "type": { - "$id": "543", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.rootCause", - "serializationOptions": { - "json": { - "name": "rootCause" - } - }, - "isHttpMetadata": false - }, - { - "$id": "544", - "kind": "property", - "name": "lastTriggerTimeUtc", - "serializedName": "lastTriggerTimeUtc", - "doc": "Last troubleshooting trigger time in UTC timezone", - "type": { - "$id": "545", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "546", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.lastTriggerTimeUtc", - "serializationOptions": { - "json": { - "name": "lastTriggerTimeUtc" - } - }, - "isHttpMetadata": false - }, - { - "$id": "547", - "kind": "property", - "name": "startTimeUtc", - "serializedName": "startTimeUtc", - "doc": "Start time in UTC timezone.", - "type": { - "$id": "548", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "549", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.startTimeUtc", - "serializationOptions": { - "json": { - "name": "startTimeUtc" - } - }, - "isHttpMetadata": false - }, - { - "$id": "550", - "kind": "property", - "name": "endTimeUtc", - "serializedName": "endTimeUtc", - "doc": "End time in UTC timezone.", - "type": { - "$id": "551", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "552", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.endTimeUtc", - "serializationOptions": { - "json": { - "name": "endTimeUtc" - } - }, - "isHttpMetadata": false - }, - { - "$id": "553", - "kind": "property", - "name": "troubleshootingScenario", - "serializedName": "troubleshootingScenario", - "doc": "SQL VM troubleshooting scenario.", - "type": { - "$ref": "105" - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.troubleshootingScenario", - "serializationOptions": { - "json": { - "name": "troubleshootingScenario" - } - }, - "isHttpMetadata": false - }, - { - "$id": "554", - "kind": "property", - "name": "properties", - "serializedName": "properties", - "doc": "Troubleshooting properties", - "type": { - "$id": "555", - "kind": "model", - "name": "TroubleshootingAdditionalProperties", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingAdditionalProperties", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "SQL VM Troubleshooting additional properties.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "556", - "kind": "property", - "name": "unhealthyReplicaInfo", - "serializedName": "unhealthyReplicaInfo", - "doc": "The unhealthy replica information", - "type": { - "$id": "557", - "kind": "model", - "name": "UnhealthyReplicaInfo", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.UnhealthyReplicaInfo", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "SQL VM Troubleshoot UnhealthyReplica scenario information.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "558", - "kind": "property", - "name": "availabilityGroupName", - "serializedName": "availabilityGroupName", - "doc": "The name of the availability group", - "type": { - "$id": "559", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.UnhealthyReplicaInfo.availabilityGroupName", - "serializationOptions": { - "json": { - "name": "availabilityGroupName" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingAdditionalProperties.unhealthyReplicaInfo", - "serializationOptions": { - "json": { - "name": "unhealthyReplicaInfo" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.TroubleshootingStatus.properties", - "serializationOptions": { - "json": { - "name": "properties" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.troubleshootingStatus", - "serializationOptions": { - "json": { - "name": "troubleshootingStatus" - } - }, - "isHttpMetadata": false - }, - { - "$id": "560", - "kind": "property", - "name": "assessmentSettings", - "serializedName": "assessmentSettings", - "doc": "SQL best practices Assessment Settings.", - "type": { - "$id": "561", - "kind": "model", - "name": "SqlVmAssessmentSettings", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AssessmentSettings", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Configure SQL best practices Assessment for databases in your SQL virtual machine.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "562", - "kind": "property", - "name": "IsEnabled", - "serializedName": "enable", - "doc": "Enable or disable SQL best practices Assessment feature on SQL virtual machine.", - "type": { - "$id": "563", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AssessmentSettings.enable", - "serializationOptions": { - "json": { - "name": "enable" - } - }, - "isHttpMetadata": false - }, - { - "$id": "564", - "kind": "property", - "name": "runImmediately", - "serializedName": "runImmediately", - "doc": "Run SQL best practices Assessment immediately on SQL virtual machine.", - "type": { - "$id": "565", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AssessmentSettings.runImmediately", - "serializationOptions": { - "json": { - "name": "runImmediately" - } - }, - "isHttpMetadata": false - }, - { - "$id": "566", - "kind": "property", - "name": "schedule", - "serializedName": "schedule", - "doc": "Schedule for SQL best practices Assessment.", - "type": { - "$id": "567", - "kind": "model", - "name": "SqlVmAssessmentSchedule", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Set assessment schedule for SQL Server.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "568", - "kind": "property", - "name": "IsEnabled", - "serializedName": "enable", - "doc": "Enable or disable assessment schedule on SQL virtual machine.", - "type": { - "$id": "569", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule.enable", - "serializationOptions": { - "json": { - "name": "enable" - } - }, - "isHttpMetadata": false - }, - { - "$id": "570", - "kind": "property", - "name": "weeklyInterval", - "serializedName": "weeklyInterval", - "doc": "Number of weeks to schedule between 2 assessment runs. Takes value from 1-6", - "type": { - "$id": "571", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule.weeklyInterval", - "serializationOptions": { - "json": { - "name": "weeklyInterval" - } - }, - "isHttpMetadata": false - }, - { - "$id": "572", - "kind": "property", - "name": "monthlyOccurrence", - "serializedName": "monthlyOccurrence", - "doc": "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", - "type": { - "$id": "573", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule.monthlyOccurrence", - "serializationOptions": { - "json": { - "name": "monthlyOccurrence" - } - }, - "isHttpMetadata": false - }, - { - "$id": "574", - "kind": "property", - "name": "dayOfWeek", - "serializedName": "dayOfWeek", - "doc": "Day of the week to run assessment.", - "type": { - "$ref": "108" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule.dayOfWeek", - "serializationOptions": { - "json": { - "name": "dayOfWeek" - } - }, - "isHttpMetadata": false - }, - { - "$id": "575", - "kind": "property", - "name": "startTime", - "serializedName": "startTime", - "doc": "Time of the day in HH:mm format. Eg. 17:30", - "type": { - "$id": "576", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Schedule.startTime", - "serializationOptions": { - "json": { - "name": "startTime" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AssessmentSettings.schedule", - "serializationOptions": { - "json": { - "name": "schedule" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.assessmentSettings", - "serializationOptions": { - "json": { - "name": "assessmentSettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "577", - "kind": "property", - "name": "enableAutomaticUpgrade", - "serializedName": "enableAutomaticUpgrade", - "doc": "Enable automatic upgrade of Sql IaaS extension Agent.", - "type": { - "$id": "578", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.enableAutomaticUpgrade", - "serializationOptions": { - "json": { - "name": "enableAutomaticUpgrade" - } - }, - "isHttpMetadata": false - }, - { - "$id": "579", - "kind": "property", - "name": "additionalVmPatch", - "serializedName": "additionalVmPatch", - "doc": "Additional VM Patching solution enabled on the Virtual Machine", - "type": { - "$ref": "117" - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.additionalVmPatch", - "serializationOptions": { - "json": { - "name": "additionalVmPatch" - } - }, - "isHttpMetadata": false - }, - { - "$id": "580", - "kind": "property", - "name": "virtualMachineIdentitySettings", - "serializedName": "virtualMachineIdentitySettings", - "doc": "Virtual Machine Identity details used for Sql IaaS extension configurations.", - "type": { - "$id": "581", - "kind": "model", - "name": "VirtualMachineIdentity", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.VirtualMachineIdentity", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Virtual Machine Identity details used for Sql IaaS extension configurations.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "582", - "kind": "property", - "name": "type", - "serializedName": "type", - "doc": "Identity type of the virtual machine. Specify None to opt-out of Managed Identities.", - "type": { - "$ref": "122" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.VirtualMachineIdentity.type", - "serializationOptions": { - "json": { - "name": "type" - } - }, - "isHttpMetadata": false - }, - { - "$id": "583", - "kind": "property", - "name": "resourceId", - "serializedName": "resourceId", - "doc": "ARM Resource Id of the identity. Only required when UserAssigned identity is selected.", - "type": { - "$id": "584", - "kind": "string", - "name": "armResourceIdentifier", - "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", - "baseType": { - "$id": "585", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.VirtualMachineIdentity.resourceId", - "serializationOptions": { - "json": { - "name": "resourceId" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.virtualMachineIdentitySettings", - "serializationOptions": { - "json": { - "name": "virtualMachineIdentitySettings" - } - }, - "isHttpMetadata": false - }, - { - "$id": "586", - "kind": "property", - "name": "osType", - "serializedName": "osType", - "doc": "Operating System of the current SQL Virtual Machine.", - "type": { - "$ref": "127" - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineProperties.osType", - "serializationOptions": { - "json": { - "name": "osType" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": true, - "decorators": [ - { - "name": "Azure.ResourceManager.@flattenProperty", - "arguments": {} - } - ], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachine.properties", - "serializationOptions": { - "json": { - "name": "properties" - } - }, - "isHttpMetadata": false - }, - { - "$id": "587", - "kind": "property", - "name": "name", - "serializedName": "name", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "588", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachine.name", - "serializationOptions": { - "json": { - "name": "name" - } - }, - "isHttpMetadata": true - }, - { - "$id": "589", - "kind": "property", - "name": "identity", - "serializedName": "identity", - "doc": "DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server.", - "type": { - "$id": "590", - "kind": "model", - "name": "ManagedServiceIdentity", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Managed service identity (system assigned and/or user assigned identities)", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "591", - "kind": "property", - "name": "principalId", - "serializedName": "principalId", - "doc": "The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", - "type": { - "$id": "592", - "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "593", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId", - "serializationOptions": { - "json": { - "name": "principalId" - } - }, - "isHttpMetadata": false - }, - { - "$id": "594", - "kind": "property", - "name": "tenantId", - "serializedName": "tenantId", - "doc": "The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", - "type": { - "$id": "595", - "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "596", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId", - "serializationOptions": { - "json": { - "name": "tenantId" - } - }, - "isHttpMetadata": false - }, - { - "$id": "597", - "kind": "property", - "name": "type", - "serializedName": "type", - "doc": "The type of managed identity assigned to this resource.", - "type": { - "$ref": "131" - }, - "optional": false, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", - "serializationOptions": { - "json": { - "name": "type" - } - }, - "isHttpMetadata": false - }, - { - "$id": "598", - "kind": "property", - "name": "userAssignedIdentities", - "serializedName": "userAssignedIdentities", - "doc": "The identities assigned to this resource by the user.", - "type": { - "$id": "599", - "kind": "dict", - "keyType": { - "$id": "600", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "valueType": { - "$id": "601", - "kind": "model", - "name": "UserAssignedIdentity", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "User assigned identity properties", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "602", - "kind": "property", - "name": "principalId", - "serializedName": "principalId", - "doc": "The principal ID of the assigned identity.", - "type": { - "$id": "603", - "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "604", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId", - "serializationOptions": { - "json": { - "name": "principalId" - } - }, - "isHttpMetadata": false - }, - { - "$id": "605", - "kind": "property", - "name": "clientId", - "serializedName": "clientId", - "doc": "The client ID of the assigned identity.", - "type": { - "$id": "606", - "kind": "string", - "name": "uuid", - "crossLanguageDefinitionId": "Azure.Core.uuid", - "baseType": { - "$id": "607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId", - "serializationOptions": { - "json": { - "name": "clientId" - } - }, - "isHttpMetadata": false - } - ] - }, - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", - "serializationOptions": { - "json": { - "name": "userAssignedIdentities" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachine.identity", - "serializationOptions": { - "json": { - "name": "identity" - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$ref": "380" - }, - { - "$ref": "396" - }, - { - "$ref": "407" - }, - { - "$ref": "417" - }, - { - "$ref": "445" - }, - { - "$ref": "457" - }, - { - "$ref": "459" - }, - { - "$ref": "468" - }, - { - "$ref": "471" - }, - { - "$ref": "478" - }, - { - "$ref": "482" - }, - { - "$ref": "498" - }, - { - "$ref": "502" - }, - { - "$ref": "504" - }, - { - "$ref": "514" - }, - { - "$ref": "541" - }, - { - "$ref": "555" - }, - { - "$ref": "557" - }, - { - "$ref": "561" - }, - { - "$ref": "567" - }, - { - "$ref": "581" - }, - { - "$ref": "590" - }, - { - "$ref": "601" - }, - { - "$ref": "371" - }, - { - "$id": "608", - "kind": "model", - "name": "SqlVmPatch", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineUpdate", - "usage": "Input,Json", - "doc": "An update to a SQL virtual machine.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "609", - "kind": "property", - "name": "tags", - "serializedName": "tags", - "doc": "Resource tags.", - "type": { - "$ref": "373" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineUpdate.tags", - "serializationOptions": { - "json": { - "name": "tags" - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "610", - "kind": "model", - "name": "SqlVirtualMachineListResult", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", - "usage": "Output,Json", - "doc": "The response of a SqlVirtualMachine list operation.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "611", - "kind": "property", - "name": "value", - "serializedName": "value", - "doc": "The SqlVirtualMachine items on this page", - "type": { - "$id": "612", - "kind": "array", - "name": "ArraySqlVirtualMachine", - "valueType": { - "$ref": "370" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", - "serializationOptions": { - "json": { - "name": "value" - } - }, - "isHttpMetadata": false - }, - { - "$id": "613", - "kind": "property", - "name": "nextLink", - "serializedName": "nextLink", - "doc": "The link to the next page of items", - "type": { - "$id": "614", - "kind": "url", - "name": "ResourceLocation", - "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", - "baseType": { - "$id": "615", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", - "serializationOptions": { - "json": { - "name": "nextLink" - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "616", - "kind": "model", - "name": "SqlVmDiskConfigAssessmentContent", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.DiskConfigAssessmentRequest", - "usage": "Input,Json", - "doc": "Configure disk config assessment for databases in your SQL virtual machine.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "617", - "kind": "property", - "name": "runDiskConfigRules", - "serializedName": "runDiskConfigRules", - "doc": "Boolean to run disk config Assessment. Use false to fetch past Assessment.", - "type": { - "$id": "618", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.DiskConfigAssessmentRequest.runDiskConfigRules", - "serializationOptions": { - "json": { - "name": "runDiskConfigRules" - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "619", - "kind": "model", - "name": "SqlVmGroup", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroup", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "A SQL virtual machine group.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - }, - { - "name": "Azure.ResourceManager.Private.@armResourceInternal", - "arguments": {} - } - ], - "baseModel": { - "$ref": "371" - }, - "properties": [ - { - "$id": "620", - "kind": "property", - "name": "properties", - "serializedName": "properties", - "doc": "Resource properties.", - "type": { - "$id": "621", - "kind": "model", - "name": "SqlVirtualMachineGroupProperties", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "The properties of a SQL virtual machine group.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "622", - "kind": "property", - "name": "provisioningState", - "serializedName": "provisioningState", - "doc": "Provisioning state to track the async operation status.", - "type": { - "$id": "623", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.provisioningState", - "serializationOptions": { - "json": { - "name": "provisioningState" - } - }, - "isHttpMetadata": false - }, - { - "$id": "624", - "kind": "property", - "name": "sqlImageOffer", - "serializedName": "sqlImageOffer", - "doc": "SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.", - "type": { - "$id": "625", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.sqlImageOffer", - "serializationOptions": { - "json": { - "name": "sqlImageOffer" - } - }, - "isHttpMetadata": false - }, - { - "$id": "626", - "kind": "property", - "name": "sqlImageSku", - "serializedName": "sqlImageSku", - "doc": "SQL image sku.", - "type": { - "$ref": "137" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.sqlImageSku", - "serializationOptions": { - "json": { - "name": "sqlImageSku" - } - }, - "isHttpMetadata": false - }, - { - "$id": "627", - "kind": "property", - "name": "scaleType", - "serializedName": "scaleType", - "doc": "Scale type.", - "type": { - "$ref": "141" - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.scaleType", - "serializationOptions": { - "json": { - "name": "scaleType" - } - }, - "isHttpMetadata": false - }, - { - "$id": "628", - "kind": "property", - "name": "clusterManagerType", - "serializedName": "clusterManagerType", - "doc": "Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type.", - "type": { - "$ref": "144" - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.clusterManagerType", - "serializationOptions": { - "json": { - "name": "clusterManagerType" - } - }, - "isHttpMetadata": false - }, - { - "$id": "629", - "kind": "property", - "name": "clusterConfiguration", - "serializedName": "clusterConfiguration", - "doc": "Cluster type.", - "type": { - "$ref": "147" - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.clusterConfiguration", - "serializationOptions": { - "json": { - "name": "clusterConfiguration" - } - }, - "isHttpMetadata": false - }, - { - "$id": "630", - "kind": "property", - "name": "WindowsServerFailoverClusterDomainProfile", - "serializedName": "wsfcDomainProfile", - "doc": "Cluster Active Directory domain profile.", - "type": { - "$id": "631", - "kind": "model", - "name": "WindowsServerFailoverClusterDomainProfile", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Active Directory account details to operate Windows Server Failover Cluster.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "632", - "kind": "property", - "name": "domainFqdn", - "serializedName": "domainFqdn", - "doc": "Fully qualified name of the domain.", - "type": { - "$id": "633", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.domainFqdn", - "serializationOptions": { - "json": { - "name": "domainFqdn" - } - }, - "isHttpMetadata": false - }, - { - "$id": "634", - "kind": "property", - "name": "OrganizationalUnitPath", - "serializedName": "ouPath", - "doc": "Organizational Unit path in which the nodes and cluster will be present.", - "type": { - "$id": "635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.ouPath", - "serializationOptions": { - "json": { - "name": "ouPath" - } - }, - "isHttpMetadata": false - }, - { - "$id": "636", - "kind": "property", - "name": "clusterBootstrapAccount", - "serializedName": "clusterBootstrapAccount", - "doc": "Account name used for creating cluster (at minimum needs permissions to 'Create Computer Objects' in domain).", - "type": { - "$id": "637", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.clusterBootstrapAccount", - "serializationOptions": { - "json": { - "name": "clusterBootstrapAccount" - } - }, - "isHttpMetadata": false - }, - { - "$id": "638", - "kind": "property", - "name": "clusterOperatorAccount", - "serializedName": "clusterOperatorAccount", - "doc": "Account name used for operating cluster i.e. will be part of administrators group on all the participating virtual machines in the cluster.", - "type": { - "$id": "639", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.clusterOperatorAccount", - "serializationOptions": { - "json": { - "name": "clusterOperatorAccount" - } - }, - "isHttpMetadata": false - }, - { - "$id": "640", - "kind": "property", - "name": "sqlServiceAccount", - "serializedName": "sqlServiceAccount", - "doc": "Account name under which SQL service will run on all participating SQL virtual machines in the cluster.", - "type": { - "$id": "641", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.sqlServiceAccount", - "serializationOptions": { - "json": { - "name": "sqlServiceAccount" - } - }, - "isHttpMetadata": false - }, - { - "$id": "642", - "kind": "property", - "name": "isSqlServiceAccountGmsa", - "serializedName": "isSqlServiceAccountGmsa", - "doc": "The flag to check if SQL service account is GMSA.", - "type": { - "$id": "643", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.isSqlServiceAccountGmsa", - "serializationOptions": { - "json": { - "name": "isSqlServiceAccountGmsa" - } - }, - "isHttpMetadata": false - }, - { - "$id": "644", - "kind": "property", - "name": "fileShareWitnessPath", - "serializedName": "fileShareWitnessPath", - "doc": "Optional path for fileshare witness.", - "type": { - "$id": "645", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.fileShareWitnessPath", - "serializationOptions": { - "json": { - "name": "fileShareWitnessPath" - } - }, - "isHttpMetadata": false - }, - { - "$id": "646", - "kind": "property", - "name": "storageAccountUrl", - "serializedName": "storageAccountUrl", - "doc": "Fully qualified ARM resource id of the witness storage account.", - "type": { - "$id": "647", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.storageAccountUrl", - "serializationOptions": { - "json": { - "name": "storageAccountUrl" - } - }, - "isHttpMetadata": false - }, - { - "$id": "648", - "kind": "property", - "name": "storageAccountPrimaryKey", - "serializedName": "storageAccountPrimaryKey", - "doc": "Primary key of the witness storage account.", - "type": { - "$id": "649", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.storageAccountPrimaryKey", - "serializationOptions": { - "json": { - "name": "storageAccountPrimaryKey" - } - }, - "isHttpMetadata": false - }, - { - "$id": "650", - "kind": "property", - "name": "clusterSubnetType", - "serializedName": "clusterSubnetType", - "doc": "Cluster subnet type.", - "type": { - "$ref": "150" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.WsfcDomainProfile.clusterSubnetType", - "serializationOptions": { - "json": { - "name": "clusterSubnetType" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupProperties.wsfcDomainProfile", - "serializationOptions": { - "json": { - "name": "wsfcDomainProfile" - } - }, - "isHttpMetadata": false - } - ] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": true, - "decorators": [ - { - "name": "Azure.ResourceManager.@flattenProperty", - "arguments": {} - } - ], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroup.properties", - "serializationOptions": { - "json": { - "name": "properties" - } - }, - "isHttpMetadata": false - }, - { - "$id": "651", - "kind": "property", - "name": "name", - "serializedName": "name", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "652", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroup.name", - "serializationOptions": { - "json": { - "name": "name" - } - }, - "isHttpMetadata": true - } - ] - }, - { - "$ref": "621" - }, - { - "$ref": "631" - }, - { - "$id": "653", - "kind": "model", - "name": "SqlVirtualMachineGroupUpdate", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupUpdate", - "usage": "Input,Json", - "doc": "An update to a SQL virtual machine group.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "654", - "kind": "property", - "name": "tags", - "serializedName": "tags", - "doc": "Resource tags.", - "type": { - "$ref": "373" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroupUpdate.tags", - "serializationOptions": { - "json": { - "name": "tags" - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "655", - "kind": "model", - "name": "SqlVirtualMachineGroupListResult", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult", - "usage": "Output,Json", - "doc": "The response of a SqlVirtualMachineGroup list operation.", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "656", - "kind": "property", - "name": "value", - "serializedName": "value", - "doc": "The SqlVirtualMachineGroup items on this page", - "type": { - "$id": "657", - "kind": "array", - "name": "ArraySqlVirtualMachineGroup", - "valueType": { - "$ref": "619" - }, - "crossLanguageDefinitionId": "TypeSpec.Array", - "decorators": [] - }, - "optional": false, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", - "serializationOptions": { - "json": { - "name": "value" - } - }, - "isHttpMetadata": false - }, - { - "$id": "658", - "kind": "property", - "name": "nextLink", - "serializedName": "nextLink", - "doc": "The link to the next page of items", - "type": { - "$id": "659", - "kind": "url", - "name": "ResourceLocation", - "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", - "baseType": { - "$id": "660", - "kind": "url", - "name": "url", - "crossLanguageDefinitionId": "TypeSpec.url", - "decorators": [] - }, - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", - "serializationOptions": { - "json": { - "name": "nextLink" - } - }, - "isHttpMetadata": false - } - ] - }, - { - "$id": "661", - "kind": "model", - "name": "SqlVmTroubleshooting", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting", - "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", - "doc": "Details required for SQL VM troubleshooting", - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - } - ], - "properties": [ - { - "$id": "662", - "kind": "property", - "name": "startTimeUtc", - "serializedName": "startTimeUtc", - "doc": "Start time in UTC timezone.", - "type": { - "$id": "663", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "664", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting.startTimeUtc", - "serializationOptions": { - "json": { - "name": "startTimeUtc" - } - }, - "isHttpMetadata": false - }, - { - "$id": "665", - "kind": "property", - "name": "endTimeUtc", - "serializedName": "endTimeUtc", - "doc": "End time in UTC timezone.", - "type": { - "$id": "666", - "kind": "utcDateTime", - "name": "utcDateTime", - "encode": "rfc3339", - "wireType": { - "$id": "667", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "crossLanguageDefinitionId": "TypeSpec.utcDateTime", - "decorators": [] - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting.endTimeUtc", - "serializationOptions": { - "json": { - "name": "endTimeUtc" - } - }, - "isHttpMetadata": false - }, - { - "$id": "668", - "kind": "property", - "name": "troubleshootingScenario", - "serializedName": "troubleshootingScenario", - "doc": "SQL VM troubleshooting scenario.", - "type": { - "$ref": "105" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting.troubleshootingScenario", - "serializationOptions": { - "json": { - "name": "troubleshootingScenario" - } - }, - "isHttpMetadata": false - }, - { - "$id": "669", - "kind": "property", - "name": "properties", - "serializedName": "properties", - "doc": "Troubleshooting properties", - "type": { - "$ref": "555" - }, - "optional": true, - "readOnly": false, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting.properties", - "serializationOptions": { - "json": { - "name": "properties" - } - }, - "isHttpMetadata": false - }, - { - "$id": "670", - "kind": "property", - "name": "virtualMachineResourceId", - "serializedName": "virtualMachineResourceId", - "doc": "Virtual machine resource id for response.", - "type": { - "$id": "671", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "optional": true, - "readOnly": true, - "discriminator": false, - "flatten": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVmTroubleshooting.virtualMachineResourceId", - "serializationOptions": { - "json": { - "name": "virtualMachineResourceId" - } - }, - "isHttpMetadata": false - } - ] - } - ], - "clients": [ - { - "$id": "672", - "kind": "client", - "name": "SqlVirtualMachineClient", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "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.", - "methods": [], - "parameters": [ - { - "$id": "673", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "674", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "675", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.endpoint" - }, - { - "$id": "676", - "kind": "method", - "name": "apiVersion", - "serializedName": "apiVersion", - "doc": "The API version to use for this operation.", - "type": { - "$id": "677", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "", - "isApiVersion": true, - "defaultValue": { - "type": { - "$id": "678", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list.apiVersion", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "679", - "kind": "method", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "680", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.subscriptionId", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "initializedBy": 1, - "decorators": [ - { - "name": "Azure.ResourceManager.@armProviderNamespace", - "arguments": {} - }, - { - "name": "Azure.ClientGenerator.Core.@armProviderSchema", - "arguments": { - "resources": [ - { - "resourceModelId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListener", - "resourceIdPattern": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", - "resourceType": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners", - "methods": [ - { - "$id": "681", - "methodId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate", - "kind": "Create", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}" - }, - { - "$id": "682", - "methodId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get", - "kind": "Read", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}" - }, - { - "$id": "683", - "methodId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete", - "kind": "Delete", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}" - }, - { - "$id": "684", - "methodId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup", - "kind": "List", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" - } - ], - "resourceScope": "ResourceGroup", - "parentResourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", - "resourceName": "AvailabilityGroupListener" - }, - { - "resourceModelId": "Microsoft.SqlVirtualMachine.SqlVirtualMachine", - "resourceIdPattern": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", - "resourceType": "Microsoft.SqlVirtualMachine/sqlVirtualMachines", - "methods": [ - { - "$id": "685", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate", - "kind": "Create", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" - }, - { - "$id": "686", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get", - "kind": "Read", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" - }, - { - "$id": "687", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update", - "kind": "Update", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" - }, - { - "$id": "688", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete", - "kind": "Delete", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" - }, - { - "$id": "689", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list", - "kind": "List", - "operationPath": "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", - "operationScope": "Subscription" - }, - { - "$id": "690", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup", - "kind": "List", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", - "operationScope": "ResourceGroup" - }, - { - "$id": "691", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment", - "kind": "Action", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/fetchDCAssessment", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" - }, - { - "$id": "692", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy", - "kind": "Action", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" - }, - { - "$id": "693", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment", - "kind": "Action", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" - }, - { - "$id": "694", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot", - "kind": "Action", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/troubleshoot", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}" - } - ], - "resourceScope": "ResourceGroup", - "resourceName": "SqlVm" - }, - { - "resourceModelId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroup", - "resourceIdPattern": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", - "resourceType": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", - "methods": [ - { - "$id": "695", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate", - "kind": "Create", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" - }, - { - "$id": "696", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get", - "kind": "Read", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" - }, - { - "$id": "697", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update", - "kind": "Update", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" - }, - { - "$id": "698", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete", - "kind": "Delete", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" - }, - { - "$id": "699", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list", - "kind": "List", - "operationPath": "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", - "operationScope": "Subscription" - }, - { - "$id": "700", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup", - "kind": "List", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", - "operationScope": "ResourceGroup" - }, - { - "$id": "701", - "methodId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup", - "kind": "Action", - "operationPath": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines", - "operationScope": "ResourceGroup", - "resourceScope": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}" - } - ], - "resourceScope": "ResourceGroup", - "resourceName": "SqlVmGroup" - } - ], - "nonResourceMethods": [ - { - "methodId": "Microsoft.SqlVirtualMachine.Operations.list", - "operationPath": "/providers/Microsoft.SqlVirtualMachine/operations", - "operationScope": "Tenant" - } - ] - } - } - ], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine", - "apiVersions": [ - "2023-10-01" - ], - "children": [ - { - "$id": "702", - "kind": "client", - "name": "Operations", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "doc": "This is the interface that implements the standard Azure Resource Manager operation that returns\nall supported RP operations. You should have exactly one declaration for each\nAzure Resource Manager service. It implements\nGET \"/providers/Microsoft.ContosoProviderHub/operations\"", - "methods": [ - { - "$id": "703", - "kind": "paging", - "name": "list", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Lists all of the available SQL Virtual Machine Rest API operations.", - "operation": { - "$id": "704", - "name": "list", - "resourceName": "Operations", - "doc": "Lists all of the available SQL Virtual Machine Rest API operations.", - "accessibility": "public", - "parameters": [ - { - "$id": "705", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "707", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list.apiVersion", - "readOnly": false - }, - { - "$id": "708", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "157" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "229" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/providers/Microsoft.SqlVirtualMachine/operations", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list", - "decorators": [], - "examples": [ - { - "$id": "709", - "kind": "http", - "name": "Lists all of the available SQL Virtual Machine Rest API operations.", - "description": "Lists all of the available SQL Virtual Machine Rest API operations.", - "filePath": "2023-10-01/ListOperation.json", - "parameters": [ - { - "parameter": { - "$ref": "705" - }, - "value": { - "$id": "710", - "kind": "string", - "type": { - "$ref": "706" - }, - "value": "2023-10-01" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "229" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "711", - "kind": "model", - "type": { - "$ref": "229" - }, - "value": { - "value": { - "$id": "712", - "kind": "array", - "type": { - "$ref": "231" - }, - "value": [ - { - "$id": "713", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "714", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/read" - }, - "display": { - "$id": "715", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "716", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Retrieve details of SQL virtual machine group" - }, - "operation": { - "$id": "717", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Get SQL virtual machine group details" - }, - "resource": { - "$id": "718", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "SQL virtual machine group" - } - } - } - } - }, - { - "$id": "719", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "720", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/write" - }, - "display": { - "$id": "721", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "722", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Create a new or change properties of existing SQL virtual machine group" - }, - "operation": { - "$id": "723", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Create a new or update existing SQL virtual machine group" - }, - "resource": { - "$id": "724", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "SQL virtual machine group" - } - } - } - } - }, - { - "$id": "725", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "726", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/delete" - }, - "display": { - "$id": "727", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "728", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Delete existing SQL virtual machine group" - }, - "operation": { - "$id": "729", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Delete existing SQL virtual machine group" - }, - "resource": { - "$id": "730", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "SQL virtual machine group" - } - } - } - } - }, - { - "$id": "731", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "732", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners/read" - }, - "display": { - "$id": "733", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "734", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Retrieve details of SQL availability group listener on a given SQL virtual machine group" - }, - "operation": { - "$id": "735", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Get availability group listener details" - }, - "resource": { - "$id": "736", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "SQL availability group listener" - } - } - } - } - }, - { - "$id": "737", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "738", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners/write" - }, - "display": { - "$id": "739", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "740", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Create a new or changes properties of existing SQL availability group listener" - }, - "operation": { - "$id": "741", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Create new or update existing availability group listener" - }, - "resource": { - "$id": "742", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "SQL availability group listener" - } - } - } - } - }, - { - "$id": "743", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "744", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners/delete" - }, - "display": { - "$id": "745", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "746", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Delete existing availability group listener" - }, - "operation": { - "$id": "747", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Delete existing availability group listener" - }, - "resource": { - "$id": "748", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "SQL availability group listener" - } - } - } - } - }, - { - "$id": "749", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "750", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/sqlVirtualMachines/read" - }, - "display": { - "$id": "751", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "752", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "List Sql virtual machines by a particular sql virtual virtual machine group" - }, - "operation": { - "$id": "753", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "List Sql virtual machines by a particular sql virtual virtual machine group" - } - } - } - } - }, - { - "$id": "754", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "755", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/startAssessment/action" - }, - "display": { - "$id": "756", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "757", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Starts SQL best practices Assessment on SQL virtual machine" - }, - "operation": { - "$id": "758", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Starts SQL best practices Assessment on SQL virtual machine" - } - } - } - } - }, - { - "$id": "759", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "760", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/redeploy/action" - }, - "display": { - "$id": "761", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "762", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Redeploy existing SQL virtual machine" - }, - "operation": { - "$id": "763", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Redeploy existing SQL virtual machine" - } - } - } - } - }, - { - "$id": "764", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "765", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/read" - }, - "display": { - "$id": "766", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "767", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Retrieve details of SQL virtual machine" - }, - "operation": { - "$id": "768", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Get SQL virtual machine instance details" - } - } - } - } - }, - { - "$id": "769", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "770", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/write" - }, - "display": { - "$id": "771", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "772", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Create a new or change properties of existing SQL virtual machine" - }, - "operation": { - "$id": "773", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Create new or update existing SQL virtual machine" - } - } - } - } - }, - { - "$id": "774", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "775", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/delete" - }, - "display": { - "$id": "776", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "777", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Delete existing SQL virtual machine" - }, - "operation": { - "$id": "778", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Delete existing SQL virtual machine" - } - } - } - } - }, - { - "$id": "779", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "780", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/fetchDCAssessment/action" - }, - "display": { - "$id": "781", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": {} - } - } - }, - { - "$id": "782", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "783", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines/troubleshoot/action" - }, - "display": { - "$id": "784", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "785", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Start SQL virtual machine troubleshooting operation" - }, - "operation": { - "$id": "786", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Start SQL virtual machine troubleshooting operation" - } - } - } - } - }, - { - "$id": "787", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "788", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/locations/registerSqlVmCandidate/action" - }, - "display": { - "$id": "789", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "790", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Register SQL Vm Candidate" - }, - "operation": { - "$id": "791", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Register SQL Vm Candidate" - } - } - } - } - }, - { - "$id": "792", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "793", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/locations/availabilityGroupListenerOperationResults/read" - }, - "display": { - "$id": "794", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "795", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Get result of an availability group listener operation" - }, - "operation": { - "$id": "796", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Get availability group listener operation result" - }, - "resource": { - "$id": "797", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "SQL availability group listener" - } - } - } - } - }, - { - "$id": "798", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "799", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/register/action" - }, - "display": { - "$id": "800", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "801", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Register subscription with Microsoft.SqlVirtualMachine resource provider" - }, - "operation": { - "$id": "802", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Register subscription for SQL Virtual Machine" - }, - "resource": { - "$id": "803", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "Microsoft SQL Virtual Machine" - } - } - } - } - }, - { - "$id": "804", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "805", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/unregister/action" - }, - "display": { - "$id": "806", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "807", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Unregister subscription with Microsoft.SqlVirtualMachine resource provider" - }, - "operation": { - "$id": "808", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Unregister subscription for SQL Virtual Machine" - }, - "resource": { - "$id": "809", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "Microsoft SQL Virtual Machine" - } - } - } - } - }, - { - "$id": "810", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "811", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/operations/read" - }, - "display": { - "$id": "812", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "resource": { - "$id": "813", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "Available REST operations" - } - } - } - } - }, - { - "$id": "814", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "815", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/locations/sqlVirtualMachineGroupOperationResults/read" - }, - "display": { - "$id": "816", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "817", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Get result of a SQL virtual machine group operation" - }, - "operation": { - "$id": "818", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Get SQL virtual machine group operation result" - }, - "resource": { - "$id": "819", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "SQL virtual machine group" - } - } - } - } - }, - { - "$id": "820", - "kind": "model", - "type": { - "$ref": "232" - }, - "value": { - "name": { - "$id": "821", - "kind": "string", - "type": { - "$ref": "234" - }, - "value": "Microsoft.SqlVirtualMachine/locations/sqlVirtualMachineOperationResults/read" - }, - "display": { - "$id": "822", - "kind": "model", - "type": { - "$ref": "236" - }, - "value": { - "description": { - "$id": "823", - "kind": "string", - "type": { - "$ref": "244" - }, - "value": "Get result of SQL virtual machine operation" - }, - "operation": { - "$id": "824", - "kind": "string", - "type": { - "$ref": "242" - }, - "value": "Get SQL virtual machine operation result" - }, - "resource": { - "$id": "825", - "kind": "string", - "type": { - "$ref": "240" - }, - "value": "SQL virtual machine" - } - } - } - } - } - ] - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "826", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "157" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "231" - }, - "resultSegments": [ - "value" - ] - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.list", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - }, - "pageSizeParameterSegments": [] - } - } - ], - "parameters": [ - { - "$id": "827", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "828", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "829", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations.endpoint" - }, - { - "$ref": "676" - } - ], - "initializedBy": 0, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.Operations", - "apiVersions": [ - "2023-10-01" - ], - "parent": { - "$ref": "672" - }, - "isMultiServiceClient": false - }, - { - "$id": "830", - "kind": "client", - "name": "AvailabilityGroupListeners", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "methods": [ - { - "$id": "831", - "kind": "basic", - "name": "get", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Gets an availability group listener.", - "operation": { - "$id": "832", - "name": "get", - "resourceName": "AvailabilityGroupListener", - "doc": "Gets an availability group listener.", - "accessibility": "public", - "parameters": [ - { - "$id": "833", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "834", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "835", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.apiVersion", - "readOnly": false - }, - { - "$id": "836", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "837", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.subscriptionId" - }, - { - "$id": "838", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "839", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.resourceGroupName" - }, - { - "$id": "840", - "kind": "path", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "841", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.sqlVirtualMachineGroupName" - }, - { - "$id": "842", - "kind": "path", - "name": "availabilityGroupListenerName", - "serializedName": "availabilityGroupListenerName", - "doc": "Name of the availability group listener.", - "type": { - "$id": "843", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.availabilityGroupListenerName" - }, - { - "$id": "844", - "kind": "query", - "name": "$expand", - "serializedName": "$expand", - "doc": "The child resources to include in the response.", - "type": { - "$id": "845", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "optional": true, - "scope": "Method", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.$expand", - "readOnly": false - }, - { - "$id": "846", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "159" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "271" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceRead", - "arguments": {} - } - ], - "examples": [ - { - "$id": "847", - "kind": "http", - "name": "Gets an availability group listener.", - "description": "Gets an availability group listener.", - "filePath": "2023-10-01/GetAvailabilityGroupListener.json", - "parameters": [ - { - "parameter": { - "$ref": "833" - }, - "value": { - "$id": "848", - "kind": "string", - "type": { - "$ref": "834" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "842" - }, - "value": { - "$id": "849", - "kind": "string", - "type": { - "$ref": "843" - }, - "value": "agl-test" - } - }, - { - "parameter": { - "$ref": "838" - }, - "value": { - "$id": "850", - "kind": "string", - "type": { - "$ref": "839" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "840" - }, - "value": { - "$id": "851", - "kind": "string", - "type": { - "$ref": "841" - }, - "value": "testvmgroup" - } - }, - { - "parameter": { - "$ref": "836" - }, - "value": { - "$id": "852", - "kind": "string", - "type": { - "$ref": "837" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "271" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "853", - "kind": "model", - "type": { - "$ref": "271" - }, - "value": { - "name": { - "$id": "854", - "kind": "string", - "type": { - "$ref": "348" - }, - "value": "agl-test" - }, - "type": { - "$id": "855", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" - }, - "id": { - "$id": "856", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" - }, - "properties": { - "$id": "857", - "kind": "model", - "type": { - "$ref": "297" - }, - "value": { - "availabilityGroupName": { - "$id": "858", - "kind": "string", - "type": { - "$ref": "301" - }, - "value": "ag-test" - }, - "loadBalancerConfigurations": { - "$id": "859", - "kind": "array", - "type": { - "$ref": "303" - }, - "value": [ - { - "$id": "860", - "kind": "model", - "type": { - "$ref": "304" - }, - "value": { - "loadBalancerResourceId": { - "$id": "861", - "kind": "string", - "type": { - "$ref": "317" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test" - }, - "privateIpAddress": { - "$id": "862", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "863", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.1.0.112" - }, - "subnetResourceId": { - "$id": "864", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" - } - } - }, - "probePort": { - "$id": "865", - "kind": "number", - "type": { - "$ref": "320" - }, - "value": 59983 - }, - "sqlVirtualMachineInstances": { - "$id": "866", - "kind": "array", - "type": { - "$ref": "322" - }, - "value": [ - { - "$id": "867", - "kind": "string", - "type": { - "$ref": "323" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" - }, - { - "$id": "868", - "kind": "string", - "type": { - "$ref": "323" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - } - ] - } - } - } - ] - }, - "port": { - "$id": "869", - "kind": "number", - "type": { - "$ref": "334" - }, - "value": 1433 - }, - "provisioningState": { - "$id": "870", - "kind": "string", - "type": { - "$ref": "299" - }, - "value": "Succeeded" - } - } - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "871", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "872", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "873", - "kind": "method", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "874", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.sqlVirtualMachineGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "875", - "kind": "method", - "name": "availabilityGroupListenerName", - "serializedName": "availabilityGroupListenerName", - "doc": "Name of the availability group listener.", - "type": { - "$id": "876", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.availabilityGroupListenerName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "877", - "kind": "method", - "name": "$expand", - "serializedName": "$expand", - "doc": "The child resources to include in the response.", - "type": { - "$id": "878", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Query", - "isApiVersion": false, - "optional": true, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.$expand", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "879", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "159" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "271" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get" - }, - { - "$id": "880", - "kind": "lro", - "name": "createOrUpdate", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Creates or updates an availability group listener.", - "operation": { - "$id": "881", - "name": "createOrUpdate", - "resourceName": "AvailabilityGroupListener", - "doc": "Creates or updates an availability group listener.", - "accessibility": "public", - "parameters": [ - { - "$id": "882", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "883", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "884", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.apiVersion", - "readOnly": false - }, - { - "$id": "885", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "886", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.subscriptionId" - }, - { - "$id": "887", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "888", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.resourceGroupName" - }, - { - "$id": "889", - "kind": "path", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "890", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.sqlVirtualMachineGroupName" - }, - { - "$id": "891", - "kind": "path", - "name": "availabilityGroupListenerName", - "serializedName": "availabilityGroupListenerName", - "doc": "Name of the availability group listener.", - "type": { - "$id": "892", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.availabilityGroupListenerName" - }, - { - "$id": "893", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "161" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.contentType" - }, - { - "$id": "894", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "163" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.accept" - }, - { - "$id": "895", - "kind": "body", - "name": "parameters", - "serializedName": "parameters", - "doc": "The availability group listener.", - "type": { - "$ref": "271" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.resource" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "271" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "271" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$id": "896", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "897", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "PUT", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", - "requestMediaTypes": [ - "application/json" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", - "arguments": {} - } - ], - "examples": [ - { - "$id": "898", - "kind": "http", - "name": "Creates or updates an availability group listener using load balancer. This is used for VMs present in single subnet.", - "description": "Creates or updates an availability group listener using load balancer. This is used for VMs present in single subnet.", - "filePath": "2023-10-01/CreateOrUpdateAvailabilityGroupListener.json", - "parameters": [ - { - "parameter": { - "$ref": "882" - }, - "value": { - "$id": "899", - "kind": "string", - "type": { - "$ref": "883" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "891" - }, - "value": { - "$id": "900", - "kind": "string", - "type": { - "$ref": "892" - }, - "value": "agl-test" - } - }, - { - "parameter": { - "$ref": "895" - }, - "value": { - "$id": "901", - "kind": "model", - "type": { - "$ref": "271" - }, - "value": { - "properties": { - "$id": "902", - "kind": "model", - "type": { - "$ref": "297" - }, - "value": { - "availabilityGroupName": { - "$id": "903", - "kind": "string", - "type": { - "$ref": "301" - }, - "value": "ag-test" - }, - "loadBalancerConfigurations": { - "$id": "904", - "kind": "array", - "type": { - "$ref": "303" - }, - "value": [ - { - "$id": "905", - "kind": "model", - "type": { - "$ref": "304" - }, - "value": { - "loadBalancerResourceId": { - "$id": "906", - "kind": "string", - "type": { - "$ref": "317" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test" - }, - "privateIpAddress": { - "$id": "907", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "908", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.1.0.112" - }, - "subnetResourceId": { - "$id": "909", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" - } - } - }, - "probePort": { - "$id": "910", - "kind": "number", - "type": { - "$ref": "320" - }, - "value": 59983 - }, - "sqlVirtualMachineInstances": { - "$id": "911", - "kind": "array", - "type": { - "$ref": "322" - }, - "value": [ - { - "$id": "912", - "kind": "string", - "type": { - "$ref": "323" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - }, - { - "$id": "913", - "kind": "string", - "type": { - "$ref": "323" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" - } - ] - } - } - } - ] - }, - "port": { - "$id": "914", - "kind": "number", - "type": { - "$ref": "334" - }, - "value": 1433 - } - } - } - } - } - }, - { - "parameter": { - "$ref": "887" - }, - "value": { - "$id": "915", - "kind": "string", - "type": { - "$ref": "888" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "889" - }, - "value": { - "$id": "916", - "kind": "string", - "type": { - "$ref": "890" - }, - "value": "testvmgroup" - } - }, - { - "parameter": { - "$ref": "885" - }, - "value": { - "$id": "917", - "kind": "string", - "type": { - "$ref": "886" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "271" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "918", - "kind": "model", - "type": { - "$ref": "271" - }, - "value": { - "name": { - "$id": "919", - "kind": "string", - "type": { - "$ref": "348" - }, - "value": "agl-test" - }, - "type": { - "$id": "920", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" - }, - "id": { - "$id": "921", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" - }, - "properties": { - "$id": "922", - "kind": "model", - "type": { - "$ref": "297" - }, - "value": { - "loadBalancerConfigurations": { - "$id": "923", - "kind": "array", - "type": { - "$ref": "303" - }, - "value": [ - { - "$id": "924", - "kind": "model", - "type": { - "$ref": "304" - }, - "value": { - "privateIpAddress": { - "$id": "925", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "926", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.1.0.113" - }, - "subnetResourceId": { - "$id": "927", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" - } - } - }, - "sqlVirtualMachineInstances": { - "$id": "928", - "kind": "array", - "type": { - "$ref": "322" - }, - "value": [ - { - "$id": "929", - "kind": "string", - "type": { - "$ref": "323" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - }, - { - "$id": "930", - "kind": "string", - "type": { - "$ref": "323" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" - } - ] - } - } - } - ] - }, - "port": { - "$id": "931", - "kind": "number", - "type": { - "$ref": "334" - }, - "value": 1433 - }, - "provisioningState": { - "$id": "932", - "kind": "string", - "type": { - "$ref": "299" - }, - "value": "Updating" - } - } - } - } - } - }, - { - "response": { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "271" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "896" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "897" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 201, - "bodyValue": { - "$id": "933", - "kind": "model", - "type": { - "$ref": "271" - }, - "value": { - "name": { - "$id": "934", - "kind": "string", - "type": { - "$ref": "348" - }, - "value": "agl-test" - }, - "type": { - "$id": "935", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" - }, - "id": { - "$id": "936", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" - }, - "properties": { - "$id": "937", - "kind": "model", - "type": { - "$ref": "297" - }, - "value": { - "loadBalancerConfigurations": { - "$id": "938", - "kind": "array", - "type": { - "$ref": "303" - }, - "value": [ - { - "$id": "939", - "kind": "model", - "type": { - "$ref": "304" - }, - "value": { - "privateIpAddress": { - "$id": "940", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "941", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.1.0.112" - }, - "subnetResourceId": { - "$id": "942", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" - } - } - }, - "sqlVirtualMachineInstances": { - "$id": "943", - "kind": "array", - "type": { - "$ref": "322" - }, - "value": [ - { - "$id": "944", - "kind": "string", - "type": { - "$ref": "323" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - }, - { - "$id": "945", - "kind": "string", - "type": { - "$ref": "323" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" - } - ] - } - } - } - ] - }, - "port": { - "$id": "946", - "kind": "number", - "type": { - "$ref": "334" - }, - "value": 1433 - }, - "provisioningState": { - "$id": "947", - "kind": "string", - "type": { - "$ref": "299" - }, - "value": "Provisioning" - } - } - } - } - } - } - ] - }, - { - "$id": "948", - "kind": "http", - "name": "Creates or updates an availability group listener. This is used for VMs present in multi subnet", - "description": "Creates or updates an availability group listener. This is used for VMs present in multi subnet", - "filePath": "2023-10-01/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json", - "parameters": [ - { - "parameter": { - "$ref": "882" - }, - "value": { - "$id": "949", - "kind": "string", - "type": { - "$ref": "883" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "891" - }, - "value": { - "$id": "950", - "kind": "string", - "type": { - "$ref": "892" - }, - "value": "agl-test" - } - }, - { - "parameter": { - "$ref": "895" - }, - "value": { - "$id": "951", - "kind": "model", - "type": { - "$ref": "271" - }, - "value": { - "properties": { - "$id": "952", - "kind": "model", - "type": { - "$ref": "297" - }, - "value": { - "availabilityGroupName": { - "$id": "953", - "kind": "string", - "type": { - "$ref": "301" - }, - "value": "ag-test" - }, - "multiSubnetIpConfigurations": { - "$id": "954", - "kind": "array", - "type": { - "$ref": "326" - }, - "value": [ - { - "$id": "955", - "kind": "model", - "type": { - "$ref": "327" - }, - "value": { - "privateIpAddress": { - "$id": "956", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "957", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.0.0.112" - }, - "subnetResourceId": { - "$id": "958", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" - } - } - }, - "sqlVirtualMachineInstance": { - "$id": "959", - "kind": "string", - "type": { - "$ref": "330" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - } - } - }, - { - "$id": "960", - "kind": "model", - "type": { - "$ref": "327" - }, - "value": { - "privateIpAddress": { - "$id": "961", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "962", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.0.1.112" - }, - "subnetResourceId": { - "$id": "963", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate" - } - } - }, - "sqlVirtualMachineInstance": { - "$id": "964", - "kind": "string", - "type": { - "$ref": "330" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1" - } - } - } - ] - }, - "port": { - "$id": "965", - "kind": "number", - "type": { - "$ref": "334" - }, - "value": 1433 - } - } - } - } - } - }, - { - "parameter": { - "$ref": "887" - }, - "value": { - "$id": "966", - "kind": "string", - "type": { - "$ref": "888" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "889" - }, - "value": { - "$id": "967", - "kind": "string", - "type": { - "$ref": "890" - }, - "value": "testvmgroup" - } - }, - { - "parameter": { - "$ref": "885" - }, - "value": { - "$id": "968", - "kind": "string", - "type": { - "$ref": "886" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "271" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "969", - "kind": "model", - "type": { - "$ref": "271" - }, - "value": { - "name": { - "$id": "970", - "kind": "string", - "type": { - "$ref": "348" - }, - "value": "agl-test" - }, - "type": { - "$id": "971", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" - }, - "id": { - "$id": "972", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" - }, - "properties": { - "$id": "973", - "kind": "model", - "type": { - "$ref": "297" - }, - "value": { - "multiSubnetIpConfigurations": { - "$id": "974", - "kind": "array", - "type": { - "$ref": "326" - }, - "value": [ - { - "$id": "975", - "kind": "model", - "type": { - "$ref": "327" - }, - "value": { - "privateIpAddress": { - "$id": "976", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "977", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.0.0.112" - }, - "subnetResourceId": { - "$id": "978", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" - } - } - }, - "sqlVirtualMachineInstance": { - "$id": "979", - "kind": "string", - "type": { - "$ref": "330" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - } - } - }, - { - "$id": "980", - "kind": "model", - "type": { - "$ref": "327" - }, - "value": { - "privateIpAddress": { - "$id": "981", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "982", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.0.1.112" - }, - "subnetResourceId": { - "$id": "983", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate" - } - } - }, - "sqlVirtualMachineInstance": { - "$id": "984", - "kind": "string", - "type": { - "$ref": "330" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1" - } - } - } - ] - }, - "port": { - "$id": "985", - "kind": "number", - "type": { - "$ref": "334" - }, - "value": 1433 - }, - "provisioningState": { - "$id": "986", - "kind": "string", - "type": { - "$ref": "299" - }, - "value": "Updating" - } - } - } - } - } - }, - { - "response": { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "271" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "896" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "897" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 201, - "bodyValue": { - "$id": "987", - "kind": "model", - "type": { - "$ref": "271" - }, - "value": { - "name": { - "$id": "988", - "kind": "string", - "type": { - "$ref": "348" - }, - "value": "agl-test" - }, - "type": { - "$id": "989", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" - }, - "id": { - "$id": "990", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" - }, - "properties": { - "$id": "991", - "kind": "model", - "type": { - "$ref": "297" - }, - "value": { - "multiSubnetIpConfigurations": { - "$id": "992", - "kind": "array", - "type": { - "$ref": "326" - }, - "value": [ - { - "$id": "993", - "kind": "model", - "type": { - "$ref": "327" - }, - "value": { - "privateIpAddress": { - "$id": "994", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "995", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.0.0.112" - }, - "subnetResourceId": { - "$id": "996", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" - } - } - }, - "sqlVirtualMachineInstance": { - "$id": "997", - "kind": "string", - "type": { - "$ref": "330" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - } - } - }, - { - "$id": "998", - "kind": "model", - "type": { - "$ref": "327" - }, - "value": { - "privateIpAddress": { - "$id": "999", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "1000", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.0.1.112" - }, - "subnetResourceId": { - "$id": "1001", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate" - } - } - }, - "sqlVirtualMachineInstance": { - "$id": "1002", - "kind": "string", - "type": { - "$ref": "330" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1" - } - } - } - ] - }, - "port": { - "$id": "1003", - "kind": "number", - "type": { - "$ref": "334" - }, - "value": 1433 - }, - "provisioningState": { - "$id": "1004", - "kind": "string", - "type": { - "$ref": "299" - }, - "value": "Provisioning" - } - } - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1005", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1006", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1007", - "kind": "method", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "1008", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.sqlVirtualMachineGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1009", - "kind": "method", - "name": "availabilityGroupListenerName", - "serializedName": "availabilityGroupListenerName", - "doc": "Name of the availability group listener.", - "type": { - "$id": "1010", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.availabilityGroupListenerName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1011", - "kind": "method", - "name": "parameters", - "serializedName": "parameters", - "doc": "The availability group listener.", - "type": { - "$ref": "271" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.resource", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1012", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "165" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1013", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "167" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "271" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.createOrUpdate", - "lroMetadata": { - "finalStateVia": 0, - "finalResponse": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "271" - } - } - } - }, - { - "$id": "1014", - "kind": "lro", - "name": "delete", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Deletes an availability group listener.", - "operation": { - "$id": "1015", - "name": "delete", - "resourceName": "AvailabilityGroupListener", - "doc": "Deletes an availability group listener.", - "accessibility": "public", - "parameters": [ - { - "$id": "1016", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1017", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1018", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.apiVersion", - "readOnly": false - }, - { - "$id": "1019", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1020", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.subscriptionId" - }, - { - "$id": "1021", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1022", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.resourceGroupName" - }, - { - "$id": "1023", - "kind": "path", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "1024", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.sqlVirtualMachineGroupName" - }, - { - "$id": "1025", - "kind": "path", - "name": "availabilityGroupListenerName", - "serializedName": "availabilityGroupListenerName", - "doc": "Name of the availability group listener.", - "type": { - "$id": "1026", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.availabilityGroupListenerName" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "headers": [], - "isErrorResponse": false - }, - { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "1027", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "1028", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false - }, - { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - } - ], - "httpMethod": "DELETE", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceDelete", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1029", - "kind": "http", - "name": "Deletes an availability group listener.", - "description": "Deletes an availability group listener.", - "filePath": "2023-10-01/DeleteAvailabilityGroupListener.json", - "parameters": [ - { - "parameter": { - "$ref": "1016" - }, - "value": { - "$id": "1030", - "kind": "string", - "type": { - "$ref": "1017" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1025" - }, - "value": { - "$id": "1031", - "kind": "string", - "type": { - "$ref": "1026" - }, - "value": "agl-test" - } - }, - { - "parameter": { - "$ref": "1021" - }, - "value": { - "$id": "1032", - "kind": "string", - "type": { - "$ref": "1022" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1023" - }, - "value": { - "$id": "1033", - "kind": "string", - "type": { - "$ref": "1024" - }, - "value": "testvmgroup" - } - }, - { - "parameter": { - "$ref": "1019" - }, - "value": { - "$id": "1034", - "kind": "string", - "type": { - "$ref": "1020" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "headers": [], - "isErrorResponse": false - }, - "statusCode": 200 - }, - { - "response": { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$ref": "1027" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1028" - } - } - ], - "isErrorResponse": false - }, - "statusCode": 202 - }, - { - "response": { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - }, - "statusCode": 204 - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1035", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1036", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1037", - "kind": "method", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "1038", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.sqlVirtualMachineGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1039", - "kind": "method", - "name": "availabilityGroupListenerName", - "serializedName": "availabilityGroupListenerName", - "doc": "Name of the availability group listener.", - "type": { - "$id": "1040", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete.availabilityGroupListenerName", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.delete", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 204 - ] - } - } - }, - { - "$id": "1041", - "kind": "paging", - "name": "listByGroup", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Lists all availability group listeners in a SQL virtual machine group.", - "operation": { - "$id": "1042", - "name": "listByGroup", - "resourceName": "AvailabilityGroupListener", - "doc": "Lists all availability group listeners in a SQL virtual machine group.", - "accessibility": "public", - "parameters": [ - { - "$id": "1043", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1044", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1045", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.apiVersion", - "readOnly": false - }, - { - "$id": "1046", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1047", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.subscriptionId" - }, - { - "$id": "1048", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1049", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.resourceGroupName" - }, - { - "$id": "1050", - "kind": "path", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "1051", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.sqlVirtualMachineGroupName" - }, - { - "$id": "1052", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "169" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "364" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceList", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1053", - "kind": "http", - "name": "Lists all availability group listeners in a SQL virtual machine group.", - "description": "Lists all availability group listeners in a SQL virtual machine group.", - "filePath": "2023-10-01/ListByGroupAvailabilityGroupListener.json", - "parameters": [ - { - "parameter": { - "$ref": "1043" - }, - "value": { - "$id": "1054", - "kind": "string", - "type": { - "$ref": "1044" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1048" - }, - "value": { - "$id": "1055", - "kind": "string", - "type": { - "$ref": "1049" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1050" - }, - "value": { - "$id": "1056", - "kind": "string", - "type": { - "$ref": "1051" - }, - "value": "testvmgroup" - } - }, - { - "parameter": { - "$ref": "1046" - }, - "value": { - "$id": "1057", - "kind": "string", - "type": { - "$ref": "1047" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "364" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1058", - "kind": "model", - "type": { - "$ref": "364" - }, - "value": { - "value": { - "$id": "1059", - "kind": "array", - "type": { - "$ref": "366" - }, - "value": [ - { - "$id": "1060", - "kind": "model", - "type": { - "$ref": "271" - }, - "value": { - "name": { - "$id": "1061", - "kind": "string", - "type": { - "$ref": "348" - }, - "value": "agl-test" - }, - "type": { - "$id": "1062", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/availabilityGroupListeners" - }, - "id": { - "$id": "1063", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup/availabilityGroupListeners/agl-test" - }, - "properties": { - "$id": "1064", - "kind": "model", - "type": { - "$ref": "297" - }, - "value": { - "availabilityGroupName": { - "$id": "1065", - "kind": "string", - "type": { - "$ref": "301" - }, - "value": "ag-test" - }, - "loadBalancerConfigurations": { - "$id": "1066", - "kind": "array", - "type": { - "$ref": "303" - }, - "value": [ - { - "$id": "1067", - "kind": "model", - "type": { - "$ref": "304" - }, - "value": { - "loadBalancerResourceId": { - "$id": "1068", - "kind": "string", - "type": { - "$ref": "317" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test" - }, - "privateIpAddress": { - "$id": "1069", - "kind": "model", - "type": { - "$ref": "306" - }, - "value": { - "ipAddress": { - "$id": "1070", - "kind": "string", - "type": { - "$ref": "308" - }, - "value": "10.1.0.112" - }, - "subnetResourceId": { - "$id": "1071", - "kind": "string", - "type": { - "$ref": "311" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default" - } - } - }, - "probePort": { - "$id": "1072", - "kind": "number", - "type": { - "$ref": "320" - }, - "value": 59983 - }, - "sqlVirtualMachineInstances": { - "$id": "1073", - "kind": "array", - "type": { - "$ref": "322" - }, - "value": [ - { - "$id": "1074", - "kind": "string", - "type": { - "$ref": "323" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3" - }, - { - "$id": "1075", - "kind": "string", - "type": { - "$ref": "323" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - } - ] - } - } - } - ] - }, - "port": { - "$id": "1076", - "kind": "number", - "type": { - "$ref": "334" - }, - "value": 1433 - }, - "provisioningState": { - "$id": "1077", - "kind": "string", - "type": { - "$ref": "299" - }, - "value": "Succeeded" - } - } - } - } - } - ] - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1078", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1079", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1080", - "kind": "method", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "1081", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.sqlVirtualMachineGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1082", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "169" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "366" - }, - "resultSegments": [ - "value" - ] - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.listByGroup", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - }, - "pageSizeParameterSegments": [] - } - } - ], - "parameters": [ - { - "$id": "1083", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "1084", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "1085", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.endpoint" - }, - { - "$id": "1086", - "kind": "method", - "name": "apiVersion", - "serializedName": "apiVersion", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1087", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "", - "isApiVersion": true, - "defaultValue": { - "type": { - "$id": "1088", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners.get.apiVersion", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$ref": "679" - } - ], - "initializedBy": 0, - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceOperations", - "arguments": {} - } - ], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.AvailabilityGroupListeners", - "apiVersions": [ - "2023-10-01" - ], - "parent": { - "$ref": "672" - }, - "isMultiServiceClient": false - }, - { - "$id": "1089", - "kind": "client", - "name": "SqlVirtualMachines", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "methods": [ - { - "$id": "1090", - "kind": "basic", - "name": "get", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Gets a SQL virtual machine.", - "operation": { - "$id": "1091", - "name": "get", - "resourceName": "SqlVirtualMachine", - "doc": "Gets a SQL virtual machine.", - "accessibility": "public", - "parameters": [ - { - "$id": "1092", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1093", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1094", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.apiVersion", - "readOnly": false - }, - { - "$id": "1095", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1096", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.subscriptionId" - }, - { - "$id": "1097", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1098", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.resourceGroupName" - }, - { - "$id": "1099", - "kind": "path", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1100", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.sqlVirtualMachineName" - }, - { - "$id": "1101", - "kind": "query", - "name": "$expand", - "serializedName": "$expand", - "doc": "The child resources to include in the response.", - "type": { - "$id": "1102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "optional": true, - "scope": "Method", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.$expand", - "readOnly": false - }, - { - "$id": "1103", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "171" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceRead", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1104", - "kind": "http", - "name": "Gets a SQL virtual machine.", - "description": "Gets a SQL virtual machine.", - "filePath": "2023-10-01/GetSqlVirtualMachine.json", - "parameters": [ - { - "parameter": { - "$ref": "1092" - }, - "value": { - "$id": "1105", - "kind": "string", - "type": { - "$ref": "1093" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1097" - }, - "value": { - "$id": "1106", - "kind": "string", - "type": { - "$ref": "1098" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1099" - }, - "value": { - "$id": "1107", - "kind": "string", - "type": { - "$ref": "1100" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1095" - }, - "value": { - "$id": "1108", - "kind": "string", - "type": { - "$ref": "1096" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1109", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1110", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1111", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1112", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1113", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1114", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1115", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1116", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1117", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1118", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1119", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "1120", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1121", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1122", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1123", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1124", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1125", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1126", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1127", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1128", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1129", - "kind": "method", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1130", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.sqlVirtualMachineName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1131", - "kind": "method", - "name": "$expand", - "serializedName": "$expand", - "doc": "The child resources to include in the response.", - "type": { - "$id": "1132", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Query", - "isApiVersion": false, - "optional": true, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.$expand", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1133", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "171" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "370" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get" - }, - { - "$id": "1134", - "kind": "lro", - "name": "createOrUpdate", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Creates or updates a SQL virtual machine.", - "operation": { - "$id": "1135", - "name": "createOrUpdate", - "resourceName": "SqlVirtualMachine", - "doc": "Creates or updates a SQL virtual machine.", - "accessibility": "public", - "parameters": [ - { - "$id": "1136", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1137", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1138", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.apiVersion", - "readOnly": false - }, - { - "$id": "1139", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.subscriptionId" - }, - { - "$id": "1141", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1142", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.resourceGroupName" - }, - { - "$id": "1143", - "kind": "path", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1144", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.sqlVirtualMachineName" - }, - { - "$id": "1145", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "173" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.contentType" - }, - { - "$id": "1146", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "175" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.accept" - }, - { - "$id": "1147", - "kind": "body", - "name": "parameters", - "serializedName": "parameters", - "doc": "The SQL virtual machine.", - "type": { - "$ref": "370" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.resource" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$id": "1148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "1149", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "PUT", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", - "requestMediaTypes": [ - "application/json" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1150", - "kind": "http", - "name": "Creates or updates a SQL virtual machine for Automated Back up Settings with Weekly and Days of the week to run the back up.", - "description": "Creates or updates a SQL virtual machine for Automated Back up Settings with Weekly and Days of the week to run the back up.", - "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json", - "parameters": [ - { - "parameter": { - "$ref": "1136" - }, - "value": { - "$id": "1151", - "kind": "string", - "type": { - "$ref": "1137" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1147" - }, - "value": { - "$id": "1152", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "location": { - "$id": "1153", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1154", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "autoBackupSettings": { - "$id": "1155", - "kind": "model", - "type": { - "$ref": "417" - }, - "value": { - "backupScheduleType": { - "$id": "1156", - "kind": "string", - "type": { - "$ref": "68" - }, - "value": "Manual" - }, - "backupSystemDbs": { - "$id": "1157", - "kind": "boolean", - "type": { - "$ref": "433" - }, - "value": true - }, - "daysOfWeek": { - "$id": "1158", - "kind": "array", - "type": { - "$ref": "437" - }, - "value": [ - { - "$id": "1159", - "kind": "string", - "type": { - "$ref": "76" - }, - "value": "Monday" - }, - { - "$id": "1160", - "kind": "string", - "type": { - "$ref": "76" - }, - "value": "Friday" - } - ] - }, - "enable": { - "$id": "1161", - "kind": "boolean", - "type": { - "$ref": "419" - }, - "value": true - }, - "enableEncryption": { - "$id": "1162", - "kind": "boolean", - "type": { - "$ref": "421" - }, - "value": true - }, - "fullBackupFrequency": { - "$id": "1163", - "kind": "string", - "type": { - "$ref": "72" - }, - "value": "Weekly" - }, - "fullBackupStartTime": { - "$id": "1164", - "kind": "number", - "type": { - "$ref": "439" - }, - "value": 6 - }, - "fullBackupWindowHours": { - "$id": "1165", - "kind": "number", - "type": { - "$ref": "441" - }, - "value": 11 - }, - "logBackupFrequency": { - "$id": "1166", - "kind": "number", - "type": { - "$ref": "443" - }, - "value": 10 - }, - "password": { - "$id": "1167", - "kind": "string", - "type": { - "$ref": "431" - }, - "value": "" - }, - "retentionPeriod": { - "$id": "1168", - "kind": "number", - "type": { - "$ref": "423" - }, - "value": 17 - }, - "storageAccessKey": { - "$id": "1169", - "kind": "string", - "type": { - "$ref": "429" - }, - "value": "" - }, - "storageAccountUrl": { - "$id": "1170", - "kind": "string", - "type": { - "$ref": "425" - }, - "value": "https://teststorage.blob.core.windows.net/" - }, - "storageContainerName": { - "$id": "1171", - "kind": "string", - "type": { - "$ref": "427" - }, - "value": "testcontainer" - } - } - }, - "autoPatchingSettings": { - "$id": "1172", - "kind": "model", - "type": { - "$ref": "407" - }, - "value": { - "dayOfWeek": { - "$id": "1173", - "kind": "string", - "type": { - "$ref": "54" - }, - "value": "Sunday" - }, - "enable": { - "$id": "1174", - "kind": "boolean", - "type": { - "$ref": "409" - }, - "value": true - }, - "maintenanceWindowDuration": { - "$id": "1175", - "kind": "number", - "type": { - "$ref": "414" - }, - "value": 60 - }, - "maintenanceWindowStartingHour": { - "$id": "1176", - "kind": "number", - "type": { - "$ref": "412" - }, - "value": 2 - } - } - }, - "keyVaultCredentialSettings": { - "$id": "1177", - "kind": "model", - "type": { - "$ref": "445" - }, - "value": { - "enable": { - "$id": "1178", - "kind": "boolean", - "type": { - "$ref": "447" - }, - "value": false - } - } - }, - "serverConfigurationsManagementSettings": { - "$id": "1179", - "kind": "model", - "type": { - "$ref": "457" - }, - "value": { - "additionalFeaturesServerConfigurations": { - "$id": "1180", - "kind": "model", - "type": { - "$ref": "478" - }, - "value": { - "isRServicesEnabled": { - "$id": "1181", - "kind": "boolean", - "type": { - "$ref": "480" - }, - "value": false - } - } - }, - "sqlConnectivityUpdateSettings": { - "$id": "1182", - "kind": "model", - "type": { - "$ref": "459" - }, - "value": { - "connectivityType": { - "$id": "1183", - "kind": "string", - "type": { - "$ref": "85" - }, - "value": "PRIVATE" - }, - "port": { - "$id": "1184", - "kind": "number", - "type": { - "$ref": "462" - }, - "value": 1433 - }, - "sqlAuthUpdatePassword": { - "$id": "1185", - "kind": "string", - "type": { - "$ref": "466" - }, - "value": "" - }, - "sqlAuthUpdateUserName": { - "$id": "1186", - "kind": "string", - "type": { - "$ref": "464" - }, - "value": "sqllogin" - } - } - }, - "sqlStorageUpdateSettings": { - "$id": "1187", - "kind": "model", - "type": { - "$ref": "471" - }, - "value": { - "diskConfigurationType": { - "$id": "1188", - "kind": "string", - "type": { - "$ref": "95" - }, - "value": "NEW" - }, - "diskCount": { - "$id": "1189", - "kind": "number", - "type": { - "$ref": "473" - }, - "value": 1 - }, - "startingDeviceId": { - "$id": "1190", - "kind": "number", - "type": { - "$ref": "475" - }, - "value": 2 - } - } - }, - "sqlWorkloadTypeUpdateSettings": { - "$id": "1191", - "kind": "model", - "type": { - "$ref": "468" - }, - "value": { - "sqlWorkloadType": { - "$id": "1192", - "kind": "string", - "type": { - "$ref": "90" - }, - "value": "OLTP" - } - } - } - } - }, - "sqlImageSku": { - "$id": "1193", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlServerLicenseType": { - "$id": "1194", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineResourceId": { - "$id": "1195", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "parameter": { - "$ref": "1141" - }, - "value": { - "$id": "1196", - "kind": "string", - "type": { - "$ref": "1142" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1143" - }, - "value": { - "$id": "1197", - "kind": "string", - "type": { - "$ref": "1144" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1139" - }, - "value": { - "$id": "1198", - "kind": "string", - "type": { - "$ref": "1140" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1199", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1200", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1201", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1202", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1203", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1204", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1205", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1206", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": false - }, - "leastPrivilegeMode": { - "$id": "1207", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1208", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1209", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Updating" - }, - "sqlImageOffer": { - "$id": "1210", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1211", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1212", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1213", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1214", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1215", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1216", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "response": { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "1148" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1149" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 201, - "bodyValue": { - "$id": "1217", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1218", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1219", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1220", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1221", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1222", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "enableAutomaticUpgrade": { - "$id": "1223", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1224", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "NotSet" - }, - "provisioningState": { - "$id": "1225", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Provisioning" - }, - "sqlImageSku": { - "$id": "1226", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Unknown" - }, - "sqlServerLicenseType": { - "$id": "1227", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineResourceId": { - "$id": "1228", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - } - ] - }, - { - "$id": "1229", - "kind": "http", - "name": "Creates or updates a SQL virtual machine with max parameters.", - "description": "Creates or updates a SQL virtual machine with max parameters.", - "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineMAX.json", - "parameters": [ - { - "parameter": { - "$ref": "1136" - }, - "value": { - "$id": "1230", - "kind": "string", - "type": { - "$ref": "1137" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1147" - }, - "value": { - "$id": "1231", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "location": { - "$id": "1232", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1233", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "assessmentSettings": { - "$id": "1234", - "kind": "model", - "type": { - "$ref": "561" - }, - "value": { - "enable": { - "$id": "1235", - "kind": "boolean", - "type": { - "$ref": "563" - }, - "value": true - }, - "runImmediately": { - "$id": "1236", - "kind": "boolean", - "type": { - "$ref": "565" - }, - "value": true - }, - "schedule": { - "$id": "1237", - "kind": "model", - "type": { - "$ref": "567" - }, - "value": { - "dayOfWeek": { - "$id": "1238", - "kind": "string", - "type": { - "$ref": "108" - }, - "value": "Sunday" - }, - "enable": { - "$id": "1239", - "kind": "boolean", - "type": { - "$ref": "569" - }, - "value": true - }, - "startTime": { - "$id": "1240", - "kind": "string", - "type": { - "$ref": "576" - }, - "value": "23:17" - }, - "weeklyInterval": { - "$id": "1241", - "kind": "number", - "type": { - "$ref": "571" - }, - "value": 1 - } - } - } - } - }, - "autoBackupSettings": { - "$id": "1242", - "kind": "model", - "type": { - "$ref": "417" - }, - "value": { - "backupScheduleType": { - "$id": "1243", - "kind": "string", - "type": { - "$ref": "68" - }, - "value": "Manual" - }, - "backupSystemDbs": { - "$id": "1244", - "kind": "boolean", - "type": { - "$ref": "433" - }, - "value": true - }, - "enable": { - "$id": "1245", - "kind": "boolean", - "type": { - "$ref": "419" - }, - "value": true - }, - "enableEncryption": { - "$id": "1246", - "kind": "boolean", - "type": { - "$ref": "421" - }, - "value": true - }, - "fullBackupFrequency": { - "$id": "1247", - "kind": "string", - "type": { - "$ref": "72" - }, - "value": "Daily" - }, - "fullBackupStartTime": { - "$id": "1248", - "kind": "number", - "type": { - "$ref": "439" - }, - "value": 6 - }, - "fullBackupWindowHours": { - "$id": "1249", - "kind": "number", - "type": { - "$ref": "441" - }, - "value": 11 - }, - "logBackupFrequency": { - "$id": "1250", - "kind": "number", - "type": { - "$ref": "443" - }, - "value": 10 - }, - "password": { - "$id": "1251", - "kind": "string", - "type": { - "$ref": "431" - }, - "value": "" - }, - "retentionPeriod": { - "$id": "1252", - "kind": "number", - "type": { - "$ref": "423" - }, - "value": 17 - }, - "storageAccessKey": { - "$id": "1253", - "kind": "string", - "type": { - "$ref": "429" - }, - "value": "" - }, - "storageAccountUrl": { - "$id": "1254", - "kind": "string", - "type": { - "$ref": "425" - }, - "value": "https://teststorage.blob.core.windows.net/" - }, - "storageContainerName": { - "$id": "1255", - "kind": "string", - "type": { - "$ref": "427" - }, - "value": "testcontainer" - } - } - }, - "autoPatchingSettings": { - "$id": "1256", - "kind": "model", - "type": { - "$ref": "407" - }, - "value": { - "dayOfWeek": { - "$id": "1257", - "kind": "string", - "type": { - "$ref": "54" - }, - "value": "Sunday" - }, - "enable": { - "$id": "1258", - "kind": "boolean", - "type": { - "$ref": "409" - }, - "value": true - }, - "maintenanceWindowDuration": { - "$id": "1259", - "kind": "number", - "type": { - "$ref": "414" - }, - "value": 60 - }, - "maintenanceWindowStartingHour": { - "$id": "1260", - "kind": "number", - "type": { - "$ref": "412" - }, - "value": 2 - } - } - }, - "enableAutomaticUpgrade": { - "$id": "1261", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "keyVaultCredentialSettings": { - "$id": "1262", - "kind": "model", - "type": { - "$ref": "445" - }, - "value": { - "enable": { - "$id": "1263", - "kind": "boolean", - "type": { - "$ref": "447" - }, - "value": false - } - } - }, - "leastPrivilegeMode": { - "$id": "1264", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "serverConfigurationsManagementSettings": { - "$id": "1265", - "kind": "model", - "type": { - "$ref": "457" - }, - "value": { - "additionalFeaturesServerConfigurations": { - "$id": "1266", - "kind": "model", - "type": { - "$ref": "478" - }, - "value": { - "isRServicesEnabled": { - "$id": "1267", - "kind": "boolean", - "type": { - "$ref": "480" - }, - "value": false - } - } - }, - "azureAdAuthenticationSettings": { - "$id": "1268", - "kind": "model", - "type": { - "$ref": "498" - }, - "value": { - "clientId": { - "$id": "1269", - "kind": "string", - "type": { - "$ref": "500" - }, - "value": "11111111-2222-3333-4444-555555555555" - } - } - }, - "sqlConnectivityUpdateSettings": { - "$id": "1270", - "kind": "model", - "type": { - "$ref": "459" - }, - "value": { - "connectivityType": { - "$id": "1271", - "kind": "string", - "type": { - "$ref": "85" - }, - "value": "PRIVATE" - }, - "port": { - "$id": "1272", - "kind": "number", - "type": { - "$ref": "462" - }, - "value": 1433 - }, - "sqlAuthUpdatePassword": { - "$id": "1273", - "kind": "string", - "type": { - "$ref": "466" - }, - "value": "" - }, - "sqlAuthUpdateUserName": { - "$id": "1274", - "kind": "string", - "type": { - "$ref": "464" - }, - "value": "sqllogin" - } - } - }, - "sqlInstanceSettings": { - "$id": "1275", - "kind": "model", - "type": { - "$ref": "482" - }, - "value": { - "collation": { - "$id": "1276", - "kind": "string", - "type": { - "$ref": "484" - }, - "value": "SQL_Latin1_General_CP1_CI_AS" - }, - "isIfiEnabled": { - "$id": "1277", - "kind": "boolean", - "type": { - "$ref": "496" - }, - "value": true - }, - "isLpimEnabled": { - "$id": "1278", - "kind": "boolean", - "type": { - "$ref": "494" - }, - "value": true - }, - "isOptimizeForAdHocWorkloadsEnabled": { - "$id": "1279", - "kind": "boolean", - "type": { - "$ref": "488" - }, - "value": true - }, - "maxDop": { - "$id": "1280", - "kind": "number", - "type": { - "$ref": "486" - }, - "value": 8 - }, - "maxServerMemoryMB": { - "$id": "1281", - "kind": "number", - "type": { - "$ref": "492" - }, - "value": 128 - }, - "minServerMemoryMB": { - "$id": "1282", - "kind": "number", - "type": { - "$ref": "490" - }, - "value": 0 - } - } - }, - "sqlStorageUpdateSettings": { - "$id": "1283", - "kind": "model", - "type": { - "$ref": "471" - }, - "value": { - "diskConfigurationType": { - "$id": "1284", - "kind": "string", - "type": { - "$ref": "95" - }, - "value": "NEW" - }, - "diskCount": { - "$id": "1285", - "kind": "number", - "type": { - "$ref": "473" - }, - "value": 1 - }, - "startingDeviceId": { - "$id": "1286", - "kind": "number", - "type": { - "$ref": "475" - }, - "value": 2 - } - } - }, - "sqlWorkloadTypeUpdateSettings": { - "$id": "1287", - "kind": "model", - "type": { - "$ref": "468" - }, - "value": { - "sqlWorkloadType": { - "$id": "1288", - "kind": "string", - "type": { - "$ref": "90" - }, - "value": "OLTP" - } - } - } - } - }, - "sqlImageSku": { - "$id": "1289", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlServerLicenseType": { - "$id": "1290", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "storageConfigurationSettings": { - "$id": "1291", - "kind": "model", - "type": { - "$ref": "502" - }, - "value": { - "diskConfigurationType": { - "$id": "1292", - "kind": "string", - "type": { - "$ref": "95" - }, - "value": "NEW" - }, - "enableStorageConfigBlade": { - "$id": "1293", - "kind": "boolean", - "type": { - "$ref": "539" - }, - "value": true - }, - "sqlDataSettings": { - "$id": "1294", - "kind": "model", - "type": { - "$ref": "504" - }, - "value": { - "defaultFilePath": { - "$id": "1295", - "kind": "string", - "type": { - "$ref": "509" - }, - "value": "F:\\folderpath\\" - }, - "luns": { - "$id": "1296", - "kind": "array", - "type": { - "$ref": "506" - }, - "value": [ - { - "$id": "1297", - "kind": "number", - "type": { - "$ref": "507" - }, - "value": 0 - } - ] - }, - "useStoragePool": { - "$id": "1298", - "kind": "boolean", - "type": { - "$ref": "511" - }, - "value": false - } - } - }, - "sqlLogSettings": { - "$id": "1299", - "kind": "model", - "type": { - "$ref": "504" - }, - "value": { - "defaultFilePath": { - "$id": "1300", - "kind": "string", - "type": { - "$ref": "509" - }, - "value": "G:\\folderpath\\" - }, - "luns": { - "$id": "1301", - "kind": "array", - "type": { - "$ref": "506" - }, - "value": [ - { - "$id": "1302", - "kind": "number", - "type": { - "$ref": "507" - }, - "value": 1 - } - ] - }, - "useStoragePool": { - "$id": "1303", - "kind": "boolean", - "type": { - "$ref": "511" - }, - "value": false - } - } - }, - "sqlSystemDbOnDataDisk": { - "$id": "1304", - "kind": "boolean", - "type": { - "$ref": "535" - }, - "value": true - }, - "sqlTempDbSettings": { - "$id": "1305", - "kind": "model", - "type": { - "$ref": "514" - }, - "value": { - "dataFileCount": { - "$id": "1306", - "kind": "number", - "type": { - "$ref": "524" - }, - "value": 8 - }, - "dataFileSize": { - "$id": "1307", - "kind": "number", - "type": { - "$ref": "516" - }, - "value": 256 - }, - "dataGrowth": { - "$id": "1308", - "kind": "number", - "type": { - "$ref": "518" - }, - "value": 512 - }, - "defaultFilePath": { - "$id": "1309", - "kind": "string", - "type": { - "$ref": "531" - }, - "value": "D:\\TEMP" - }, - "logFileSize": { - "$id": "1310", - "kind": "number", - "type": { - "$ref": "520" - }, - "value": 256 - }, - "logGrowth": { - "$id": "1311", - "kind": "number", - "type": { - "$ref": "522" - }, - "value": 512 - }, - "luns": { - "$id": "1312", - "kind": "array", - "type": { - "$ref": "506" - }, - "value": [ - { - "$id": "1313", - "kind": "number", - "type": { - "$ref": "507" - }, - "value": 2 - } - ] - }, - "useStoragePool": { - "$id": "1314", - "kind": "boolean", - "type": { - "$ref": "533" - }, - "value": false - } - } - }, - "storageWorkloadType": { - "$id": "1315", - "kind": "string", - "type": { - "$ref": "100" - }, - "value": "OLTP" - } - } - }, - "virtualMachineResourceId": { - "$id": "1316", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "parameter": { - "$ref": "1141" - }, - "value": { - "$id": "1317", - "kind": "string", - "type": { - "$ref": "1142" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1143" - }, - "value": { - "$id": "1318", - "kind": "string", - "type": { - "$ref": "1144" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1139" - }, - "value": { - "$id": "1319", - "kind": "string", - "type": { - "$ref": "1140" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1320", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1321", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1322", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1323", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1324", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1325", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1326", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1327", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1328", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1329", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1330", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Updating" - }, - "sqlImageOffer": { - "$id": "1331", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1332", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1333", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1334", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1335", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1336", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1337", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "response": { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "1148" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1149" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 201, - "bodyValue": { - "$id": "1338", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1339", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1340", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1341", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1342", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1343", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "enableAutomaticUpgrade": { - "$id": "1344", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1345", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "NotSet" - }, - "provisioningState": { - "$id": "1346", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Provisioning" - }, - "sqlImageSku": { - "$id": "1347", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Unknown" - }, - "sqlServerLicenseType": { - "$id": "1348", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineResourceId": { - "$id": "1349", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - } - ] - }, - { - "$id": "1350", - "kind": "http", - "name": "Creates or updates a SQL virtual machine with min parameters.", - "description": "Creates or updates a SQL virtual machine with min parameters.", - "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineMIN.json", - "parameters": [ - { - "parameter": { - "$ref": "1136" - }, - "value": { - "$id": "1351", - "kind": "string", - "type": { - "$ref": "1137" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1147" - }, - "value": { - "$id": "1352", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "location": { - "$id": "1353", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1354", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "virtualMachineResourceId": { - "$id": "1355", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "parameter": { - "$ref": "1141" - }, - "value": { - "$id": "1356", - "kind": "string", - "type": { - "$ref": "1142" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1143" - }, - "value": { - "$id": "1357", - "kind": "string", - "type": { - "$ref": "1144" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1139" - }, - "value": { - "$id": "1358", - "kind": "string", - "type": { - "$ref": "1140" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1359", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1360", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1361", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1362", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1363", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1364", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1365", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1366", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1367", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1368", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1369", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Updating" - }, - "sqlImageOffer": { - "$id": "1370", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1371", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1372", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1373", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1374", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1375", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1376", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "response": { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "1148" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1149" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 201, - "bodyValue": { - "$id": "1377", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1378", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1379", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1380", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1381", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1382", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "enableAutomaticUpgrade": { - "$id": "1383", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1384", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "NotSet" - }, - "provisioningState": { - "$id": "1385", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Provisioning" - }, - "sqlImageSku": { - "$id": "1386", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Unknown" - }, - "sqlServerLicenseType": { - "$id": "1387", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineResourceId": { - "$id": "1388", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - } - ] - }, - { - "$id": "1389", - "kind": "http", - "name": "Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or TempDB storage pool.", - "description": "Creates or updates a SQL virtual machine for Storage Configuration Settings to EXTEND Data, Log or TempDB storage pool.", - "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json", - "parameters": [ - { - "parameter": { - "$ref": "1136" - }, - "value": { - "$id": "1390", - "kind": "string", - "type": { - "$ref": "1137" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1147" - }, - "value": { - "$id": "1391", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "location": { - "$id": "1392", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1393", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "storageConfigurationSettings": { - "$id": "1394", - "kind": "model", - "type": { - "$ref": "502" - }, - "value": { - "diskConfigurationType": { - "$id": "1395", - "kind": "string", - "type": { - "$ref": "95" - }, - "value": "EXTEND" - }, - "sqlDataSettings": { - "$id": "1396", - "kind": "model", - "type": { - "$ref": "504" - }, - "value": { - "luns": { - "$id": "1397", - "kind": "array", - "type": { - "$ref": "506" - }, - "value": [ - { - "$id": "1398", - "kind": "number", - "type": { - "$ref": "507" - }, - "value": 2 - } - ] - } - } - } - } - }, - "virtualMachineResourceId": { - "$id": "1399", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "parameter": { - "$ref": "1141" - }, - "value": { - "$id": "1400", - "kind": "string", - "type": { - "$ref": "1142" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1143" - }, - "value": { - "$id": "1401", - "kind": "string", - "type": { - "$ref": "1144" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1139" - }, - "value": { - "$id": "1402", - "kind": "string", - "type": { - "$ref": "1140" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1403", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1404", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1405", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1406", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1407", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1408", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1409", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1410", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1411", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1412", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1413", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Updating" - }, - "sqlImageOffer": { - "$id": "1414", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1415", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1416", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1417", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1418", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1419", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1420", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "response": { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "1148" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1149" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 201, - "bodyValue": { - "$id": "1421", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1422", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1423", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1424", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1425", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1426", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "enableAutomaticUpgrade": { - "$id": "1427", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1428", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "NotSet" - }, - "provisioningState": { - "$id": "1429", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Provisioning" - }, - "sqlImageSku": { - "$id": "1430", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Unknown" - }, - "sqlServerLicenseType": { - "$id": "1431", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineResourceId": { - "$id": "1432", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - } - ] - }, - { - "$id": "1433", - "kind": "http", - "name": "Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and TempDB storage pool.", - "description": "Creates or updates a SQL virtual machine for Storage Configuration Settings to NEW Data, Log and TempDB storage pool.", - "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json", - "parameters": [ - { - "parameter": { - "$ref": "1136" - }, - "value": { - "$id": "1434", - "kind": "string", - "type": { - "$ref": "1137" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1147" - }, - "value": { - "$id": "1435", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "location": { - "$id": "1436", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1437", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "storageConfigurationSettings": { - "$id": "1438", - "kind": "model", - "type": { - "$ref": "502" - }, - "value": { - "diskConfigurationType": { - "$id": "1439", - "kind": "string", - "type": { - "$ref": "95" - }, - "value": "NEW" - }, - "sqlDataSettings": { - "$id": "1440", - "kind": "model", - "type": { - "$ref": "504" - }, - "value": { - "defaultFilePath": { - "$id": "1441", - "kind": "string", - "type": { - "$ref": "509" - }, - "value": "F:\\folderpath\\" - }, - "luns": { - "$id": "1442", - "kind": "array", - "type": { - "$ref": "506" - }, - "value": [ - { - "$id": "1443", - "kind": "number", - "type": { - "$ref": "507" - }, - "value": 0 - } - ] - } - } - }, - "sqlLogSettings": { - "$id": "1444", - "kind": "model", - "type": { - "$ref": "504" - }, - "value": { - "defaultFilePath": { - "$id": "1445", - "kind": "string", - "type": { - "$ref": "509" - }, - "value": "G:\\folderpath\\" - }, - "luns": { - "$id": "1446", - "kind": "array", - "type": { - "$ref": "506" - }, - "value": [ - { - "$id": "1447", - "kind": "number", - "type": { - "$ref": "507" - }, - "value": 1 - } - ] - } - } - }, - "sqlSystemDbOnDataDisk": { - "$id": "1448", - "kind": "boolean", - "type": { - "$ref": "535" - }, - "value": true - }, - "sqlTempDbSettings": { - "$id": "1449", - "kind": "model", - "type": { - "$ref": "514" - }, - "value": { - "dataFileCount": { - "$id": "1450", - "kind": "number", - "type": { - "$ref": "524" - }, - "value": 8 - }, - "dataFileSize": { - "$id": "1451", - "kind": "number", - "type": { - "$ref": "516" - }, - "value": 256 - }, - "dataGrowth": { - "$id": "1452", - "kind": "number", - "type": { - "$ref": "518" - }, - "value": 512 - }, - "defaultFilePath": { - "$id": "1453", - "kind": "string", - "type": { - "$ref": "531" - }, - "value": "D:\\TEMP" - }, - "logFileSize": { - "$id": "1454", - "kind": "number", - "type": { - "$ref": "520" - }, - "value": 256 - }, - "logGrowth": { - "$id": "1455", - "kind": "number", - "type": { - "$ref": "522" - }, - "value": 512 - } - } - }, - "storageWorkloadType": { - "$id": "1456", - "kind": "string", - "type": { - "$ref": "100" - }, - "value": "OLTP" - } - } - }, - "virtualMachineResourceId": { - "$id": "1457", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "parameter": { - "$ref": "1141" - }, - "value": { - "$id": "1458", - "kind": "string", - "type": { - "$ref": "1142" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1143" - }, - "value": { - "$id": "1459", - "kind": "string", - "type": { - "$ref": "1144" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1139" - }, - "value": { - "$id": "1460", - "kind": "string", - "type": { - "$ref": "1140" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1461", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1462", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1463", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1464", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1465", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1466", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1467", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1468", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": false - }, - "leastPrivilegeMode": { - "$id": "1469", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1470", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1471", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Updating" - }, - "sqlImageOffer": { - "$id": "1472", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1473", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1474", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1475", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1476", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1477", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1478", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "response": { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "1148" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1149" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 201, - "bodyValue": { - "$id": "1479", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1480", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1481", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1482", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1483", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1484", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "enableAutomaticUpgrade": { - "$id": "1485", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1486", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "NotSet" - }, - "provisioningState": { - "$id": "1487", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Provisioning" - }, - "sqlImageSku": { - "$id": "1488", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Unknown" - }, - "sqlServerLicenseType": { - "$id": "1489", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineResourceId": { - "$id": "1490", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - } - ] - }, - { - "$id": "1491", - "kind": "http", - "name": "Creates or updates a SQL virtual machine to enable the usage of Virtual Machine managed identity.", - "description": "Creates or updates a SQL virtual machine to enable the usage of Virtual Machine managed identity.", - "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineVmIdentitySettings.json", - "parameters": [ - { - "parameter": { - "$ref": "1136" - }, - "value": { - "$id": "1492", - "kind": "string", - "type": { - "$ref": "1137" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1147" - }, - "value": { - "$id": "1493", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "location": { - "$id": "1494", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1495", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "virtualMachineIdentitySettings": { - "$id": "1496", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1497", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "UserAssigned" - }, - "resourceId": { - "$id": "1498", - "kind": "string", - "type": { - "$ref": "584" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testvmidentity" - } - } - }, - "virtualMachineResourceId": { - "$id": "1499", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "parameter": { - "$ref": "1141" - }, - "value": { - "$id": "1500", - "kind": "string", - "type": { - "$ref": "1142" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1143" - }, - "value": { - "$id": "1501", - "kind": "string", - "type": { - "$ref": "1144" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1139" - }, - "value": { - "$id": "1502", - "kind": "string", - "type": { - "$ref": "1140" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1503", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1504", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1505", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1506", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1507", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1508", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1509", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1510", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": false - }, - "leastPrivilegeMode": { - "$id": "1511", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1512", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1513", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Updating" - }, - "sqlImageOffer": { - "$id": "1514", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1515", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1516", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1517", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1518", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1519", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "UserAssigned" - }, - "resourceId": { - "$id": "1520", - "kind": "string", - "type": { - "$ref": "584" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testvmidentity" - } - } - }, - "virtualMachineResourceId": { - "$id": "1521", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - }, - { - "response": { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "1148" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1149" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 201, - "bodyValue": { - "$id": "1522", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1523", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1524", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1525", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1526", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1527", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "enableAutomaticUpgrade": { - "$id": "1528", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1529", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "NotSet" - }, - "provisioningState": { - "$id": "1530", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Provisioning" - }, - "sqlImageSku": { - "$id": "1531", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Unknown" - }, - "sqlServerLicenseType": { - "$id": "1532", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1533", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1534", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "UserAssigned" - }, - "resourceId": { - "$id": "1535", - "kind": "string", - "type": { - "$ref": "584" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/testrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testvmidentity" - } - } - }, - "virtualMachineResourceId": { - "$id": "1536", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - } - } - ] - }, - { - "$id": "1537", - "kind": "http", - "name": "Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group.", - "description": "Creates or updates a SQL virtual machine and joins it to a SQL virtual machine group.", - "filePath": "2023-10-01/CreateOrUpdateVirtualMachineWithVMGroup.json", - "parameters": [ - { - "parameter": { - "$ref": "1136" - }, - "value": { - "$id": "1538", - "kind": "string", - "type": { - "$ref": "1137" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1147" - }, - "value": { - "$id": "1539", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "location": { - "$id": "1540", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1541", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "sqlVirtualMachineGroupResourceId": { - "$id": "1542", - "kind": "string", - "type": { - "$ref": "393" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" - }, - "virtualMachineResourceId": { - "$id": "1543", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2" - }, - "wsfcDomainCredentials": { - "$id": "1544", - "kind": "model", - "type": { - "$ref": "396" - }, - "value": { - "clusterBootstrapAccountPassword": { - "$id": "1545", - "kind": "string", - "type": { - "$ref": "398" - }, - "value": "" - }, - "clusterOperatorAccountPassword": { - "$id": "1546", - "kind": "string", - "type": { - "$ref": "400" - }, - "value": "" - }, - "sqlServiceAccountPassword": { - "$id": "1547", - "kind": "string", - "type": { - "$ref": "402" - }, - "value": "" - } - } - }, - "wsfcStaticIp": { - "$id": "1548", - "kind": "string", - "type": { - "$ref": "404" - }, - "value": "10.0.0.7" - } - } - } - } - } - }, - { - "parameter": { - "$ref": "1141" - }, - "value": { - "$id": "1549", - "kind": "string", - "type": { - "$ref": "1142" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1143" - }, - "value": { - "$id": "1550", - "kind": "string", - "type": { - "$ref": "1144" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1139" - }, - "value": { - "$id": "1551", - "kind": "string", - "type": { - "$ref": "1140" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1552", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1553", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm2" - }, - "type": { - "$id": "1554", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1555", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - }, - "location": { - "$id": "1556", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1557", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1558", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1559", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": false - }, - "leastPrivilegeMode": { - "$id": "1560", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1561", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1562", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Updating" - }, - "sqlImageOffer": { - "$id": "1563", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1564", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1565", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1566", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "sqlVirtualMachineGroupResourceId": { - "$id": "1567", - "kind": "string", - "type": { - "$ref": "393" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" - }, - "virtualMachineIdentitySettings": { - "$id": "1568", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1569", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1570", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2" - }, - "wsfcStaticIp": { - "$id": "1571", - "kind": "string", - "type": { - "$ref": "404" - }, - "value": "10.0.0.7" - } - } - } - } - } - }, - { - "response": { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "1148" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1149" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 201, - "bodyValue": { - "$id": "1572", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1573", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm2" - }, - "type": { - "$id": "1574", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1575", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - }, - "location": { - "$id": "1576", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1577", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "enableAutomaticUpgrade": { - "$id": "1578", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1579", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "NotSet" - }, - "provisioningState": { - "$id": "1580", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Provisioning" - }, - "sqlImageSku": { - "$id": "1581", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Unknown" - }, - "sqlServerLicenseType": { - "$id": "1582", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "sqlVirtualMachineGroupResourceId": { - "$id": "1583", - "kind": "string", - "type": { - "$ref": "393" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" - }, - "virtualMachineResourceId": { - "$id": "1584", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2" - }, - "wsfcStaticIp": { - "$id": "1585", - "kind": "string", - "type": { - "$ref": "404" - }, - "value": "10.0.0.7" - } - } - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1586", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1587", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1588", - "kind": "method", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1589", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.sqlVirtualMachineName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1590", - "kind": "method", - "name": "parameters", - "serializedName": "parameters", - "doc": "The SQL virtual machine.", - "type": { - "$ref": "370" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.resource", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1591", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "177" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1592", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "179" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "370" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.createOrUpdate", - "lroMetadata": { - "finalStateVia": 0, - "finalResponse": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - } - } - } - }, - { - "$id": "1593", - "kind": "lro", - "name": "update", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Updates SQL virtual machine tags.", - "operation": { - "$id": "1594", - "name": "update", - "resourceName": "SqlVirtualMachine", - "doc": "Updates SQL virtual machine tags.", - "accessibility": "public", - "parameters": [ - { - "$id": "1595", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1596", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1597", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.apiVersion", - "readOnly": false - }, - { - "$id": "1598", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1599", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.subscriptionId" - }, - { - "$id": "1600", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1601", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.resourceGroupName" - }, - { - "$id": "1602", - "kind": "path", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1603", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.sqlVirtualMachineName" - }, - { - "$id": "1604", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "181" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.contentType" - }, - { - "$id": "1605", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "183" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.accept" - }, - { - "$id": "1606", - "kind": "body", - "name": "parameters", - "serializedName": "parameters", - "doc": "The SQL virtual machine.", - "type": { - "$ref": "608" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.properties" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$id": "1607", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "PATCH", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", - "requestMediaTypes": [ - "application/json" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceUpdate", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1608", - "kind": "http", - "name": "Updates a SQL virtual machine tags.", - "description": "Updates a SQL virtual machine tags.", - "filePath": "2023-10-01/UpdateSqlVirtualMachine.json", - "parameters": [ - { - "parameter": { - "$ref": "1595" - }, - "value": { - "$id": "1609", - "kind": "string", - "type": { - "$ref": "1596" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1606" - }, - "value": { - "$id": "1610", - "kind": "model", - "type": { - "$ref": "608" - }, - "value": { - "tags": { - "$id": "1611", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "1612", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - } - }, - { - "parameter": { - "$ref": "1600" - }, - "value": { - "$id": "1613", - "kind": "string", - "type": { - "$ref": "1601" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1602" - }, - "value": { - "$id": "1614", - "kind": "string", - "type": { - "$ref": "1603" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1598" - }, - "value": { - "$id": "1615", - "kind": "string", - "type": { - "$ref": "1599" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "1607" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1616", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1617", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1618", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1619", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1620", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1621", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1622", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WUMU" - }, - "enableAutomaticUpgrade": { - "$id": "1623", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1624", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1625", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1626", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Updating" - }, - "sqlImageOffer": { - "$id": "1627", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1628", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1629", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1630", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1631", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1632", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1633", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - }, - "tags": { - "$id": "1634", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "1635", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1636", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1637", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1638", - "kind": "method", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1639", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.sqlVirtualMachineName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1640", - "kind": "method", - "name": "parameters", - "serializedName": "parameters", - "doc": "The SQL virtual machine.", - "type": { - "$ref": "608" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.properties", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1641", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "185" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1642", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "187" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "370" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.update", - "lroMetadata": { - "finalStateVia": 0, - "finalResponse": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "370" - } - } - } - }, - { - "$id": "1643", - "kind": "lro", - "name": "delete", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Deletes a SQL virtual machine.", - "operation": { - "$id": "1644", - "name": "delete", - "resourceName": "SqlVirtualMachine", - "doc": "Deletes a SQL virtual machine.", - "accessibility": "public", - "parameters": [ - { - "$id": "1645", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1646", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1647", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.apiVersion", - "readOnly": false - }, - { - "$id": "1648", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1649", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.subscriptionId" - }, - { - "$id": "1650", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1651", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.resourceGroupName" - }, - { - "$id": "1652", - "kind": "path", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1653", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.sqlVirtualMachineName" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "headers": [], - "isErrorResponse": false - }, - { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "1654", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "1655", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false - }, - { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - } - ], - "httpMethod": "DELETE", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceDelete", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1656", - "kind": "http", - "name": "Deletes a SQL virtual machine.", - "description": "Deletes a SQL virtual machine.", - "filePath": "2023-10-01/DeleteSqlVirtualMachine.json", - "parameters": [ - { - "parameter": { - "$ref": "1645" - }, - "value": { - "$id": "1657", - "kind": "string", - "type": { - "$ref": "1646" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1650" - }, - "value": { - "$id": "1658", - "kind": "string", - "type": { - "$ref": "1651" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1652" - }, - "value": { - "$id": "1659", - "kind": "string", - "type": { - "$ref": "1653" - }, - "value": "testvm1" - } - }, - { - "parameter": { - "$ref": "1648" - }, - "value": { - "$id": "1660", - "kind": "string", - "type": { - "$ref": "1649" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "headers": [], - "isErrorResponse": false - }, - "statusCode": 200 - }, - { - "response": { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$ref": "1654" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1655" - } - } - ], - "isErrorResponse": false - }, - "statusCode": 202 - }, - { - "response": { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - }, - "statusCode": 204 - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1661", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1662", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1663", - "kind": "method", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1664", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete.sqlVirtualMachineName", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.delete", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 204 - ] - } - } - }, - { - "$id": "1665", - "kind": "paging", - "name": "listByResourceGroup", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Gets all SQL virtual machines in a resource group.", - "operation": { - "$id": "1666", - "name": "listByResourceGroup", - "resourceName": "SqlVirtualMachine", - "doc": "Gets all SQL virtual machines in a resource group.", - "accessibility": "public", - "parameters": [ - { - "$id": "1667", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1668", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1669", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.apiVersion", - "readOnly": false - }, - { - "$id": "1670", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1671", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.subscriptionId" - }, - { - "$id": "1672", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1673", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.resourceGroupName" - }, - { - "$id": "1674", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "189" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "610" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceList", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1675", - "kind": "http", - "name": "Gets all SQL virtual machines in a resource group.", - "description": "Gets all SQL virtual machines in a resource group.", - "filePath": "2023-10-01/ListByResourceGroupSqlVirtualMachine.json", - "parameters": [ - { - "parameter": { - "$ref": "1667" - }, - "value": { - "$id": "1676", - "kind": "string", - "type": { - "$ref": "1668" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1672" - }, - "value": { - "$id": "1677", - "kind": "string", - "type": { - "$ref": "1673" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1670" - }, - "value": { - "$id": "1678", - "kind": "string", - "type": { - "$ref": "1671" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "610" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1679", - "kind": "model", - "type": { - "$ref": "610" - }, - "value": { - "value": { - "$id": "1680", - "kind": "array", - "type": { - "$ref": "612" - }, - "value": [ - { - "$id": "1681", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1682", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1683", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1684", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1685", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1686", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1687", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1688", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1689", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1690", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1691", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "1692", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1693", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1694", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1695", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1696", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1697", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1698", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - }, - { - "$id": "1699", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1700", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm1" - }, - "type": { - "$id": "1701", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1702", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1" - }, - "location": { - "$id": "1703", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1704", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1705", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1706", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1707", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1708", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1709", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "1710", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1711", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1712", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1713", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1714", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1715", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "None" - } - } - }, - "virtualMachineResourceId": { - "$id": "1716", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm1" - } - } - } - } - }, - { - "$id": "1717", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1718", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm2" - }, - "type": { - "$id": "1719", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1720", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - }, - "location": { - "$id": "1721", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1722", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "enableAutomaticUpgrade": { - "$id": "1723", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1724", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "NotSet" - }, - "osType": { - "$id": "1725", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Linux" - }, - "provisioningState": { - "$id": "1726", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "1727", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2019-Ubuntu20" - }, - "sqlImageSku": { - "$id": "1728", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Developer" - }, - "sqlManagement": { - "$id": "1729", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "LightWeight" - }, - "sqlServerLicenseType": { - "$id": "1730", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineResourceId": { - "$id": "1731", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2" - } - } - } - } - } - ] - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1732", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1733", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1734", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "189" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "612" - }, - "resultSegments": [ - "value" - ] - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.listByResourceGroup", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - }, - "pageSizeParameterSegments": [] - } - }, - { - "$id": "1735", - "kind": "paging", - "name": "list", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Gets all SQL virtual machines in a subscription.", - "operation": { - "$id": "1736", - "name": "list", - "resourceName": "SqlVirtualMachine", - "doc": "Gets all SQL virtual machines in a subscription.", - "accessibility": "public", - "parameters": [ - { - "$id": "1737", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1738", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1739", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list.apiVersion", - "readOnly": false - }, - { - "$id": "1740", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1741", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list.subscriptionId" - }, - { - "$id": "1742", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "191" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "610" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceList", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1743", - "kind": "http", - "name": "Gets all SQL virtual machines in a subscription.", - "description": "Gets all SQL virtual machines in a subscription.", - "filePath": "2023-10-01/ListSubscriptionSqlVirtualMachine.json", - "parameters": [ - { - "parameter": { - "$ref": "1737" - }, - "value": { - "$id": "1744", - "kind": "string", - "type": { - "$ref": "1738" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1740" - }, - "value": { - "$id": "1745", - "kind": "string", - "type": { - "$ref": "1741" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "610" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1746", - "kind": "model", - "type": { - "$ref": "610" - }, - "value": { - "value": { - "$id": "1747", - "kind": "array", - "type": { - "$ref": "612" - }, - "value": [ - { - "$id": "1748", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1749", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm" - }, - "type": { - "$id": "1750", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1751", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "1752", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1753", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1754", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WUMU" - }, - "enableAutomaticUpgrade": { - "$id": "1755", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1756", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1757", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1758", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "1759", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1760", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1761", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1762", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1763", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1764", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1765", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm" - } - } - } - } - }, - { - "$id": "1766", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1767", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm1" - }, - "type": { - "$id": "1768", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1769", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1" - }, - "location": { - "$id": "1770", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1771", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1772", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WUMU" - }, - "enableAutomaticUpgrade": { - "$id": "1773", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": false - }, - "leastPrivilegeMode": { - "$id": "1774", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1775", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1776", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "1777", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2019-WS2022" - }, - "sqlImageSku": { - "$id": "1778", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1779", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1780", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "AHUB" - }, - "virtualMachineIdentitySettings": { - "$id": "1781", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1782", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "None" - } - } - }, - "virtualMachineResourceId": { - "$id": "1783", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm1" - } - } - } - } - }, - { - "$id": "1784", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1785", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm2" - }, - "type": { - "$id": "1786", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1787", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - }, - "location": { - "$id": "1788", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1789", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1790", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1791", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": false - }, - "leastPrivilegeMode": { - "$id": "1792", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1793", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1794", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "1795", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2016-WS2016" - }, - "sqlImageSku": { - "$id": "1796", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Developer" - }, - "sqlManagement": { - "$id": "1797", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1798", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineIdentitySettings": { - "$id": "1799", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1800", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1801", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg1/providers/Microsoft.Compute/virtualMachines/testvm2" - } - } - } - } - }, - { - "$id": "1802", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1803", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm2" - }, - "type": { - "$id": "1804", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1805", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg2/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - }, - "location": { - "$id": "1806", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1807", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "enableAutomaticUpgrade": { - "$id": "1808", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1809", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "NotSet" - }, - "osType": { - "$id": "1810", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Linux" - }, - "provisioningState": { - "$id": "1811", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "1812", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2019-Ubuntu20" - }, - "sqlImageSku": { - "$id": "1813", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Developer" - }, - "sqlManagement": { - "$id": "1814", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "LightWeight" - }, - "sqlServerLicenseType": { - "$id": "1815", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "virtualMachineResourceId": { - "$id": "1816", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg2/providers/Microsoft.Compute/virtualMachines/testvm2" - } - } - } - } - } - ] - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1817", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "191" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "612" - }, - "resultSegments": [ - "value" - ] - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.list", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - }, - "pageSizeParameterSegments": [] - } - }, - { - "$id": "1818", - "kind": "lro", - "name": "startAssessment", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Starts SQL best practices Assessment on SQL virtual machine.", - "operation": { - "$id": "1819", - "name": "startAssessment", - "resourceName": "SqlVirtualMachines", - "doc": "Starts SQL best practices Assessment on SQL virtual machine.", - "accessibility": "public", - "parameters": [ - { - "$id": "1820", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1821", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1822", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.apiVersion", - "readOnly": false - }, - { - "$id": "1823", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1824", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.subscriptionId" - }, - { - "$id": "1825", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1826", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.resourceGroupName" - }, - { - "$id": "1827", - "kind": "path", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1828", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.sqlVirtualMachineName" - } - ], - "responses": [ - { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "1829", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "1830", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false - } - ], - "httpMethod": "POST", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceAction", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1831", - "kind": "http", - "name": "Starts SQL best practices Assessment on SQL virtual machine", - "description": "Starts SQL best practices Assessment on SQL virtual machine", - "filePath": "2023-10-01/StartAssessmentOnSqlVirtualMachine.json", - "parameters": [ - { - "parameter": { - "$ref": "1820" - }, - "value": { - "$id": "1832", - "kind": "string", - "type": { - "$ref": "1821" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1825" - }, - "value": { - "$id": "1833", - "kind": "string", - "type": { - "$ref": "1826" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1827" - }, - "value": { - "$id": "1834", - "kind": "string", - "type": { - "$ref": "1828" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1823" - }, - "value": { - "$id": "1835", - "kind": "string", - "type": { - "$ref": "1824" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$ref": "1829" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1830" - } - } - ], - "isErrorResponse": false - }, - "statusCode": 202 - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1836", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1837", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1838", - "kind": "method", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1839", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment.sqlVirtualMachineName", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.startAssessment", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 200 - ] - } - } - }, - { - "$id": "1840", - "kind": "lro", - "name": "fetchDCAssessment", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine", - "operation": { - "$id": "1841", - "name": "fetchDCAssessment", - "resourceName": "SqlVirtualMachines", - "doc": "Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine", - "accessibility": "public", - "parameters": [ - { - "$id": "1842", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1843", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1844", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.apiVersion", - "readOnly": false - }, - { - "$id": "1845", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1846", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.subscriptionId" - }, - { - "$id": "1847", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1848", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.resourceGroupName" - }, - { - "$id": "1849", - "kind": "path", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1850", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.sqlVirtualMachineName" - }, - { - "$id": "1851", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "193" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.contentType" - }, - { - "$id": "1852", - "kind": "body", - "name": "parameters", - "serializedName": "parameters", - "doc": "Disk Config Assessment property", - "type": { - "$ref": "616" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.body" - } - ], - "responses": [ - { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "1853", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "1854", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false - } - ], - "httpMethod": "POST", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/fetchDCAssessment", - "requestMediaTypes": [ - "application/json" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceAction", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1855", - "kind": "http", - "name": "Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine", - "description": "Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine", - "filePath": "2023-10-01/StartDiskConfigAssessmentOnSqlVirtualMachine.json", - "parameters": [ - { - "parameter": { - "$ref": "1842" - }, - "value": { - "$id": "1856", - "kind": "string", - "type": { - "$ref": "1843" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1852" - }, - "value": { - "$id": "1857", - "kind": "model", - "type": { - "$ref": "616" - }, - "value": { - "runDiskConfigRules": { - "$id": "1858", - "kind": "boolean", - "type": { - "$ref": "618" - }, - "value": false - } - } - } - }, - { - "parameter": { - "$ref": "1847" - }, - "value": { - "$id": "1859", - "kind": "string", - "type": { - "$ref": "1848" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1849" - }, - "value": { - "$id": "1860", - "kind": "string", - "type": { - "$ref": "1850" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1845" - }, - "value": { - "$id": "1861", - "kind": "string", - "type": { - "$ref": "1846" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$ref": "1853" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1854" - } - } - ], - "isErrorResponse": false - }, - "statusCode": 202 - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1862", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1863", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1864", - "kind": "method", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.sqlVirtualMachineName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1866", - "kind": "method", - "name": "parameters", - "serializedName": "parameters", - "doc": "Disk Config Assessment property", - "type": { - "$ref": "616" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.body", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1867", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "195" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.fetchDCAssessment", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 200 - ] - } - } - }, - { - "$id": "1868", - "kind": "lro", - "name": "redeploy", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Uninstalls and reinstalls the SQL IaaS Extension.", - "operation": { - "$id": "1869", - "name": "redeploy", - "resourceName": "SqlVirtualMachines", - "doc": "Uninstalls and reinstalls the SQL IaaS Extension.", - "accessibility": "public", - "parameters": [ - { - "$id": "1870", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1871", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1872", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.apiVersion", - "readOnly": false - }, - { - "$id": "1873", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1874", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.subscriptionId" - }, - { - "$id": "1875", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1876", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.resourceGroupName" - }, - { - "$id": "1877", - "kind": "path", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1878", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.sqlVirtualMachineName" - } - ], - "responses": [ - { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "1879", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "1880", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false - } - ], - "httpMethod": "POST", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceAction", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1881", - "kind": "http", - "name": "Uninstalls and reinstalls the SQL IaaS Extension.", - "description": "Uninstalls and reinstalls the SQL IaaS Extension.", - "filePath": "2023-10-01/RedeploySqlVirtualMachine.json", - "parameters": [ - { - "parameter": { - "$ref": "1870" - }, - "value": { - "$id": "1882", - "kind": "string", - "type": { - "$ref": "1871" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1875" - }, - "value": { - "$id": "1883", - "kind": "string", - "type": { - "$ref": "1876" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1877" - }, - "value": { - "$id": "1884", - "kind": "string", - "type": { - "$ref": "1878" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1873" - }, - "value": { - "$id": "1885", - "kind": "string", - "type": { - "$ref": "1874" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$ref": "1879" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1880" - } - } - ], - "isErrorResponse": false - }, - "statusCode": 202 - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1886", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1887", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1888", - "kind": "method", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "1889", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy.sqlVirtualMachineName", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.redeploy", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 200 - ] - } - } - }, - { - "$id": "1890", - "kind": "paging", - "name": "GetSqlVmsBySqlVmGroup", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Gets the list of sql virtual machines in a SQL virtual machine group.", - "operation": { - "$id": "1891", - "name": "GetSqlVmsBySqlVmGroup", - "resourceName": "SqlVirtualMachineGroups", - "doc": "Gets the list of sql virtual machines in a SQL virtual machine group.", - "accessibility": "public", - "parameters": [ - { - "$id": "1892", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1893", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1894", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.apiVersion", - "readOnly": false - }, - { - "$id": "1895", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1896", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.subscriptionId" - }, - { - "$id": "1897", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1898", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.resourceGroupName" - }, - { - "$id": "1899", - "kind": "path", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "1900", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.sqlVirtualMachineGroupName" - }, - { - "$id": "1901", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "197" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "610" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/sqlVirtualMachines", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceAction", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1902", - "kind": "http", - "name": "Gets the list of sql virtual machines in a SQL virtual machine group.", - "description": "Gets the list of sql virtual machines in a SQL virtual machine group.", - "filePath": "2023-10-01/ListBySqlVirtualMachineGroupSqlVirtualMachine.json", - "parameters": [ - { - "parameter": { - "$ref": "1892" - }, - "value": { - "$id": "1903", - "kind": "string", - "type": { - "$ref": "1893" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1897" - }, - "value": { - "$id": "1904", - "kind": "string", - "type": { - "$ref": "1898" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1899" - }, - "value": { - "$id": "1905", - "kind": "string", - "type": { - "$ref": "1900" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "1895" - }, - "value": { - "$id": "1906", - "kind": "string", - "type": { - "$ref": "1896" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "610" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1907", - "kind": "model", - "type": { - "$ref": "610" - }, - "value": { - "value": { - "$id": "1908", - "kind": "array", - "type": { - "$ref": "612" - }, - "value": [ - { - "$id": "1909", - "kind": "model", - "type": { - "$ref": "370" - }, - "value": { - "name": { - "$id": "1910", - "kind": "string", - "type": { - "$ref": "588" - }, - "value": "testvm2" - }, - "type": { - "$id": "1911", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachines" - }, - "id": { - "$id": "1912", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2" - }, - "location": { - "$id": "1913", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1914", - "kind": "model", - "type": { - "$ref": "380" - }, - "value": { - "additionalVmPatch": { - "$id": "1915", - "kind": "string", - "type": { - "$ref": "117" - }, - "value": "WU" - }, - "enableAutomaticUpgrade": { - "$id": "1916", - "kind": "boolean", - "type": { - "$ref": "578" - }, - "value": true - }, - "leastPrivilegeMode": { - "$id": "1917", - "kind": "string", - "type": { - "$ref": "43" - }, - "value": "Enabled" - }, - "osType": { - "$id": "1918", - "kind": "string", - "type": { - "$ref": "127" - }, - "value": "Windows" - }, - "provisioningState": { - "$id": "1919", - "kind": "string", - "type": { - "$ref": "385" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "1920", - "kind": "string", - "type": { - "$ref": "387" - }, - "value": "SQL2022-WS2022" - }, - "sqlImageSku": { - "$id": "1921", - "kind": "string", - "type": { - "$ref": "47" - }, - "value": "Enterprise" - }, - "sqlManagement": { - "$id": "1922", - "kind": "string", - "type": { - "$ref": "38" - }, - "value": "Full" - }, - "sqlServerLicenseType": { - "$id": "1923", - "kind": "string", - "type": { - "$ref": "33" - }, - "value": "PAYG" - }, - "sqlVirtualMachineGroupResourceId": { - "$id": "1924", - "kind": "string", - "type": { - "$ref": "393" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" - }, - "virtualMachineIdentitySettings": { - "$id": "1925", - "kind": "model", - "type": { - "$ref": "581" - }, - "value": { - "type": { - "$id": "1926", - "kind": "string", - "type": { - "$ref": "122" - }, - "value": "SystemAssigned" - } - } - }, - "virtualMachineResourceId": { - "$id": "1927", - "kind": "string", - "type": { - "$ref": "382" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Compute/virtualMachines/testvm2" - } - } - } - } - } - ] - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1928", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1929", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1930", - "kind": "method", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "1931", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.sqlVirtualMachineGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1932", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "197" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "612" - }, - "resultSegments": [ - "value" - ] - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listBySqlVmGroup", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - }, - "pageSizeParameterSegments": [] - } - } - ], - "parameters": [ - { - "$id": "1933", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "1934", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "1935", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.endpoint" - }, - { - "$id": "1936", - "kind": "method", - "name": "apiVersion", - "serializedName": "apiVersion", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1937", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "", - "isApiVersion": true, - "defaultValue": { - "type": { - "$id": "1938", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.apiVersion", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1939", - "kind": "method", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1940", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.get.subscriptionId", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "initializedBy": 0, - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceOperations", - "arguments": {} - } - ], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines", - "apiVersions": [ - "2023-10-01" - ], - "parent": { - "$ref": "672" - }, - "isMultiServiceClient": false - }, - { - "$id": "1941", - "kind": "client", - "name": "SqlVirtualMachineGroups", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "methods": [ - { - "$id": "1942", - "kind": "basic", - "name": "get", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Gets a SQL virtual machine group.", - "operation": { - "$id": "1943", - "name": "get", - "resourceName": "SqlVirtualMachineGroup", - "doc": "Gets a SQL virtual machine group.", - "accessibility": "public", - "parameters": [ - { - "$id": "1944", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1945", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1946", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.apiVersion", - "readOnly": false - }, - { - "$id": "1947", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1948", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.subscriptionId" - }, - { - "$id": "1949", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1950", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.resourceGroupName" - }, - { - "$id": "1951", - "kind": "path", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "1952", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.sqlVirtualMachineGroupName" - }, - { - "$id": "1953", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "199" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "619" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceRead", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1954", - "kind": "http", - "name": "Gets a SQL virtual machine group.", - "description": "Gets a SQL virtual machine group.", - "filePath": "2023-10-01/GetSqlVirtualMachineGroup.json", - "parameters": [ - { - "parameter": { - "$ref": "1944" - }, - "value": { - "$id": "1955", - "kind": "string", - "type": { - "$ref": "1945" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1949" - }, - "value": { - "$id": "1956", - "kind": "string", - "type": { - "$ref": "1950" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1951" - }, - "value": { - "$id": "1957", - "kind": "string", - "type": { - "$ref": "1952" - }, - "value": "testvmgroup" - } - }, - { - "parameter": { - "$ref": "1947" - }, - "value": { - "$id": "1958", - "kind": "string", - "type": { - "$ref": "1948" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "619" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "1959", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "name": { - "$id": "1960", - "kind": "string", - "type": { - "$ref": "652" - }, - "value": "testvmgroup" - }, - "type": { - "$id": "1961", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" - }, - "id": { - "$id": "1962", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" - }, - "location": { - "$id": "1963", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "1964", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "provisioningState": { - "$id": "1965", - "kind": "string", - "type": { - "$ref": "623" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "1966", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2016-WS2016" - }, - "sqlImageSku": { - "$id": "1967", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "1968", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "clusterBootstrapAccount": { - "$id": "1969", - "kind": "string", - "type": { - "$ref": "637" - }, - "value": "testrpadmin" - }, - "clusterOperatorAccount": { - "$id": "1970", - "kind": "string", - "type": { - "$ref": "639" - }, - "value": "testrp@testdomain.com" - }, - "domainFqdn": { - "$id": "1971", - "kind": "string", - "type": { - "$ref": "633" - }, - "value": "testdomain.com" - }, - "isSqlServiceAccountGmsa": { - "$id": "1972", - "kind": "boolean", - "type": { - "$ref": "643" - }, - "value": false - }, - "ouPath": { - "$id": "1973", - "kind": "string", - "type": { - "$ref": "635" - }, - "value": "OU=WSCluster,DC=testdomain,DC=com" - }, - "sqlServiceAccount": { - "$id": "1974", - "kind": "string", - "type": { - "$ref": "641" - }, - "value": "sqlservice@testdomain.com" - }, - "storageAccountUrl": { - "$id": "1975", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "1976", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "1977", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "1978", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1979", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1980", - "kind": "method", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "1981", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.sqlVirtualMachineGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "1982", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "199" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "619" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get" - }, - { - "$id": "1983", - "kind": "lro", - "name": "createOrUpdate", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Creates or updates a SQL virtual machine group.", - "operation": { - "$id": "1984", - "name": "createOrUpdate", - "resourceName": "SqlVirtualMachineGroup", - "doc": "Creates or updates a SQL virtual machine group.", - "accessibility": "public", - "parameters": [ - { - "$id": "1985", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "1986", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "1987", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.apiVersion", - "readOnly": false - }, - { - "$id": "1988", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "1989", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.subscriptionId" - }, - { - "$id": "1990", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "1991", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.resourceGroupName" - }, - { - "$id": "1992", - "kind": "path", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "1993", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.sqlVirtualMachineGroupName" - }, - { - "$id": "1994", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "201" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.contentType" - }, - { - "$id": "1995", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "203" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.accept" - }, - { - "$id": "1996", - "kind": "body", - "name": "parameters", - "serializedName": "parameters", - "doc": "The SQL virtual machine group.", - "type": { - "$ref": "619" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.resource" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "619" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "619" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$id": "1997", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "1998", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "PUT", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", - "requestMediaTypes": [ - "application/json" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", - "arguments": {} - } - ], - "examples": [ - { - "$id": "1999", - "kind": "http", - "name": "Creates or updates a SQL virtual machine group.", - "description": "Creates or updates a SQL virtual machine group.", - "filePath": "2023-10-01/CreateOrUpdateSqlVirtualMachineGroup.json", - "parameters": [ - { - "parameter": { - "$ref": "1985" - }, - "value": { - "$id": "2000", - "kind": "string", - "type": { - "$ref": "1986" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "1996" - }, - "value": { - "$id": "2001", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "location": { - "$id": "2002", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "2003", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "sqlImageOffer": { - "$id": "2004", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2016-WS2016" - }, - "sqlImageSku": { - "$id": "2005", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "2006", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "clusterBootstrapAccount": { - "$id": "2007", - "kind": "string", - "type": { - "$ref": "637" - }, - "value": "testrpadmin" - }, - "clusterOperatorAccount": { - "$id": "2008", - "kind": "string", - "type": { - "$ref": "639" - }, - "value": "testrp@testdomain.com" - }, - "clusterSubnetType": { - "$id": "2009", - "kind": "string", - "type": { - "$ref": "150" - }, - "value": "MultiSubnet" - }, - "domainFqdn": { - "$id": "2010", - "kind": "string", - "type": { - "$ref": "633" - }, - "value": "testdomain.com" - }, - "isSqlServiceAccountGmsa": { - "$id": "2011", - "kind": "boolean", - "type": { - "$ref": "643" - }, - "value": false - }, - "ouPath": { - "$id": "2012", - "kind": "string", - "type": { - "$ref": "635" - }, - "value": "OU=WSCluster,DC=testdomain,DC=com" - }, - "sqlServiceAccount": { - "$id": "2013", - "kind": "string", - "type": { - "$ref": "641" - }, - "value": "sqlservice@testdomain.com" - }, - "storageAccountPrimaryKey": { - "$id": "2014", - "kind": "string", - "type": { - "$ref": "649" - }, - "value": "" - }, - "storageAccountUrl": { - "$id": "2015", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "2016", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2017", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - } - }, - { - "parameter": { - "$ref": "1990" - }, - "value": { - "$id": "2018", - "kind": "string", - "type": { - "$ref": "1991" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "1992" - }, - "value": { - "$id": "2019", - "kind": "string", - "type": { - "$ref": "1993" - }, - "value": "testvmgroup" - } - }, - { - "parameter": { - "$ref": "1988" - }, - "value": { - "$id": "2020", - "kind": "string", - "type": { - "$ref": "1989" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "619" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "2021", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "name": { - "$id": "2022", - "kind": "string", - "type": { - "$ref": "652" - }, - "value": "testvmgroup" - }, - "type": { - "$id": "2023", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" - }, - "id": { - "$id": "2024", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" - }, - "location": { - "$id": "2025", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "2026", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "provisioningState": { - "$id": "2027", - "kind": "string", - "type": { - "$ref": "623" - }, - "value": "UpdatingDomainful" - }, - "sqlImageOffer": { - "$id": "2028", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2016-WS2016" - }, - "sqlImageSku": { - "$id": "2029", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "2030", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "clusterBootstrapAccount": { - "$id": "2031", - "kind": "string", - "type": { - "$ref": "637" - }, - "value": "testrpadmin" - }, - "clusterOperatorAccount": { - "$id": "2032", - "kind": "string", - "type": { - "$ref": "639" - }, - "value": "testrp@testdomain.com" - }, - "clusterSubnetType": { - "$id": "2033", - "kind": "string", - "type": { - "$ref": "150" - }, - "value": "MultiSubnet" - }, - "domainFqdn": { - "$id": "2034", - "kind": "string", - "type": { - "$ref": "633" - }, - "value": "testdomain.com" - }, - "isSqlServiceAccountGmsa": { - "$id": "2035", - "kind": "boolean", - "type": { - "$ref": "643" - }, - "value": false - }, - "ouPath": { - "$id": "2036", - "kind": "string", - "type": { - "$ref": "635" - }, - "value": "OU=WSCluster,DC=testdomain,DC=com" - }, - "sqlServiceAccount": { - "$id": "2037", - "kind": "string", - "type": { - "$ref": "641" - }, - "value": "sqlservice@testdomain.com" - }, - "storageAccountUrl": { - "$id": "2038", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "2039", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2040", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - } - }, - { - "response": { - "statusCodes": [ - 201 - ], - "bodyType": { - "$ref": "619" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "1997" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "1998" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 201, - "bodyValue": { - "$id": "2041", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "name": { - "$id": "2042", - "kind": "string", - "type": { - "$ref": "652" - }, - "value": "testvmgroup" - }, - "type": { - "$id": "2043", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" - }, - "id": { - "$id": "2044", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" - }, - "location": { - "$id": "2045", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "2046", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "provisioningState": { - "$id": "2047", - "kind": "string", - "type": { - "$ref": "623" - }, - "value": "ProvisioningDomainful" - }, - "sqlImageOffer": { - "$id": "2048", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2016-WS2016" - }, - "sqlImageSku": { - "$id": "2049", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "2050", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "clusterBootstrapAccount": { - "$id": "2051", - "kind": "string", - "type": { - "$ref": "637" - }, - "value": "testrpadmin" - }, - "clusterOperatorAccount": { - "$id": "2052", - "kind": "string", - "type": { - "$ref": "639" - }, - "value": "testrp@testdomain.com" - }, - "clusterSubnetType": { - "$id": "2053", - "kind": "string", - "type": { - "$ref": "150" - }, - "value": "MultiSubnet" - }, - "domainFqdn": { - "$id": "2054", - "kind": "string", - "type": { - "$ref": "633" - }, - "value": "testdomain.com" - }, - "isSqlServiceAccountGmsa": { - "$id": "2055", - "kind": "boolean", - "type": { - "$ref": "643" - }, - "value": false - }, - "ouPath": { - "$id": "2056", - "kind": "string", - "type": { - "$ref": "635" - }, - "value": "OU=WSCluster,DC=testdomain,DC=com" - }, - "sqlServiceAccount": { - "$id": "2057", - "kind": "string", - "type": { - "$ref": "641" - }, - "value": "sqlservice@testdomain.com" - }, - "storageAccountUrl": { - "$id": "2058", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "2059", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2060", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "2061", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "2062", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2063", - "kind": "method", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "2064", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.sqlVirtualMachineGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2065", - "kind": "method", - "name": "parameters", - "serializedName": "parameters", - "doc": "The SQL virtual machine group.", - "type": { - "$ref": "619" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.resource", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2066", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "205" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2067", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "207" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "619" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.createOrUpdate", - "lroMetadata": { - "finalStateVia": 0, - "finalResponse": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "619" - } - } - } - }, - { - "$id": "2068", - "kind": "lro", - "name": "update", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Updates SQL virtual machine group tags.", - "operation": { - "$id": "2069", - "name": "update", - "resourceName": "SqlVirtualMachineGroup", - "doc": "Updates SQL virtual machine group tags.", - "accessibility": "public", - "parameters": [ - { - "$id": "2070", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "2071", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "2072", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.apiVersion", - "readOnly": false - }, - { - "$id": "2073", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "2074", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.subscriptionId" - }, - { - "$id": "2075", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "2076", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.resourceGroupName" - }, - { - "$id": "2077", - "kind": "path", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "2078", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.sqlVirtualMachineGroupName" - }, - { - "$id": "2079", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "209" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.contentType" - }, - { - "$id": "2080", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "211" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.accept" - }, - { - "$id": "2081", - "kind": "body", - "name": "parameters", - "serializedName": "parameters", - "doc": "The SQL virtual machine group.", - "type": { - "$ref": "653" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.properties" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "619" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$id": "2082", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "PATCH", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", - "requestMediaTypes": [ - "application/json" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceUpdate", - "arguments": {} - } - ], - "examples": [ - { - "$id": "2083", - "kind": "http", - "name": "Updates a SQL virtual machine group tags.", - "description": "Updates a SQL virtual machine group tags.", - "filePath": "2023-10-01/UpdateSqlVirtualMachineGroup.json", - "parameters": [ - { - "parameter": { - "$ref": "2070" - }, - "value": { - "$id": "2084", - "kind": "string", - "type": { - "$ref": "2071" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "2081" - }, - "value": { - "$id": "2085", - "kind": "model", - "type": { - "$ref": "653" - }, - "value": { - "tags": { - "$id": "2086", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2087", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - } - }, - { - "parameter": { - "$ref": "2075" - }, - "value": { - "$id": "2088", - "kind": "string", - "type": { - "$ref": "2076" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "2077" - }, - "value": { - "$id": "2089", - "kind": "string", - "type": { - "$ref": "2078" - }, - "value": "testvmgroup" - } - }, - { - "parameter": { - "$ref": "2073" - }, - "value": { - "$id": "2090", - "kind": "string", - "type": { - "$ref": "2074" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "619" - }, - "headers": [ - { - "name": "azureAsyncOperation", - "nameInResponse": "Azure-AsyncOperation", - "doc": "A link to the status monitor", - "type": { - "$ref": "2082" - } - } - ], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "2091", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "name": { - "$id": "2092", - "kind": "string", - "type": { - "$ref": "652" - }, - "value": "testvmgroup" - }, - "type": { - "$id": "2093", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" - }, - "id": { - "$id": "2094", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" - }, - "location": { - "$id": "2095", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "2096", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "provisioningState": { - "$id": "2097", - "kind": "string", - "type": { - "$ref": "623" - }, - "value": "UpdatingDomainful" - }, - "sqlImageOffer": { - "$id": "2098", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2017-WS2016" - }, - "sqlImageSku": { - "$id": "2099", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "2100", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "storageAccountUrl": { - "$id": "2101", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "2102", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2103", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "2104", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "2105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2106", - "kind": "method", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "2107", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.sqlVirtualMachineGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2108", - "kind": "method", - "name": "parameters", - "serializedName": "parameters", - "doc": "The SQL virtual machine group.", - "type": { - "$ref": "653" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.properties", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2109", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "213" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2110", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "215" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "619" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.update", - "lroMetadata": { - "finalStateVia": 0, - "finalResponse": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "619" - } - } - } - }, - { - "$id": "2111", - "kind": "lro", - "name": "delete", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Deletes a SQL virtual machine group.", - "operation": { - "$id": "2112", - "name": "delete", - "resourceName": "SqlVirtualMachineGroup", - "doc": "Deletes a SQL virtual machine group.", - "accessibility": "public", - "parameters": [ - { - "$id": "2113", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "2114", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "2115", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.apiVersion", - "readOnly": false - }, - { - "$id": "2116", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "2117", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.subscriptionId" - }, - { - "$id": "2118", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "2119", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.resourceGroupName" - }, - { - "$id": "2120", - "kind": "path", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "2121", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.sqlVirtualMachineGroupName" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "headers": [], - "isErrorResponse": false - }, - { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "2122", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "2123", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false - }, - { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - } - ], - "httpMethod": "DELETE", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceDelete", - "arguments": {} - } - ], - "examples": [ - { - "$id": "2124", - "kind": "http", - "name": "Deletes a SQL virtual machine group.", - "description": "Deletes a SQL virtual machine group.", - "filePath": "2023-10-01/DeleteSqlVirtualMachineGroup.json", - "parameters": [ - { - "parameter": { - "$ref": "2113" - }, - "value": { - "$id": "2125", - "kind": "string", - "type": { - "$ref": "2114" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "2118" - }, - "value": { - "$id": "2126", - "kind": "string", - "type": { - "$ref": "2119" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "2120" - }, - "value": { - "$id": "2127", - "kind": "string", - "type": { - "$ref": "2121" - }, - "value": "testvmgroup" - } - }, - { - "parameter": { - "$ref": "2116" - }, - "value": { - "$id": "2128", - "kind": "string", - "type": { - "$ref": "2117" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "headers": [], - "isErrorResponse": false - }, - "statusCode": 200 - }, - { - "response": { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$ref": "2122" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "2123" - } - } - ], - "isErrorResponse": false - }, - "statusCode": 202 - }, - { - "response": { - "statusCodes": [ - 204 - ], - "headers": [], - "isErrorResponse": false - }, - "statusCode": 204 - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "2129", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "2130", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2131", - "kind": "method", - "name": "sqlVirtualMachineGroupName", - "serializedName": "sqlVirtualMachineGroupName", - "doc": "Name of the SQL virtual machine group.", - "type": { - "$id": "2132", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete.sqlVirtualMachineGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": {}, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.delete", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 204 - ] - } - } - }, - { - "$id": "2133", - "kind": "paging", - "name": "listByResourceGroup", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Gets all SQL virtual machine groups in a resource group.", - "operation": { - "$id": "2134", - "name": "listByResourceGroup", - "resourceName": "SqlVirtualMachineGroup", - "doc": "Gets all SQL virtual machine groups in a resource group.", - "accessibility": "public", - "parameters": [ - { - "$id": "2135", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "2136", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "2137", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.apiVersion", - "readOnly": false - }, - { - "$id": "2138", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "2139", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.subscriptionId" - }, - { - "$id": "2140", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "2141", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.resourceGroupName" - }, - { - "$id": "2142", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "217" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "655" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceList", - "arguments": {} - } - ], - "examples": [ - { - "$id": "2143", - "kind": "http", - "name": "Gets all SQL virtual machine groups in a resource group.", - "description": "Gets all SQL virtual machine groups in a resource group.", - "filePath": "2023-10-01/ListByResourceGroupSqlVirtualMachineGroup.json", - "parameters": [ - { - "parameter": { - "$ref": "2135" - }, - "value": { - "$id": "2144", - "kind": "string", - "type": { - "$ref": "2136" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "2140" - }, - "value": { - "$id": "2145", - "kind": "string", - "type": { - "$ref": "2141" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "2138" - }, - "value": { - "$id": "2146", - "kind": "string", - "type": { - "$ref": "2139" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "655" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "2147", - "kind": "model", - "type": { - "$ref": "655" - }, - "value": { - "value": { - "$id": "2148", - "kind": "array", - "type": { - "$ref": "657" - }, - "value": [ - { - "$id": "2149", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "name": { - "$id": "2150", - "kind": "string", - "type": { - "$ref": "652" - }, - "value": "testvmgroup" - }, - "type": { - "$id": "2151", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" - }, - "id": { - "$id": "2152", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup" - }, - "location": { - "$id": "2153", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "2154", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "provisioningState": { - "$id": "2155", - "kind": "string", - "type": { - "$ref": "623" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "2156", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2017-WS2016" - }, - "sqlImageSku": { - "$id": "2157", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "2158", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "clusterBootstrapAccount": { - "$id": "2159", - "kind": "string", - "type": { - "$ref": "637" - }, - "value": "testrpadmin" - }, - "clusterOperatorAccount": { - "$id": "2160", - "kind": "string", - "type": { - "$ref": "639" - }, - "value": "testrp@testdomain.com" - }, - "domainFqdn": { - "$id": "2161", - "kind": "string", - "type": { - "$ref": "633" - }, - "value": "testdomain.com" - }, - "isSqlServiceAccountGmsa": { - "$id": "2162", - "kind": "boolean", - "type": { - "$ref": "643" - }, - "value": false - }, - "ouPath": { - "$id": "2163", - "kind": "string", - "type": { - "$ref": "635" - }, - "value": "OU=WSCluster,DC=testdomain,DC=com" - }, - "sqlServiceAccount": { - "$id": "2164", - "kind": "string", - "type": { - "$ref": "641" - }, - "value": "sqlservice@testdomain.com" - }, - "storageAccountUrl": { - "$id": "2165", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "2166", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2167", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - }, - { - "$id": "2168", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "name": { - "$id": "2169", - "kind": "string", - "type": { - "$ref": "652" - }, - "value": "testvmgroup1" - }, - "type": { - "$id": "2170", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" - }, - "id": { - "$id": "2171", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup1" - }, - "location": { - "$id": "2172", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "2173", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "provisioningState": { - "$id": "2174", - "kind": "string", - "type": { - "$ref": "623" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "2175", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2016-WS2016" - }, - "sqlImageSku": { - "$id": "2176", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "2177", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "clusterBootstrapAccount": { - "$id": "2178", - "kind": "string", - "type": { - "$ref": "637" - }, - "value": "testrpadmin" - }, - "clusterOperatorAccount": { - "$id": "2179", - "kind": "string", - "type": { - "$ref": "639" - }, - "value": "testrp@testdomain.com" - }, - "domainFqdn": { - "$id": "2180", - "kind": "string", - "type": { - "$ref": "633" - }, - "value": "testdomain.com" - }, - "isSqlServiceAccountGmsa": { - "$id": "2181", - "kind": "boolean", - "type": { - "$ref": "643" - }, - "value": false - }, - "ouPath": { - "$id": "2182", - "kind": "string", - "type": { - "$ref": "635" - }, - "value": "OU=WSCluster,DC=testdomain,DC=com" - }, - "sqlServiceAccount": { - "$id": "2183", - "kind": "string", - "type": { - "$ref": "641" - }, - "value": "sqlservice@testdomain.com" - }, - "storageAccountUrl": { - "$id": "2184", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "2185", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2186", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - }, - { - "$id": "2187", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "name": { - "$id": "2188", - "kind": "string", - "type": { - "$ref": "652" - }, - "value": "testvmgroup2" - }, - "type": { - "$id": "2189", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" - }, - "id": { - "$id": "2190", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/testvmgroup2" - }, - "location": { - "$id": "2191", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "2192", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "provisioningState": { - "$id": "2193", - "kind": "string", - "type": { - "$ref": "623" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "2194", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2016-WS2016" - }, - "sqlImageSku": { - "$id": "2195", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "2196", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "clusterBootstrapAccount": { - "$id": "2197", - "kind": "string", - "type": { - "$ref": "637" - }, - "value": "testrpadmin" - }, - "clusterOperatorAccount": { - "$id": "2198", - "kind": "string", - "type": { - "$ref": "639" - }, - "value": "testrp@testdomain.com" - }, - "domainFqdn": { - "$id": "2199", - "kind": "string", - "type": { - "$ref": "633" - }, - "value": "testdomain.com" - }, - "isSqlServiceAccountGmsa": { - "$id": "2200", - "kind": "boolean", - "type": { - "$ref": "643" - }, - "value": false - }, - "ouPath": { - "$id": "2201", - "kind": "string", - "type": { - "$ref": "635" - }, - "value": "OU=WSCluster,DC=testdomain,DC=com" - }, - "sqlServiceAccount": { - "$id": "2202", - "kind": "string", - "type": { - "$ref": "641" - }, - "value": "sqlservice@testdomain.com" - }, - "storageAccountUrl": { - "$id": "2203", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "2204", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2205", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - } - ] - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "2206", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "2207", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2208", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "217" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "657" - }, - "resultSegments": [ - "value" - ] - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.listByResourceGroup", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - }, - "pageSizeParameterSegments": [] - } - }, - { - "$id": "2209", - "kind": "paging", - "name": "list", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Gets all SQL virtual machine groups in a subscription.", - "operation": { - "$id": "2210", - "name": "list", - "resourceName": "SqlVirtualMachineGroup", - "doc": "Gets all SQL virtual machine groups in a subscription.", - "accessibility": "public", - "parameters": [ - { - "$id": "2211", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "2212", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "2213", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list.apiVersion", - "readOnly": false - }, - { - "$id": "2214", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "2215", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list.subscriptionId" - }, - { - "$id": "2216", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "219" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list.accept" - } - ], - "responses": [ - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "655" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "GET", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups", - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceList", - "arguments": {} - } - ], - "examples": [ - { - "$id": "2217", - "kind": "http", - "name": "Gets all SQL virtual machine groups in a subscription.", - "description": "Gets all SQL virtual machine groups in a subscription.", - "filePath": "2023-10-01/ListSubscriptionSqlVirtualMachineGroup.json", - "parameters": [ - { - "parameter": { - "$ref": "2211" - }, - "value": { - "$id": "2218", - "kind": "string", - "type": { - "$ref": "2212" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "2214" - }, - "value": { - "$id": "2219", - "kind": "string", - "type": { - "$ref": "2215" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "655" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "2220", - "kind": "model", - "type": { - "$ref": "655" - }, - "value": { - "value": { - "$id": "2221", - "kind": "array", - "type": { - "$ref": "657" - }, - "value": [ - { - "$id": "2222", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "name": { - "$id": "2223", - "kind": "string", - "type": { - "$ref": "652" - }, - "value": "testvmgroup" - }, - "type": { - "$id": "2224", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" - }, - "id": { - "$id": "2225", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/" - }, - "location": { - "$id": "2226", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "2227", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "provisioningState": { - "$id": "2228", - "kind": "string", - "type": { - "$ref": "623" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "2229", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2017-WS2016" - }, - "sqlImageSku": { - "$id": "2230", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "2231", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "clusterBootstrapAccount": { - "$id": "2232", - "kind": "string", - "type": { - "$ref": "637" - }, - "value": "testrpadmin" - }, - "clusterOperatorAccount": { - "$id": "2233", - "kind": "string", - "type": { - "$ref": "639" - }, - "value": "testrp@testdomain.com" - }, - "clusterSubnetType": { - "$id": "2234", - "kind": "string", - "type": { - "$ref": "150" - }, - "value": "MultiSubnet" - }, - "domainFqdn": { - "$id": "2235", - "kind": "string", - "type": { - "$ref": "633" - }, - "value": "testdomain.com" - }, - "isSqlServiceAccountGmsa": { - "$id": "2236", - "kind": "boolean", - "type": { - "$ref": "643" - }, - "value": false - }, - "ouPath": { - "$id": "2237", - "kind": "string", - "type": { - "$ref": "635" - }, - "value": "OU=WSCluster,DC=testdomain,DC=com" - }, - "sqlServiceAccount": { - "$id": "2238", - "kind": "string", - "type": { - "$ref": "641" - }, - "value": "sqlservice@testdomain.com" - }, - "storageAccountUrl": { - "$id": "2239", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "2240", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2241", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - }, - { - "$id": "2242", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "name": { - "$id": "2243", - "kind": "string", - "type": { - "$ref": "652" - }, - "value": "testvmgroup1" - }, - "type": { - "$id": "2244", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" - }, - "id": { - "$id": "2245", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/" - }, - "location": { - "$id": "2246", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "2247", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "provisioningState": { - "$id": "2248", - "kind": "string", - "type": { - "$ref": "623" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "2249", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2016-WS2016" - }, - "sqlImageSku": { - "$id": "2250", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "2251", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "clusterBootstrapAccount": { - "$id": "2252", - "kind": "string", - "type": { - "$ref": "637" - }, - "value": "testrpadmin" - }, - "clusterOperatorAccount": { - "$id": "2253", - "kind": "string", - "type": { - "$ref": "639" - }, - "value": "testrp@testdomain.com" - }, - "clusterSubnetType": { - "$id": "2254", - "kind": "string", - "type": { - "$ref": "150" - }, - "value": "MultiSubnet" - }, - "domainFqdn": { - "$id": "2255", - "kind": "string", - "type": { - "$ref": "633" - }, - "value": "testdomain.com" - }, - "isSqlServiceAccountGmsa": { - "$id": "2256", - "kind": "boolean", - "type": { - "$ref": "643" - }, - "value": false - }, - "ouPath": { - "$id": "2257", - "kind": "string", - "type": { - "$ref": "635" - }, - "value": "OU=WSCluster,DC=testdomain,DC=com" - }, - "sqlServiceAccount": { - "$id": "2258", - "kind": "string", - "type": { - "$ref": "641" - }, - "value": "sqlservice@testdomain.com" - }, - "storageAccountUrl": { - "$id": "2259", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "2260", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2261", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - }, - { - "$id": "2262", - "kind": "model", - "type": { - "$ref": "619" - }, - "value": { - "name": { - "$id": "2263", - "kind": "string", - "type": { - "$ref": "652" - }, - "value": "testvmgroup2" - }, - "type": { - "$id": "2264", - "kind": "string", - "type": { - "$ref": "280" - }, - "value": "Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups" - }, - "id": { - "$id": "2265", - "kind": "string", - "type": { - "$ref": "275" - }, - "value": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg2/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/" - }, - "location": { - "$id": "2266", - "kind": "string", - "type": { - "$ref": "377" - }, - "value": "northeurope" - }, - "properties": { - "$id": "2267", - "kind": "model", - "type": { - "$ref": "621" - }, - "value": { - "provisioningState": { - "$id": "2268", - "kind": "string", - "type": { - "$ref": "623" - }, - "value": "Succeeded" - }, - "sqlImageOffer": { - "$id": "2269", - "kind": "string", - "type": { - "$ref": "625" - }, - "value": "SQL2016-WS2016" - }, - "sqlImageSku": { - "$id": "2270", - "kind": "string", - "type": { - "$ref": "137" - }, - "value": "Enterprise" - }, - "wsfcDomainProfile": { - "$id": "2271", - "kind": "model", - "type": { - "$ref": "631" - }, - "value": { - "clusterBootstrapAccount": { - "$id": "2272", - "kind": "string", - "type": { - "$ref": "637" - }, - "value": "testrpadmin" - }, - "clusterOperatorAccount": { - "$id": "2273", - "kind": "string", - "type": { - "$ref": "639" - }, - "value": "testrp@testdomain.com" - }, - "clusterSubnetType": { - "$id": "2274", - "kind": "string", - "type": { - "$ref": "150" - }, - "value": "MultiSubnet" - }, - "domainFqdn": { - "$id": "2275", - "kind": "string", - "type": { - "$ref": "633" - }, - "value": "testdomain.com" - }, - "isSqlServiceAccountGmsa": { - "$id": "2276", - "kind": "boolean", - "type": { - "$ref": "643" - }, - "value": false - }, - "ouPath": { - "$id": "2277", - "kind": "string", - "type": { - "$ref": "635" - }, - "value": "OU=WSCluster,DC=testdomain,DC=com" - }, - "sqlServiceAccount": { - "$id": "2278", - "kind": "string", - "type": { - "$ref": "641" - }, - "value": "sqlservice@testdomain.com" - }, - "storageAccountUrl": { - "$id": "2279", - "kind": "string", - "type": { - "$ref": "647" - }, - "value": "https://storgact.blob.core.windows.net/" - } - } - } - } - }, - "tags": { - "$id": "2280", - "kind": "dict", - "type": { - "$ref": "373" - }, - "value": { - "mytag": { - "$id": "2281", - "kind": "string", - "type": { - "$ref": "375" - }, - "value": "myval" - } - } - } - } - } - ] - } - } - } - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "2282", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "219" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "657" - }, - "resultSegments": [ - "value" - ] - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.list", - "pagingMetadata": { - "itemPropertySegments": [ - "value" - ], - "nextLink": { - "responseSegments": [ - "nextLink" - ], - "responseLocation": "Body" - }, - "pageSizeParameterSegments": [] - } - } - ], - "parameters": [ - { - "$id": "2283", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "2284", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "2285", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.endpoint" - }, - { - "$id": "2286", - "kind": "method", - "name": "apiVersion", - "serializedName": "apiVersion", - "doc": "The API version to use for this operation.", - "type": { - "$id": "2287", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "", - "isApiVersion": true, - "defaultValue": { - "type": { - "$id": "2288", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.apiVersion", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2289", - "kind": "method", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "2290", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups.get.subscriptionId", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "initializedBy": 0, - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceOperations", - "arguments": {} - } - ], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachineGroups", - "apiVersions": [ - "2023-10-01" - ], - "parent": { - "$ref": "672" - }, - "isMultiServiceClient": false - }, - { - "$id": "2291", - "kind": "client", - "name": "SqlVirtualMachineTroubleshoot", - "namespace": "Azure.ResourceManager.SqlVirtualMachine", - "methods": [ - { - "$id": "2292", - "kind": "lro", - "name": "troubleshoot", - "accessibility": "public", - "apiVersions": [ - "2023-10-01" - ], - "doc": "Starts SQL virtual machine troubleshooting.", - "operation": { - "$id": "2293", - "name": "troubleshoot", - "resourceName": "SqlVirtualMachines", - "doc": "Starts SQL virtual machine troubleshooting.", - "accessibility": "public", - "parameters": [ - { - "$id": "2294", - "kind": "query", - "name": "apiVersion", - "serializedName": "api-version", - "doc": "The API version to use for this operation.", - "type": { - "$id": "2295", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": true, - "explode": false, - "defaultValue": { - "type": { - "$id": "2296", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Client", - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.apiVersion", - "readOnly": false - }, - { - "$id": "2297", - "kind": "path", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "2298", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Client", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.subscriptionId" - }, - { - "$id": "2299", - "kind": "path", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "2300", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.resourceGroupName" - }, - { - "$id": "2301", - "kind": "path", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "2302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "isApiVersion": false, - "explode": false, - "style": "simple", - "allowReserved": false, - "skipUrlEncoding": false, - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.sqlVirtualMachineName" - }, - { - "$id": "2303", - "kind": "header", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "221" - }, - "isApiVersion": false, - "optional": false, - "isContentType": true, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.contentType" - }, - { - "$id": "2304", - "kind": "header", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "223" - }, - "isApiVersion": false, - "optional": false, - "isContentType": false, - "scope": "Constant", - "readOnly": false, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.accept" - }, - { - "$id": "2305", - "kind": "body", - "name": "parameters", - "serializedName": "parameters", - "doc": "The SQL virtual machine troubleshooting entity.", - "type": { - "$ref": "661" - }, - "isApiVersion": false, - "contentTypes": [ - "application/json" - ], - "defaultContentType": "application/json", - "optional": false, - "scope": "Method", - "decorators": [], - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.body" - } - ], - "responses": [ - { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$id": "2306", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$id": "2307", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - } - } - ], - "isErrorResponse": false - }, - { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "661" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - } - ], - "httpMethod": "POST", - "uri": "{endpoint}", - "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/troubleshoot", - "requestMediaTypes": [ - "application/json" - ], - "bufferResponse": true, - "generateProtocolMethod": true, - "generateConvenienceMethod": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot", - "decorators": [ - { - "name": "Azure.ResourceManager.@armResourceAction", - "arguments": {} - } - ], - "examples": [ - { - "$id": "2308", - "kind": "http", - "name": "Start SQL virtual machine troubleshooting operation", - "description": "Start SQL virtual machine troubleshooting operation", - "filePath": "2023-10-01/TroubleshootSqlVirtualMachine.json", - "parameters": [ - { - "parameter": { - "$ref": "2294" - }, - "value": { - "$id": "2309", - "kind": "string", - "type": { - "$ref": "2295" - }, - "value": "2023-10-01" - } - }, - { - "parameter": { - "$ref": "2305" - }, - "value": { - "$id": "2310", - "kind": "model", - "type": { - "$ref": "661" - }, - "value": { - "endTimeUtc": { - "$id": "2311", - "kind": "string", - "type": { - "$ref": "666" - }, - "value": "2023-07-09T22:10:00Z" - }, - "properties": { - "$id": "2312", - "kind": "model", - "type": { - "$ref": "555" - }, - "value": { - "unhealthyReplicaInfo": { - "$id": "2313", - "kind": "model", - "type": { - "$ref": "557" - }, - "value": { - "availabilityGroupName": { - "$id": "2314", - "kind": "string", - "type": { - "$ref": "559" - }, - "value": "AG1" - } - } - } - } - }, - "startTimeUtc": { - "$id": "2315", - "kind": "string", - "type": { - "$ref": "663" - }, - "value": "2023-07-09T17:10:00Z" - }, - "troubleshootingScenario": { - "$id": "2316", - "kind": "string", - "type": { - "$ref": "105" - }, - "value": "UnhealthyReplica" - } - } - } - }, - { - "parameter": { - "$ref": "2299" - }, - "value": { - "$id": "2317", - "kind": "string", - "type": { - "$ref": "2300" - }, - "value": "testrg" - } - }, - { - "parameter": { - "$ref": "2301" - }, - "value": { - "$id": "2318", - "kind": "string", - "type": { - "$ref": "2302" - }, - "value": "testvm" - } - }, - { - "parameter": { - "$ref": "2297" - }, - "value": { - "$id": "2319", - "kind": "string", - "type": { - "$ref": "2298" - }, - "value": "00000000-1111-2222-3333-444444444444" - } - } - ], - "responses": [ - { - "response": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "661" - }, - "headers": [], - "isErrorResponse": false, - "contentTypes": [ - "application/json" - ] - }, - "statusCode": 200, - "bodyValue": { - "$id": "2320", - "kind": "model", - "type": { - "$ref": "661" - }, - "value": { - "endTimeUtc": { - "$id": "2321", - "kind": "string", - "type": { - "$ref": "666" - }, - "value": "2023-07-09T22:10:00Z" - }, - "properties": { - "$id": "2322", - "kind": "model", - "type": { - "$ref": "555" - }, - "value": { - "unhealthyReplicaInfo": { - "$id": "2323", - "kind": "model", - "type": { - "$ref": "557" - }, - "value": { - "availabilityGroupName": { - "$id": "2324", - "kind": "string", - "type": { - "$ref": "559" - }, - "value": "AG1" - } - } - } - } - }, - "startTimeUtc": { - "$id": "2325", - "kind": "string", - "type": { - "$ref": "663" - }, - "value": "2023-07-09T17:10:00Z" - }, - "troubleshootingScenario": { - "$id": "2326", - "kind": "string", - "type": { - "$ref": "105" - }, - "value": "UnhealthyReplica" - } - } - } - }, - { - "response": { - "statusCodes": [ - 202 - ], - "headers": [ - { - "name": "location", - "nameInResponse": "Location", - "doc": "The Location header contains the URL where the status of the long running operation can be checked.", - "type": { - "$ref": "2306" - } - }, - { - "name": "retryAfter", - "nameInResponse": "Retry-After", - "doc": "The Retry-After header can indicate how long the client should wait before polling the operation status.", - "type": { - "$ref": "2307" - } - } - ], - "isErrorResponse": false - }, - "statusCode": 202 - } - ] - } - ], - "namespace": "Azure.ResourceManager.SqlVirtualMachine" - }, - "parameters": [ - { - "$id": "2327", - "kind": "method", - "name": "resourceGroupName", - "serializedName": "resourceGroupName", - "doc": "The name of the resource group. The name is case insensitive.", - "type": { - "$id": "2328", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.resourceGroupName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2329", - "kind": "method", - "name": "sqlVirtualMachineName", - "serializedName": "sqlVirtualMachineName", - "doc": "Name of the SQL virtual machine.", - "type": { - "$id": "2330", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "Path", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.sqlVirtualMachineName", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2331", - "kind": "method", - "name": "parameters", - "serializedName": "parameters", - "doc": "The SQL virtual machine troubleshooting entity.", - "type": { - "$ref": "661" - }, - "location": "Body", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.body", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2332", - "kind": "method", - "name": "contentType", - "serializedName": "Content-Type", - "doc": "Body parameter's content type. Known values are application/json", - "type": { - "$ref": "225" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.contentType", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2333", - "kind": "method", - "name": "accept", - "serializedName": "Accept", - "type": { - "$ref": "227" - }, - "location": "Header", - "isApiVersion": false, - "optional": false, - "scope": "Constant", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.accept", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "response": { - "type": { - "$ref": "661" - } - }, - "isOverride": false, - "generateConvenient": true, - "generateProtocol": true, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot", - "lroMetadata": { - "finalStateVia": 1, - "finalResponse": { - "statusCodes": [ - 200 - ], - "bodyType": { - "$ref": "661" - } - } - } - } - ], - "parameters": [ - { - "$id": "2334", - "kind": "endpoint", - "name": "endpoint", - "serializedName": "endpoint", - "doc": "Service host", - "type": { - "$id": "2335", - "kind": "url", - "name": "endpoint", - "crossLanguageDefinitionId": "TypeSpec.url" - }, - "isApiVersion": false, - "optional": false, - "scope": "Client", - "isEndpoint": true, - "defaultValue": { - "type": { - "$id": "2336", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "https://management.azure.com" - }, - "serverUrlTemplate": "{endpoint}", - "skipUrlEncoding": false, - "readOnly": false, - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.endpoint" - }, - { - "$id": "2337", - "kind": "method", - "name": "apiVersion", - "serializedName": "apiVersion", - "doc": "The API version to use for this operation.", - "type": { - "$id": "2338", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "", - "isApiVersion": true, - "defaultValue": { - "type": { - "$id": "2339", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string" - }, - "value": "2023-10-01" - }, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.apiVersion", - "readOnly": false, - "access": "public", - "decorators": [] - }, - { - "$id": "2340", - "kind": "method", - "name": "subscriptionId", - "serializedName": "subscriptionId", - "doc": "The ID of the target subscription. The value must be an UUID.", - "type": { - "$id": "2341", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "location": "", - "isApiVersion": false, - "optional": false, - "scope": "Method", - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine.SqlVirtualMachines.troubleshoot.subscriptionId", - "readOnly": false, - "access": "public", - "decorators": [] - } - ], - "initializedBy": 0, - "decorators": [], - "crossLanguageDefinitionId": "Microsoft.SqlVirtualMachine", - "apiVersions": [ - "2023-10-01" - ], - "parent": { - "$ref": "672" - }, - "isMultiServiceClient": false - } - ], - "isMultiServiceClient": false - } - ], - "auth": { - "oAuth2": { - "flows": [ - { - "scopes": [ - "user_impersonation" - ], - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize" - } - ] - } - } -} From 5c317fdec34cf05cd3c65212fe43906ba4aed70e Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Fri, 30 Jan 2026 15:12:26 +0800 Subject: [PATCH 3/7] updated and regen --- ...sourceManager.SqlVirtualMachine.net10.0.cs | 74 ------- ...esourceManager.SqlVirtualMachine.net8.0.cs | 74 ------- ...anager.SqlVirtualMachine.netstandard2.0.cs | 74 ------- .../ArmSqlVirtualMachineModelFactory.cs | 24 --- ...perationsGetAllAsyncCollectionResultOfT.cs | 75 ------- .../OperationsGetAllCollectionResultOfT.cs | 74 ------- ...MockableSqlVirtualMachineTenantResource.cs | 97 --------- .../Extensions/SqlVirtualMachineExtensions.cs | 43 ---- ...ResourceManagerSqlVirtualMachineContext.cs | 4 - .../Generated/Models/Info.Serialization.cs | 197 ------------------ .../src/Generated/Models/Info.cs | 53 ----- .../OperationListResult.Serialization.cs | 174 ---------------- .../Generated/Models/OperationListResult.cs | 43 ---- .../Models/OperationProperty.Serialization.cs | 130 ------------ .../src/Generated/Models/OperationProperty.cs | 31 --- .../SqlVmOperationDisplay.Serialization.cs | 174 ---------------- .../Generated/Models/SqlVmOperationDisplay.cs | 51 ----- .../Generated/Models/SqlVmOperationOrigin.cs | 69 ------ .../OperationsRestOperations.cs | 70 ------- .../tsp-location.yaml | 2 +- 20 files changed, 1 insertion(+), 1532 deletions(-) delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllAsyncCollectionResultOfT.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllCollectionResultOfT.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineTenantResource.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.Serialization.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.Serialization.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationOrigin.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/OperationsRestOperations.cs diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs index 9ccb90795ca3..f577ce7d1e49 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs @@ -64,8 +64,6 @@ internal AzureResourceManagerSqlVirtualMachineContext() { } } public static partial class SqlVirtualMachineExtensions { - public static Azure.Pageable GetAll(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetAllAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSqlVm(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSqlVmAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -262,12 +260,6 @@ protected MockableSqlVirtualMachineSubscriptionResource() { } public virtual Azure.Pageable GetSqlVms(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSqlVmsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class MockableSqlVirtualMachineTenantResource : Azure.ResourceManager.ArmResource - { - protected MockableSqlVirtualMachineTenantResource() { } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } } namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -275,7 +267,6 @@ public static partial class ArmSqlVirtualMachineModelFactory { public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData AvailabilityGroupListenerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, string availabilityGroupName = null, System.Collections.Generic.IEnumerable loadBalancerConfigurations = null, System.Collections.Generic.IEnumerable multiSubnetIPConfigurations = null, bool? createDefaultAvailabilityGroupIfNotExist = default(bool?), int? port = default(int?), System.Collections.Generic.IEnumerable availabilityGroupReplicas = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration AvailabilityGroupListenerLoadBalancerConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress = null, Azure.Core.ResourceIdentifier publicIPAddressResourceId = null, Azure.Core.ResourceIdentifier loadBalancerResourceId = null, int? probePort = default(int?), System.Collections.Generic.IEnumerable sqlVmInstances = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.Info Info(string name = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay display = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? origin = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlStorageSettings(System.Collections.Generic.IEnumerable luns = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default(int?), int? dataGrowth = default(int?), int? logFileSize = default(int?), int? logGrowth = default(int?), int? dataFileCount = default(int?), bool? persistFolder = default(bool?), string persistFolderPath = null, System.Collections.Generic.IEnumerable logicalUnitNumbers = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings SqlVmAutoBackupSettings(bool? isEnabled = default(bool?), bool? isEncryptionEnabled = default(bool?), int? retentionPeriodInDays = default(int?), System.Uri storageAccountUri = null, string storageContainerName = null, string storageAccessKey = null, string password = null, bool? areSystemDbsIncludedInBackup = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? backupScheduleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? fullBackupFrequency = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency?), System.Collections.Generic.IEnumerable daysOfWeek = null, int? fullBackupStartHour = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?)) { throw null; } @@ -284,7 +275,6 @@ public static partial class ArmSqlVirtualMachineModelFactory public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null, string sqlVmGroupName = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch SqlVmGroupPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay SqlVmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch SqlVmPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting SqlVmTroubleshooting(System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null, string virtualMachineResourceId = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus SqlVmTroubleshootingStatus(string rootCause = null, System.DateTimeOffset? lastTriggerTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null) { throw null; } @@ -391,23 +381,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public override string ToString() { throw null; } } - public partial class Info : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal Info() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay Display { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? Origin { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LeastPrivilegeMode : System.IEquatable { @@ -440,19 +413,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class OperationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal OperationProperty() { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ReadableSecondaryMode : System.IEquatable { @@ -991,40 +951,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SqlVmOperationDisplay : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal SqlVmOperationDisplay() { } - public string Description { get { throw null; } } - public string Operation { get { throw null; } } - public string Provider { get { throw null; } } - public string Resource { get { throw null; } } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlVmOperationOrigin : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SqlVmOperationOrigin(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin System { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin User { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin (string value) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } - public override string ToString() { throw null; } - } public enum SqlVmOsType { Windows = 0, diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs index 9ccb90795ca3..f577ce7d1e49 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs @@ -64,8 +64,6 @@ internal AzureResourceManagerSqlVirtualMachineContext() { } } public static partial class SqlVirtualMachineExtensions { - public static Azure.Pageable GetAll(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetAllAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSqlVm(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSqlVmAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -262,12 +260,6 @@ protected MockableSqlVirtualMachineSubscriptionResource() { } public virtual Azure.Pageable GetSqlVms(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSqlVmsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class MockableSqlVirtualMachineTenantResource : Azure.ResourceManager.ArmResource - { - protected MockableSqlVirtualMachineTenantResource() { } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } } namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -275,7 +267,6 @@ public static partial class ArmSqlVirtualMachineModelFactory { public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData AvailabilityGroupListenerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, string availabilityGroupName = null, System.Collections.Generic.IEnumerable loadBalancerConfigurations = null, System.Collections.Generic.IEnumerable multiSubnetIPConfigurations = null, bool? createDefaultAvailabilityGroupIfNotExist = default(bool?), int? port = default(int?), System.Collections.Generic.IEnumerable availabilityGroupReplicas = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration AvailabilityGroupListenerLoadBalancerConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress = null, Azure.Core.ResourceIdentifier publicIPAddressResourceId = null, Azure.Core.ResourceIdentifier loadBalancerResourceId = null, int? probePort = default(int?), System.Collections.Generic.IEnumerable sqlVmInstances = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.Info Info(string name = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay display = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? origin = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlStorageSettings(System.Collections.Generic.IEnumerable luns = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default(int?), int? dataGrowth = default(int?), int? logFileSize = default(int?), int? logGrowth = default(int?), int? dataFileCount = default(int?), bool? persistFolder = default(bool?), string persistFolderPath = null, System.Collections.Generic.IEnumerable logicalUnitNumbers = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings SqlVmAutoBackupSettings(bool? isEnabled = default(bool?), bool? isEncryptionEnabled = default(bool?), int? retentionPeriodInDays = default(int?), System.Uri storageAccountUri = null, string storageContainerName = null, string storageAccessKey = null, string password = null, bool? areSystemDbsIncludedInBackup = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? backupScheduleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? fullBackupFrequency = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency?), System.Collections.Generic.IEnumerable daysOfWeek = null, int? fullBackupStartHour = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?)) { throw null; } @@ -284,7 +275,6 @@ public static partial class ArmSqlVirtualMachineModelFactory public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null, string sqlVmGroupName = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch SqlVmGroupPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay SqlVmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch SqlVmPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting SqlVmTroubleshooting(System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null, string virtualMachineResourceId = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus SqlVmTroubleshootingStatus(string rootCause = null, System.DateTimeOffset? lastTriggerTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null) { throw null; } @@ -391,23 +381,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public override string ToString() { throw null; } } - public partial class Info : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal Info() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay Display { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? Origin { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LeastPrivilegeMode : System.IEquatable { @@ -440,19 +413,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class OperationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal OperationProperty() { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ReadableSecondaryMode : System.IEquatable { @@ -991,40 +951,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SqlVmOperationDisplay : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal SqlVmOperationDisplay() { } - public string Description { get { throw null; } } - public string Operation { get { throw null; } } - public string Provider { get { throw null; } } - public string Resource { get { throw null; } } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlVmOperationOrigin : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SqlVmOperationOrigin(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin System { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin User { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin (string value) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } - public override string ToString() { throw null; } - } public enum SqlVmOsType { Windows = 0, diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs index 9ccb90795ca3..f577ce7d1e49 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs @@ -64,8 +64,6 @@ internal AzureResourceManagerSqlVirtualMachineContext() { } } public static partial class SqlVirtualMachineExtensions { - public static Azure.Pageable GetAll(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetAllAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSqlVm(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSqlVmAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -262,12 +260,6 @@ protected MockableSqlVirtualMachineSubscriptionResource() { } public virtual Azure.Pageable GetSqlVms(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSqlVmsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class MockableSqlVirtualMachineTenantResource : Azure.ResourceManager.ArmResource - { - protected MockableSqlVirtualMachineTenantResource() { } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } } namespace Azure.ResourceManager.SqlVirtualMachine.Models { @@ -275,7 +267,6 @@ public static partial class ArmSqlVirtualMachineModelFactory { public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerData AvailabilityGroupListenerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string provisioningState = null, string availabilityGroupName = null, System.Collections.Generic.IEnumerable loadBalancerConfigurations = null, System.Collections.Generic.IEnumerable multiSubnetIPConfigurations = null, bool? createDefaultAvailabilityGroupIfNotExist = default(bool?), int? port = default(int?), System.Collections.Generic.IEnumerable availabilityGroupReplicas = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerLoadBalancerConfiguration AvailabilityGroupListenerLoadBalancerConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress = null, Azure.Core.ResourceIdentifier publicIPAddressResourceId = null, Azure.Core.ResourceIdentifier loadBalancerResourceId = null, int? probePort = default(int?), System.Collections.Generic.IEnumerable sqlVmInstances = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.Info Info(string name = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay display = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? origin = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlStorageSettings(System.Collections.Generic.IEnumerable luns = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default(int?), int? dataGrowth = default(int?), int? logFileSize = default(int?), int? logGrowth = default(int?), int? dataFileCount = default(int?), bool? persistFolder = default(bool?), string persistFolderPath = null, System.Collections.Generic.IEnumerable logicalUnitNumbers = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings SqlVmAutoBackupSettings(bool? isEnabled = default(bool?), bool? isEncryptionEnabled = default(bool?), int? retentionPeriodInDays = default(int?), System.Uri storageAccountUri = null, string storageContainerName = null, string storageAccessKey = null, string password = null, bool? areSystemDbsIncludedInBackup = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? backupScheduleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? fullBackupFrequency = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency?), System.Collections.Generic.IEnumerable daysOfWeek = null, int? fullBackupStartHour = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?)) { throw null; } @@ -284,7 +275,6 @@ public static partial class ArmSqlVirtualMachineModelFactory public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null, string sqlVmGroupName = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch SqlVmGroupPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay SqlVmOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmPatch SqlVmPatch(System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshooting SqlVmTroubleshooting(System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null, string virtualMachineResourceId = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus SqlVmTroubleshootingStatus(string rootCause = null, System.DateTimeOffset? lastTriggerTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? startTimeUtc = default(System.DateTimeOffset?), System.DateTimeOffset? endTimeUtc = default(System.DateTimeOffset?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingScenario?), string troubleshootingAdditionalUnhealthyReplicaInfoAvailabilityGroupName = null) { throw null; } @@ -391,23 +381,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public override string ToString() { throw null; } } - public partial class Info : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal Info() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay Display { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? Origin { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.Info PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SqlVirtualMachine.Models.Info System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct LeastPrivilegeMode : System.IEquatable { @@ -440,19 +413,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class OperationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal OperationProperty() { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SqlVirtualMachine.Models.OperationProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ReadableSecondaryMode : System.IEquatable { @@ -991,40 +951,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class SqlVmOperationDisplay : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal SqlVmOperationDisplay() { } - public string Description { get { throw null; } } - public string Operation { get { throw null; } } - public string Provider { get { throw null; } } - public string Resource { get { throw null; } } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationDisplay System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlVmOperationOrigin : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SqlVmOperationOrigin(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin System { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin User { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin (string value) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin? (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOperationOrigin right) { throw null; } - public override string ToString() { throw null; } - } public enum SqlVmOsType { Windows = 0, diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs index a300054a3345..1c8dd1a4e55f 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs @@ -21,30 +21,6 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models public static partial class ArmSqlVirtualMachineModelFactory { - /// Result of the request to list SQL operations. - /// The name of the operation being performed on this particular object.". - /// he localized display information for this particular operation / action. - /// The intended executor of the operation.". - /// Additional descriptions for the operation. - /// A new instance for mocking. - public static Info Info(string name = default, SqlVmOperationDisplay display = default, SqlVmOperationOrigin? origin = default, IReadOnlyDictionary properties = default) - { - properties ??= new ChangeTrackingDictionary(); - - return new Info(name, display, origin, properties, additionalBinaryDataProperties: null); - } - - /// Display metadata associated with the operation. - /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. - /// A new instance for mocking. - public static SqlVmOperationDisplay SqlVmOperationDisplay(string provider = default, string resource = default, string operation = default, string description = default) - { - return new SqlVmOperationDisplay(provider, resource, operation, description, additionalBinaryDataProperties: null); - } - /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. /// The name of the resource. /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllAsyncCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllAsyncCollectionResultOfT.cs deleted file mode 100644 index 73610057e025..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllAsyncCollectionResultOfT.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.SqlVirtualMachine.Models; - -namespace Azure.ResourceManager.SqlVirtualMachine -{ - internal partial class OperationsGetAllAsyncCollectionResultOfT : AsyncPageable - { - private readonly Operations _client; - private readonly RequestContext _context; - - /// Initializes a new instance of OperationsGetAllAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. - /// The Operations client used to send requests. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public OperationsGetAllAsyncCollectionResultOfT(Operations client, RequestContext context) : base(context?.CancellationToken ?? default) - { - _client = client; - _context = context; - } - - /// Gets the pages of OperationsGetAllAsyncCollectionResultOfT as an enumerable collection. - /// A continuation token indicating where to resume paging. - /// The number of items per page. - /// The pages of OperationsGetAllAsyncCollectionResultOfT as an enumerable collection. - public override async IAsyncEnumerable> AsPages(string continuationToken, int? pageSizeHint) - { - Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; - while (true) - { - Response response = await GetNextResponseAsync(pageSizeHint, nextPage).ConfigureAwait(false); - if (response is null) - { - yield break; - } - OperationListResult result = OperationListResult.FromResponse(response); - yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); - nextPage = result.NextLink; - if (nextPage == null) - { - yield break; - } - } - } - - /// Get next page. - /// The number of items per page. - /// The next link to use for the next page of results. - private async ValueTask GetNextResponseAsync(int? pageSizeHint, Uri nextLink) - { - HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _context) : _client.CreateGetAllRequest(_context); - using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableSqlVirtualMachineTenantResource.GetAll"); - scope.Start(); - try - { - return await _client.Pipeline.ProcessMessageAsync(message, _context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllCollectionResultOfT.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllCollectionResultOfT.cs deleted file mode 100644 index 4af1aa279058..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/CollectionResults/OperationsGetAllCollectionResultOfT.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.SqlVirtualMachine.Models; - -namespace Azure.ResourceManager.SqlVirtualMachine -{ - internal partial class OperationsGetAllCollectionResultOfT : Pageable - { - private readonly Operations _client; - private readonly RequestContext _context; - - /// Initializes a new instance of OperationsGetAllCollectionResultOfT, which is used to iterate over the pages of a collection. - /// The Operations client used to send requests. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public OperationsGetAllCollectionResultOfT(Operations client, RequestContext context) : base(context?.CancellationToken ?? default) - { - _client = client; - _context = context; - } - - /// Gets the pages of OperationsGetAllCollectionResultOfT as an enumerable collection. - /// A continuation token indicating where to resume paging. - /// The number of items per page. - /// The pages of OperationsGetAllCollectionResultOfT as an enumerable collection. - public override IEnumerable> AsPages(string continuationToken, int? pageSizeHint) - { - Uri nextPage = continuationToken != null ? new Uri(continuationToken) : null; - while (true) - { - Response response = GetNextResponse(pageSizeHint, nextPage); - if (response is null) - { - yield break; - } - OperationListResult result = OperationListResult.FromResponse(response); - yield return Page.FromValues(result.Value, nextPage?.AbsoluteUri, response); - nextPage = result.NextLink; - if (nextPage == null) - { - yield break; - } - } - } - - /// Get next page. - /// The number of items per page. - /// The next link to use for the next page of results. - private Response GetNextResponse(int? pageSizeHint, Uri nextLink) - { - HttpMessage message = nextLink != null ? _client.CreateNextGetAllRequest(nextLink, _context) : _client.CreateGetAllRequest(_context); - using DiagnosticScope scope = _client.ClientDiagnostics.CreateScope("MockableSqlVirtualMachineTenantResource.GetAll"); - scope.Start(); - try - { - return _client.Pipeline.ProcessMessage(message, _context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineTenantResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineTenantResource.cs deleted file mode 100644 index 1c29a67bb5be..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineTenantResource.cs +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Threading; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.SqlVirtualMachine; -using Azure.ResourceManager.SqlVirtualMachine.Models; - -namespace Azure.ResourceManager.SqlVirtualMachine.Mocking -{ - /// A class to add extension methods to . - public partial class MockableSqlVirtualMachineTenantResource : ArmResource - { - private ClientDiagnostics _operationsClientDiagnostics; - private Operations _operationsRestClient; - - /// Initializes a new instance of MockableSqlVirtualMachineTenantResource for mocking. - protected MockableSqlVirtualMachineTenantResource() - { - } - - /// Initializes a new instance of class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal MockableSqlVirtualMachineTenantResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - } - - private ClientDiagnostics OperationsClientDiagnostics => _operationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine.Mocking", ProviderConstants.DefaultProviderNamespace, Diagnostics); - - private Operations OperationsRestClient => _operationsRestClient ??= new Operations(OperationsClientDiagnostics, Pipeline, Endpoint, "2023-10-01"); - - /// - /// Lists all of the available SQL Virtual Machine Rest API operations. - /// - /// - /// Request Path. - /// /providers/Microsoft.SqlVirtualMachine/operations. - /// - /// - /// Operation Id. - /// Operations_List. - /// - /// - /// Default Api Version. - /// 2023-10-01. - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) - { - RequestContext context = new RequestContext - { - CancellationToken = cancellationToken - }; - return new OperationsGetAllAsyncCollectionResultOfT(OperationsRestClient, context); - } - - /// - /// Lists all of the available SQL Virtual Machine Rest API operations. - /// - /// - /// Request Path. - /// /providers/Microsoft.SqlVirtualMachine/operations. - /// - /// - /// Operation Id. - /// Operations_List. - /// - /// - /// Default Api Version. - /// 2023-10-01. - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - RequestContext context = new RequestContext - { - CancellationToken = cancellationToken - }; - return new OperationsGetAllCollectionResultOfT(OperationsRestClient, context); - } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs index 867c34fded10..457985a1f61b 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs @@ -13,7 +13,6 @@ using Azure.ResourceManager; using Azure.ResourceManager.Resources; using Azure.ResourceManager.SqlVirtualMachine.Mocking; -using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { @@ -38,12 +37,6 @@ private static MockableSqlVirtualMachineSubscriptionResource GetMockableSqlVirtu return subscriptionResource.GetCachedClient(client => new MockableSqlVirtualMachineSubscriptionResource(client, subscriptionResource.Id)); } - /// - private static MockableSqlVirtualMachineTenantResource GetMockableSqlVirtualMachineTenantResource(TenantResource tenantResource) - { - return tenantResource.GetCachedClient(client => new MockableSqlVirtualMachineTenantResource(client, tenantResource.Id)); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// @@ -281,41 +274,5 @@ public static Pageable GetSqlVmGroups(this SubscriptionResou return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVmGroups(cancellationToken); } - - /// - /// Lists all of the available SQL Virtual Machine Rest API operations. - /// - /// Mocking. - /// To mock this method, please mock instead. - /// - /// - /// The the method will execute against. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetAllAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - - return GetMockableSqlVirtualMachineTenantResource(tenantResource).GetAllAsync(cancellationToken); - } - - /// - /// Lists all of the available SQL Virtual Machine Rest API operations. - /// - /// Mocking. - /// To mock this method, please mock instead. - /// - /// - /// The the method will execute against. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetAll(this TenantResource tenantResource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tenantResource, nameof(tenantResource)); - - return GetMockableSqlVirtualMachineTenantResource(tenantResource).GetAll(cancellationToken); - } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs index f8212b65471c..cb7a6372bd30 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AzureResourceManagerSqlVirtualMachineContext.cs @@ -26,11 +26,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine [ModelReaderWriterBuildable(typeof(AvailabilityGroupListenerProperties))] [ModelReaderWriterBuildable(typeof(AvailabilityGroupListenerResource))] [ModelReaderWriterBuildable(typeof(AvailabilityGroupReplica))] - [ModelReaderWriterBuildable(typeof(Info))] [ModelReaderWriterBuildable(typeof(ManagedServiceIdentity))] [ModelReaderWriterBuildable(typeof(MultiSubnetIPConfiguration))] - [ModelReaderWriterBuildable(typeof(OperationListResult))] - [ModelReaderWriterBuildable(typeof(OperationProperty))] [ModelReaderWriterBuildable(typeof(ResponseError))] [ModelReaderWriterBuildable(typeof(SqlConnectivityUpdateSettings))] [ModelReaderWriterBuildable(typeof(SqlInstanceSettings))] @@ -53,7 +50,6 @@ namespace Azure.ResourceManager.SqlVirtualMachine [ModelReaderWriterBuildable(typeof(SqlVmGroupResource))] [ModelReaderWriterBuildable(typeof(SqlVmIdentity))] [ModelReaderWriterBuildable(typeof(SqlVmKeyVaultCredentialSettings))] - [ModelReaderWriterBuildable(typeof(SqlVmOperationDisplay))] [ModelReaderWriterBuildable(typeof(SqlVmPatch))] [ModelReaderWriterBuildable(typeof(SqlVmResource))] [ModelReaderWriterBuildable(typeof(SqlVmStorageConfigurationSettings))] diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs deleted file mode 100644 index 875478d330c5..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.ResourceManager.SqlVirtualMachine; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Result of the request to list SQL operations. - public partial class Info : IJsonModel - { - /// The JSON writer. - /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(Info)} does not support writing '{format}' format."); - } - if (options.Format != "W" && Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (options.Format != "W" && Optional.IsDefined(Display)) - { - writer.WritePropertyName("display"u8); - writer.WriteObjectValue(Display, options); - } - if (options.Format != "W" && Optional.IsDefined(Origin)) - { - writer.WritePropertyName("origin"u8); - writer.WriteStringValue(Origin.Value.ToString()); - } - if (options.Format != "W" && Optional.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && _additionalBinaryDataProperties != null) - { - foreach (var item in _additionalBinaryDataProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - /// The JSON reader. - /// The client options for reading and writing models. - Info IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual Info JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(Info)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInfo(document.RootElement, options); - } - - /// The JSON element to deserialize. - /// The client options for reading and writing models. - internal static Info DeserializeInfo(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - SqlVmOperationDisplay display = default; - SqlVmOperationOrigin? origin = default; - IReadOnlyDictionary properties = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("name"u8)) - { - name = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("display"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - display = SqlVmOperationDisplay.DeserializeSqlVmOperationDisplay(prop.Value, options); - continue; - } - if (prop.NameEquals("origin"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - origin = new SqlVmOperationOrigin(prop.Value.GetString()); - continue; - } - if (prop.NameEquals("properties"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var prop0 in prop.Value.EnumerateObject()) - { - dictionary.Add(prop0.Name, OperationProperty.DeserializeOperationProperty(prop0.Value, options)); - } - properties = dictionary; - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new Info(name, display, origin, properties ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); - } - - /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - /// The client options for reading and writing models. - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); - default: - throw new FormatException($"The model {nameof(Info)} does not support writing '{options.Format}' format."); - } - } - - /// The data to parse. - /// The client options for reading and writing models. - Info IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual Info PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) - { - return DeserializeInfo(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(Info)} does not support reading '{options.Format}' format."); - } - } - - /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs deleted file mode 100644 index 6975873c848e..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.ResourceManager.SqlVirtualMachine; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Result of the request to list SQL operations. - public partial class Info - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - internal Info() - { - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The name of the operation being performed on this particular object.". - /// he localized display information for this particular operation / action. - /// The intended executor of the operation.". - /// Additional descriptions for the operation. - /// Keeps track of any properties unknown to the library. - internal Info(string name, SqlVmOperationDisplay display, SqlVmOperationOrigin? origin, IReadOnlyDictionary properties, IDictionary additionalBinaryDataProperties) - { - Name = name; - Display = display; - Origin = origin; - Properties = properties; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// The name of the operation being performed on this particular object.". - public string Name { get; } - - /// he localized display information for this particular operation / action. - public SqlVmOperationDisplay Display { get; } - - /// The intended executor of the operation.". - public SqlVmOperationOrigin? Origin { get; } - - /// Additional descriptions for the operation. - public IReadOnlyDictionary Properties { get; } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs deleted file mode 100644 index 2fcaeb9055cd..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure; -using Azure.ResourceManager.SqlVirtualMachine; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Virtual machine resource id for response. - internal partial class OperationListResult : IJsonModel - { - /// The JSON writer. - /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{format}' format."); - } - if (options.Format != "W") - { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (Info item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && Optional.IsDefined(NextLink)) - { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink.AbsoluteUri); - } - if (options.Format != "W" && _additionalBinaryDataProperties != null) - { - foreach (var item in _additionalBinaryDataProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - /// The JSON reader. - /// The client options for reading and writing models. - OperationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual OperationListResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(OperationListResult)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOperationListResult(document.RootElement, options); - } - - /// The JSON element to deserialize. - /// The client options for reading and writing models. - internal static OperationListResult DeserializeOperationListResult(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList value = default; - Uri nextLink = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("value"u8)) - { - List array = new List(); - foreach (var item in prop.Value.EnumerateArray()) - { - array.Add(Info.DeserializeInfo(item, options)); - } - value = array; - continue; - } - if (prop.NameEquals("nextLink"u8)) - { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - nextLink = string.IsNullOrEmpty(prop.Value.GetString()) ? null : new Uri(prop.Value.GetString()); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new OperationListResult(value, nextLink, additionalBinaryDataProperties); - } - - /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - /// The client options for reading and writing models. - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); - default: - throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{options.Format}' format."); - } - } - - /// The data to parse. - /// The client options for reading and writing models. - OperationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual OperationListResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) - { - return DeserializeOperationListResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OperationListResult)} does not support reading '{options.Format}' format."); - } - } - - /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// The to deserialize the from. - internal static OperationListResult FromResponse(Response response) - { - using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOperationListResult(document.RootElement, ModelSerializationExtensions.WireOptions); - } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.cs deleted file mode 100644 index c17d4cbad3a3..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.ResourceManager.SqlVirtualMachine; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Virtual machine resource id for response. - internal partial class OperationListResult - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - internal OperationListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The Operation items on this page. - /// The link to the next page of items. - /// Keeps track of any properties unknown to the library. - internal OperationListResult(IReadOnlyList value, Uri nextLink, IDictionary additionalBinaryDataProperties) - { - Value = value; - NextLink = nextLink; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// The Operation items on this page. - public IReadOnlyList Value { get; } - - /// The link to the next page of items. - public Uri NextLink { get; } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.Serialization.cs deleted file mode 100644 index 8a765ace29de..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.Serialization.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.ResourceManager.SqlVirtualMachine; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// The OperationProperty. - public partial class OperationProperty : IJsonModel - { - /// The JSON writer. - /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(OperationProperty)} does not support writing '{format}' format."); - } - if (options.Format != "W" && _additionalBinaryDataProperties != null) - { - foreach (var item in _additionalBinaryDataProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - /// The JSON reader. - /// The client options for reading and writing models. - OperationProperty IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual OperationProperty JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(OperationProperty)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOperationProperty(document.RootElement, options); - } - - /// The JSON element to deserialize. - /// The client options for reading and writing models. - internal static OperationProperty DeserializeOperationProperty(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new OperationProperty(additionalBinaryDataProperties); - } - - /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - /// The client options for reading and writing models. - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); - default: - throw new FormatException($"The model {nameof(OperationProperty)} does not support writing '{options.Format}' format."); - } - } - - /// The data to parse. - /// The client options for reading and writing models. - OperationProperty IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual OperationProperty PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) - { - return DeserializeOperationProperty(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OperationProperty)} does not support reading '{options.Format}' format."); - } - } - - /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.cs deleted file mode 100644 index 2f4e747c42f6..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// The OperationProperty. - public partial class OperationProperty - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - internal OperationProperty() - { - } - - /// Initializes a new instance of . - /// Keeps track of any properties unknown to the library. - internal OperationProperty(IDictionary additionalBinaryDataProperties) - { - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.Serialization.cs deleted file mode 100644 index 192443ba07f5..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.Serialization.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.ResourceManager.SqlVirtualMachine; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Display metadata associated with the operation. - public partial class SqlVmOperationDisplay : IJsonModel - { - /// The JSON writer. - /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SqlVmOperationDisplay)} does not support writing '{format}' format."); - } - if (options.Format != "W" && Optional.IsDefined(Provider)) - { - writer.WritePropertyName("provider"u8); - writer.WriteStringValue(Provider); - } - if (options.Format != "W" && Optional.IsDefined(Resource)) - { - writer.WritePropertyName("resource"u8); - writer.WriteStringValue(Resource); - } - if (options.Format != "W" && Optional.IsDefined(Operation)) - { - writer.WritePropertyName("operation"u8); - writer.WriteStringValue(Operation); - } - if (options.Format != "W" && Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && _additionalBinaryDataProperties != null) - { - foreach (var item in _additionalBinaryDataProperties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - /// The JSON reader. - /// The client options for reading and writing models. - SqlVmOperationDisplay IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); - - /// The JSON reader. - /// The client options for reading and writing models. - protected virtual SqlVmOperationDisplay JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SqlVmOperationDisplay)} does not support reading '{format}' format."); - } - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmOperationDisplay(document.RootElement, options); - } - - /// The JSON element to deserialize. - /// The client options for reading and writing models. - internal static SqlVmOperationDisplay DeserializeSqlVmOperationDisplay(JsonElement element, ModelReaderWriterOptions options) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string provider = default; - string resource = default; - string operation = default; - string description = default; - IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - foreach (var prop in element.EnumerateObject()) - { - if (prop.NameEquals("provider"u8)) - { - provider = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("resource"u8)) - { - resource = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("operation"u8)) - { - operation = prop.Value.GetString(); - continue; - } - if (prop.NameEquals("description"u8)) - { - description = prop.Value.GetString(); - continue; - } - if (options.Format != "W") - { - additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); - } - } - return new SqlVmOperationDisplay(provider, resource, operation, description, additionalBinaryDataProperties); - } - - /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); - - /// The client options for reading and writing models. - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerSqlVirtualMachineContext.Default); - default: - throw new FormatException($"The model {nameof(SqlVmOperationDisplay)} does not support writing '{options.Format}' format."); - } - } - - /// The data to parse. - /// The client options for reading and writing models. - SqlVmOperationDisplay IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); - - /// The data to parse. - /// The client options for reading and writing models. - protected virtual SqlVmOperationDisplay PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) - { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - switch (format) - { - case "J": - using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) - { - return DeserializeSqlVmOperationDisplay(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SqlVmOperationDisplay)} does not support reading '{options.Format}' format."); - } - } - - /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.cs deleted file mode 100644 index 6e7757200adf..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationDisplay.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Display metadata associated with the operation. - public partial class SqlVmOperationDisplay - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - internal SqlVmOperationDisplay() - { - } - - /// Initializes a new instance of . - /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. - /// Keeps track of any properties unknown to the library. - internal SqlVmOperationDisplay(string provider, string resource, string operation, string description, IDictionary additionalBinaryDataProperties) - { - Provider = provider; - Resource = resource; - Operation = operation; - Description = description; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". - public string Provider { get; } - - /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". - public string Resource { get; } - - /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". - public string Operation { get; } - - /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. - public string Description { get; } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationOrigin.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationOrigin.cs deleted file mode 100644 index 31e98b870727..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmOperationOrigin.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using Azure.ResourceManager.SqlVirtualMachine; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// The intended executor of the operation. - public readonly partial struct SqlVmOperationOrigin : IEquatable - { - private readonly string _value; - private const string UserValue = "user"; - private const string SystemValue = "system"; - - /// Initializes a new instance of . - /// The value. - /// is null. - public SqlVmOperationOrigin(string value) - { - Argument.AssertNotNull(value, nameof(value)); - - _value = value; - } - - /// Gets the User. - public static SqlVmOperationOrigin User { get; } = new SqlVmOperationOrigin(UserValue); - - /// Gets the System. - public static SqlVmOperationOrigin System { get; } = new SqlVmOperationOrigin(SystemValue); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(SqlVmOperationOrigin left, SqlVmOperationOrigin right) => left.Equals(right); - - /// Determines if two values are not the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator !=(SqlVmOperationOrigin left, SqlVmOperationOrigin right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator SqlVmOperationOrigin(string value) => new SqlVmOperationOrigin(value); - - /// Converts a string to a . - /// The value. - public static implicit operator SqlVmOperationOrigin?(string value) => value == null ? null : new SqlVmOperationOrigin(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SqlVmOperationOrigin other && Equals(other); - - /// - public bool Equals(SqlVmOperationOrigin other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - - /// - public override string ToString() => _value; - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/OperationsRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/OperationsRestOperations.cs deleted file mode 100644 index 1d7ff9cf5f4a..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/OperationsRestOperations.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.SqlVirtualMachine -{ - internal partial class Operations - { - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of Operations for mocking. - protected Operations() - { - } - - /// Initializes a new instance of Operations. - /// The ClientDiagnostics is used to provide tracing support for the client library. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// Service endpoint. - /// - internal Operations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string apiVersion) - { - ClientDiagnostics = clientDiagnostics; - _endpoint = endpoint; - Pipeline = pipeline; - _apiVersion = apiVersion; - } - - /// The HTTP pipeline for sending and receiving REST requests and responses. - public virtual HttpPipeline Pipeline { get; } - - /// The ClientDiagnostics is used to provide tracing support for the client library. - internal ClientDiagnostics ClientDiagnostics { get; } - - internal HttpMessage CreateGetAllRequest(RequestContext context) - { - RawRequestUriBuilder uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/operations", false); - uri.AppendQuery("api-version", _apiVersion, true); - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Uri = uri; - request.Method = RequestMethod.Get; - request.Headers.SetValue("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateNextGetAllRequest(Uri nextPage, RequestContext context) - { - RawRequestUriBuilder uri = new RawRequestUriBuilder(); - uri.Reset(nextPage); - HttpMessage message = Pipeline.CreateMessage(); - Request request = message.Request; - request.Uri = uri; - request.Method = RequestMethod.Get; - request.Headers.SetValue("Accept", "application/json"); - return message; - } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml index 0c1c0682ad5c..f087c64e1d70 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/SqlVirtualMachine -commit: 246fd84cacd497050166bc43d751b3b84a193539 +commit: 377a7cf47fc4879b0ed68be5442de854278ff247 repo: Azure/azure-rest-api-specs emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json" From 1de476bbfb3f4ed719363e9e387cbe4d1c3463a2 Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Fri, 30 Jan 2026 15:36:48 +0800 Subject: [PATCH 4/7] add cspell file --- .../Azure.ResourceManager.SqlVirtualMachine/cspell.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/cspell.yaml diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/cspell.yaml b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/cspell.yaml new file mode 100644 index 000000000000..638522513271 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/cspell.yaml @@ -0,0 +1,6 @@ +import: + - ../../.vscode/cspell.json +overrides: + - filename: '**/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/*.cs' + words: + - WUMU From 409299a7fbf78c1c3c3c6deb2ff41d7687f79e96 Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Fri, 30 Jan 2026 15:40:48 +0800 Subject: [PATCH 5/7] updated --- .../{Azure.ResourceManager.SqlVirtualMachine => }/cspell.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sdk/sqlvirtualmachine/{Azure.ResourceManager.SqlVirtualMachine => }/cspell.yaml (100%) diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/cspell.yaml b/sdk/sqlvirtualmachine/cspell.yaml similarity index 100% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/cspell.yaml rename to sdk/sqlvirtualmachine/cspell.yaml From 645b64a5893b1d006e367ba07d697882931cd8bd Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Mon, 2 Feb 2026 11:33:58 +0800 Subject: [PATCH 6/7] rename and regen --- ...sourceManager.SqlVirtualMachine.net10.0.cs | 38 +++++++++---------- ...esourceManager.SqlVirtualMachine.net8.0.cs | 38 +++++++++---------- ...anager.SqlVirtualMachine.netstandard2.0.cs | 38 +++++++++---------- .../ArmSqlVirtualMachineModelFactory.cs | 2 +- ...lVirtualMachineProperties.Serialization.cs | 4 +- .../Models/SqlVirtualMachineProperties.cs | 4 +- ...legeMode.cs => SqlVmLeastPrivilegeMode.cs} | 30 +++++++-------- .../src/Generated/SqlVmData.cs | 2 +- 8 files changed, 78 insertions(+), 78 deletions(-) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{LeastPrivilegeMode.cs => SqlVmLeastPrivilegeMode.cs} (50%) diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs index f577ce7d1e49..e5b3e26c62e9 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net10.0.cs @@ -105,7 +105,7 @@ public SqlVmData(Azure.Core.AzureLocation location) { } public bool? EnableAutomaticUpgrade { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings KeyVaultCredentialSettings { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? OsType { get { throw null; } } public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get { throw null; } set { } } @@ -270,7 +270,7 @@ public static partial class ArmSqlVirtualMachineModelFactory public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlStorageSettings(System.Collections.Generic.IEnumerable luns = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default(int?), int? dataGrowth = default(int?), int? logFileSize = default(int?), int? logGrowth = default(int?), int? dataFileCount = default(int?), bool? persistFolder = default(bool?), string persistFolderPath = null, System.Collections.Generic.IEnumerable logicalUnitNumbers = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings SqlVmAutoBackupSettings(bool? isEnabled = default(bool?), bool? isEncryptionEnabled = default(bool?), int? retentionPeriodInDays = default(int?), System.Uri storageAccountUri = null, string storageContainerName = null, string storageAccessKey = null, string password = null, bool? areSystemDbsIncludedInBackup = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? backupScheduleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? fullBackupFrequency = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency?), System.Collections.Generic.IEnumerable daysOfWeek = null, int? fullBackupStartHour = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?)) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? leastPrivilegeMode = default(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType?), string sqlVmName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode? leastPrivilegeMode = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType?), string sqlVmName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.Core.ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku, Azure.Core.ResourceIdentifier sqlVmGroupResourceId, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, System.Net.IPAddress windowsServerFailoverClusterStaticIP, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null, string sqlVmGroupName = null) { throw null; } @@ -381,23 +381,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LeastPrivilegeMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public LeastPrivilegeMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode Enabled { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode NotSet { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode (string value) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } - public override string ToString() { throw null; } - } public partial class MultiSubnetIPConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MultiSubnetIPConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress, string sqlVmInstance) { } @@ -951,6 +934,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmLeastPrivilegeMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmLeastPrivilegeMode(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode Enabled { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode right) { throw null; } + public override string ToString() { throw null; } + } public enum SqlVmOsType { Windows = 0, diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs index f577ce7d1e49..e5b3e26c62e9 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.net8.0.cs @@ -105,7 +105,7 @@ public SqlVmData(Azure.Core.AzureLocation location) { } public bool? EnableAutomaticUpgrade { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings KeyVaultCredentialSettings { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? OsType { get { throw null; } } public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get { throw null; } set { } } @@ -270,7 +270,7 @@ public static partial class ArmSqlVirtualMachineModelFactory public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlStorageSettings(System.Collections.Generic.IEnumerable luns = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default(int?), int? dataGrowth = default(int?), int? logFileSize = default(int?), int? logGrowth = default(int?), int? dataFileCount = default(int?), bool? persistFolder = default(bool?), string persistFolderPath = null, System.Collections.Generic.IEnumerable logicalUnitNumbers = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings SqlVmAutoBackupSettings(bool? isEnabled = default(bool?), bool? isEncryptionEnabled = default(bool?), int? retentionPeriodInDays = default(int?), System.Uri storageAccountUri = null, string storageContainerName = null, string storageAccessKey = null, string password = null, bool? areSystemDbsIncludedInBackup = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? backupScheduleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? fullBackupFrequency = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency?), System.Collections.Generic.IEnumerable daysOfWeek = null, int? fullBackupStartHour = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?)) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? leastPrivilegeMode = default(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType?), string sqlVmName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode? leastPrivilegeMode = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType?), string sqlVmName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.Core.ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku, Azure.Core.ResourceIdentifier sqlVmGroupResourceId, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, System.Net.IPAddress windowsServerFailoverClusterStaticIP, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null, string sqlVmGroupName = null) { throw null; } @@ -381,23 +381,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LeastPrivilegeMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public LeastPrivilegeMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode Enabled { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode NotSet { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode (string value) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } - public override string ToString() { throw null; } - } public partial class MultiSubnetIPConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MultiSubnetIPConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress, string sqlVmInstance) { } @@ -951,6 +934,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmLeastPrivilegeMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmLeastPrivilegeMode(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode Enabled { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode right) { throw null; } + public override string ToString() { throw null; } + } public enum SqlVmOsType { Windows = 0, diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs index f577ce7d1e49..e5b3e26c62e9 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/api/Azure.ResourceManager.SqlVirtualMachine.netstandard2.0.cs @@ -105,7 +105,7 @@ public SqlVmData(Azure.Core.AzureLocation location) { } public bool? EnableAutomaticUpgrade { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings KeyVaultCredentialSettings { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? OsType { get { throw null; } } public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get { throw null; } set { } } @@ -270,7 +270,7 @@ public static partial class ArmSqlVirtualMachineModelFactory public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlStorageSettings SqlStorageSettings(System.Collections.Generic.IEnumerable luns = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlTempDBSettings SqlTempDBSettings(int? dataFileSize = default(int?), int? dataGrowth = default(int?), int? logFileSize = default(int?), int? logGrowth = default(int?), int? dataFileCount = default(int?), bool? persistFolder = default(bool?), string persistFolderPath = null, System.Collections.Generic.IEnumerable logicalUnitNumbers = null, string defaultFilePath = null, bool? useStoragePool = default(bool?)) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings SqlVmAutoBackupSettings(bool? isEnabled = default(bool?), bool? isEncryptionEnabled = default(bool?), int? retentionPeriodInDays = default(int?), System.Uri storageAccountUri = null, string storageContainerName = null, string storageAccessKey = null, string password = null, bool? areSystemDbsIncludedInBackup = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? backupScheduleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? fullBackupFrequency = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency?), System.Collections.Generic.IEnumerable daysOfWeek = null, int? fullBackupStartHour = default(int?), int? fullBackupWindowHours = default(int?), int? logBackupFrequency = default(int?)) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? leastPrivilegeMode = default(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType?), string sqlVmName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.Core.ResourceIdentifier virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode? leastPrivilegeMode = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku?), Azure.Core.ResourceIdentifier sqlVmGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = null, System.Net.IPAddress windowsServerFailoverClusterStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmTroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAdditionalOsPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmOsType?), string sqlVmName = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmData SqlVmData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.Core.ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType? sqlServerLicenseType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode? sqlManagement, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? sqlImageSku, Azure.Core.ResourceIdentifier sqlVmGroupResourceId, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, System.Net.IPAddress windowsServerFailoverClusterStaticIP, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoPatchingSettings autoPatchingSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupSettings autoBackupSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings storageConfigurationSettings, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentSettings assessmentSettings) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, string provisioningState, string sqlImageOffer, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration, Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile) { throw null; } public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData SqlVmGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string provisioningState = null, string sqlImageOffer = null, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? sqlImageSku = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = null, string sqlVmGroupName = null) { throw null; } @@ -381,23 +381,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LeastPrivilegeMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public LeastPrivilegeMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode Enabled { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode NotSet { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode (string value) { throw null; } - public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } - public override string ToString() { throw null; } - } public partial class MultiSubnetIPConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MultiSubnetIPConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress privateIPAddress, string sqlVmInstance) { } @@ -951,6 +934,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlVmLeastPrivilegeMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlVmLeastPrivilegeMode(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode Enabled { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode (string value) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode? (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmLeastPrivilegeMode right) { throw null; } + public override string ToString() { throw null; } + } public enum SqlVmOsType { Windows = 0, diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs index 1c8dd1a4e55f..587c690c5955 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs @@ -102,7 +102,7 @@ public static AvailabilityGroupListenerLoadBalancerConfiguration AvailabilityGro /// Name of the SQL virtual machine. /// DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server. /// A new instance for mocking. - public static SqlVmData SqlVmData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, ResourceIdentifier virtualMachineResourceId = default, string provisioningState = default, string sqlImageOffer = default, SqlServerLicenseType? sqlServerLicenseType = default, SqlManagementMode? sqlManagement = default, LeastPrivilegeMode? leastPrivilegeMode = default, SqlImageSku? sqlImageSku = default, ResourceIdentifier sqlVmGroupResourceId = default, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = default, IPAddress windowsServerFailoverClusterStaticIP = default, SqlVmAutoPatchingSettings autoPatchingSettings = default, SqlVmAutoBackupSettings autoBackupSettings = default, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = default, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default, SqlVmStorageConfigurationSettings storageConfigurationSettings = default, SqlVmTroubleshootingStatus troubleshootingStatus = default, SqlVmAssessmentSettings assessmentSettings = default, bool? enableAutomaticUpgrade = default, SqlVmAdditionalOsPatch? additionalVmPatch = default, SqlVmIdentity virtualMachineIdentitySettings = default, SqlVmOsType? osType = default, string sqlVmName = default, ManagedServiceIdentity identity = default) + public static SqlVmData SqlVmData(ResourceIdentifier id = default, string name = default, ResourceType resourceType = default, SystemData systemData = default, IDictionary tags = default, AzureLocation location = default, ResourceIdentifier virtualMachineResourceId = default, string provisioningState = default, string sqlImageOffer = default, SqlServerLicenseType? sqlServerLicenseType = default, SqlManagementMode? sqlManagement = default, SqlVmLeastPrivilegeMode? leastPrivilegeMode = default, SqlImageSku? sqlImageSku = default, ResourceIdentifier sqlVmGroupResourceId = default, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = default, IPAddress windowsServerFailoverClusterStaticIP = default, SqlVmAutoPatchingSettings autoPatchingSettings = default, SqlVmAutoBackupSettings autoBackupSettings = default, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings = default, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default, SqlVmStorageConfigurationSettings storageConfigurationSettings = default, SqlVmTroubleshootingStatus troubleshootingStatus = default, SqlVmAssessmentSettings assessmentSettings = default, bool? enableAutomaticUpgrade = default, SqlVmAdditionalOsPatch? additionalVmPatch = default, SqlVmIdentity virtualMachineIdentitySettings = default, SqlVmOsType? osType = default, string sqlVmName = default, ManagedServiceIdentity identity = default) { tags ??= new ChangeTrackingDictionary(); diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs index b67d71f06753..6b291d573d3e 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.Serialization.cs @@ -188,7 +188,7 @@ internal static SqlVirtualMachineProperties DeserializeSqlVirtualMachineProperti string sqlImageOffer = default; SqlServerLicenseType? sqlServerLicenseType = default; SqlManagementMode? sqlManagement = default; - LeastPrivilegeMode? leastPrivilegeMode = default; + SqlVmLeastPrivilegeMode? leastPrivilegeMode = default; SqlImageSku? sqlImageSku = default; ResourceIdentifier sqlVmGroupResourceId = default; WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials = default; @@ -250,7 +250,7 @@ internal static SqlVirtualMachineProperties DeserializeSqlVirtualMachineProperti { continue; } - leastPrivilegeMode = new LeastPrivilegeMode(prop.Value.GetString()); + leastPrivilegeMode = new SqlVmLeastPrivilegeMode(prop.Value.GetString()); continue; } if (prop.NameEquals("sqlImageSku"u8)) diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs index 222fc38c6b69..28e0edb61aa6 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineProperties.cs @@ -46,7 +46,7 @@ public SqlVirtualMachineProperties() /// Virtual Machine Identity details used for Sql IaaS extension configurations. /// Operating System of the current SQL Virtual Machine. /// Keeps track of any properties unknown to the library. - internal SqlVirtualMachineProperties(ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, SqlServerLicenseType? sqlServerLicenseType, SqlManagementMode? sqlManagement, LeastPrivilegeMode? leastPrivilegeMode, SqlImageSku? sqlImageSku, ResourceIdentifier sqlVmGroupResourceId, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, IPAddress windowsServerFailoverClusterStaticIP, SqlVmAutoPatchingSettings autoPatchingSettings, SqlVmAutoBackupSettings autoBackupSettings, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, SqlVmStorageConfigurationSettings storageConfigurationSettings, SqlVmTroubleshootingStatus troubleshootingStatus, SqlVmAssessmentSettings assessmentSettings, bool? enableAutomaticUpgrade, SqlVmAdditionalOsPatch? additionalVmPatch, SqlVmIdentity virtualMachineIdentitySettings, SqlVmOsType? osType, IDictionary additionalBinaryDataProperties) + internal SqlVirtualMachineProperties(ResourceIdentifier virtualMachineResourceId, string provisioningState, string sqlImageOffer, SqlServerLicenseType? sqlServerLicenseType, SqlManagementMode? sqlManagement, SqlVmLeastPrivilegeMode? leastPrivilegeMode, SqlImageSku? sqlImageSku, ResourceIdentifier sqlVmGroupResourceId, WindowsServerFailoverClusterDomainCredentials windowsServerFailoverClusterDomainCredentials, IPAddress windowsServerFailoverClusterStaticIP, SqlVmAutoPatchingSettings autoPatchingSettings, SqlVmAutoBackupSettings autoBackupSettings, SqlVmKeyVaultCredentialSettings keyVaultCredentialSettings, SqlServerConfigurationsManagementSettings serverConfigurationsManagementSettings, SqlVmStorageConfigurationSettings storageConfigurationSettings, SqlVmTroubleshootingStatus troubleshootingStatus, SqlVmAssessmentSettings assessmentSettings, bool? enableAutomaticUpgrade, SqlVmAdditionalOsPatch? additionalVmPatch, SqlVmIdentity virtualMachineIdentitySettings, SqlVmOsType? osType, IDictionary additionalBinaryDataProperties) { VirtualMachineResourceId = virtualMachineResourceId; ProvisioningState = provisioningState; @@ -88,7 +88,7 @@ internal SqlVirtualMachineProperties(ResourceIdentifier virtualMachineResourceId public SqlManagementMode? SqlManagement { get; set; } /// SQL IaaS Agent least privilege mode. - public LeastPrivilegeMode? LeastPrivilegeMode { get; set; } + public SqlVmLeastPrivilegeMode? LeastPrivilegeMode { get; set; } /// SQL Server edition type. public SqlImageSku? SqlImageSku { get; set; } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LeastPrivilegeMode.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmLeastPrivilegeMode.cs similarity index 50% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LeastPrivilegeMode.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmLeastPrivilegeMode.cs index 4f6a48366eb1..00be69abee33 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LeastPrivilegeMode.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmLeastPrivilegeMode.cs @@ -12,16 +12,16 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// SQL IaaS Agent least privilege mode. - public readonly partial struct LeastPrivilegeMode : IEquatable + public readonly partial struct SqlVmLeastPrivilegeMode : IEquatable { private readonly string _value; private const string EnabledValue = "Enabled"; private const string NotSetValue = "NotSet"; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The value. /// is null. - public LeastPrivilegeMode(string value) + public SqlVmLeastPrivilegeMode(string value) { Argument.AssertNotNull(value, nameof(value)); @@ -29,35 +29,35 @@ public LeastPrivilegeMode(string value) } /// Gets the Enabled. - public static LeastPrivilegeMode Enabled { get; } = new LeastPrivilegeMode(EnabledValue); + public static SqlVmLeastPrivilegeMode Enabled { get; } = new SqlVmLeastPrivilegeMode(EnabledValue); /// Gets the NotSet. - public static LeastPrivilegeMode NotSet { get; } = new LeastPrivilegeMode(NotSetValue); + public static SqlVmLeastPrivilegeMode NotSet { get; } = new SqlVmLeastPrivilegeMode(NotSetValue); - /// Determines if two values are the same. + /// Determines if two values are the same. /// The left value to compare. /// The right value to compare. - public static bool operator ==(LeastPrivilegeMode left, LeastPrivilegeMode right) => left.Equals(right); + public static bool operator ==(SqlVmLeastPrivilegeMode left, SqlVmLeastPrivilegeMode right) => left.Equals(right); - /// Determines if two values are not the same. + /// Determines if two values are not the same. /// The left value to compare. /// The right value to compare. - public static bool operator !=(LeastPrivilegeMode left, LeastPrivilegeMode right) => !left.Equals(right); + public static bool operator !=(SqlVmLeastPrivilegeMode left, SqlVmLeastPrivilegeMode right) => !left.Equals(right); - /// Converts a string to a . + /// Converts a string to a . /// The value. - public static implicit operator LeastPrivilegeMode(string value) => new LeastPrivilegeMode(value); + public static implicit operator SqlVmLeastPrivilegeMode(string value) => new SqlVmLeastPrivilegeMode(value); - /// Converts a string to a . + /// Converts a string to a . /// The value. - public static implicit operator LeastPrivilegeMode?(string value) => value == null ? null : new LeastPrivilegeMode(value); + public static implicit operator SqlVmLeastPrivilegeMode?(string value) => value == null ? null : new SqlVmLeastPrivilegeMode(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LeastPrivilegeMode other && Equals(other); + public override bool Equals(object obj) => obj is SqlVmLeastPrivilegeMode other && Equals(other); /// - public bool Equals(LeastPrivilegeMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(SqlVmLeastPrivilegeMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs index d490a5a6567c..973ba4c04498 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs @@ -132,7 +132,7 @@ public SqlManagementMode? SqlManagement } /// SQL IaaS Agent least privilege mode. - public LeastPrivilegeMode? LeastPrivilegeMode + public SqlVmLeastPrivilegeMode? LeastPrivilegeMode { get { From 1e972cde3d89c1175ce92476327df4414414735b Mon Sep 17 00:00:00 2001 From: Zhonglei Ma Date: Tue, 3 Feb 2026 17:07:31 +0800 Subject: [PATCH 7/7] updated latest spec main commit id and regen --- .../RestOperations/AvailabilityGroupListenersRestOperations.cs | 1 + .../RestOperations/SqlVirtualMachineGroupsRestOperations.cs | 2 ++ .../RestOperations/SqlVirtualMachinesRestOperations.cs | 3 +++ .../Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs index 10df6ef87db6..14d1e17c20de 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs @@ -133,6 +133,7 @@ internal HttpMessage CreateNextGetByGroupRequest(Uri nextPage, string subscripti { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(nextPage); + uri.UpdateQuery("api-version", _apiVersion); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; request.Uri = uri; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs index 354651fdcd07..53be2dd0010c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs @@ -142,6 +142,7 @@ internal HttpMessage CreateNextGetByResourceGroupRequest(Uri nextPage, string su { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(nextPage); + uri.UpdateQuery("api-version", _apiVersion); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; request.Uri = uri; @@ -170,6 +171,7 @@ internal HttpMessage CreateNextGetAllRequest(Uri nextPage, string subscriptionId { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(nextPage); + uri.UpdateQuery("api-version", _apiVersion); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; request.Uri = uri; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs index badcd208dbdb..65cb0fa70979 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs @@ -146,6 +146,7 @@ internal HttpMessage CreateNextGetByResourceGroupRequest(Uri nextPage, string su { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(nextPage); + uri.UpdateQuery("api-version", _apiVersion); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; request.Uri = uri; @@ -174,6 +175,7 @@ internal HttpMessage CreateNextGetAllRequest(Uri nextPage, string subscriptionId { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(nextPage); + uri.UpdateQuery("api-version", _apiVersion); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; request.Uri = uri; @@ -265,6 +267,7 @@ internal HttpMessage CreateNextGetSqlVmsBySqlVmGroupRequest(Uri nextPage, string { RawRequestUriBuilder uri = new RawRequestUriBuilder(); uri.Reset(nextPage); + uri.UpdateQuery("api-version", _apiVersion); HttpMessage message = Pipeline.CreateMessage(); Request request = message.Request; request.Uri = uri; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml index f087c64e1d70..a521d8d9dc9f 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/SqlVirtualMachine -commit: 377a7cf47fc4879b0ed68be5442de854278ff247 +commit: dfc2d47e22c44015d55f2a4a1b008b10ff17e9d6 repo: Azure/azure-rest-api-specs emitterPackageJsonPath: "eng/azure-typespec-http-client-csharp-mgmt-emitter-package.json"