From 732d92c7cefa0a35ddf3ab069ce293f62cbd3e42 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 9 May 2025 08:00:38 +0000 Subject: [PATCH] CodeGen from PR 34268 in Azure/azure-rest-api-specs Merge 91e6bf7cd06282d63a96a659464477e5ec9b5f48 into 761d8b58e465b26eddb8ad70dda3cde7b4228bdf --- ...esourceManager.SqlVirtualMachine.net8.0.cs | 1330 ++++++++++------- ...anager.SqlVirtualMachine.netstandard2.0.cs | 1330 ++++++++++------- ...ple_AvailabilityGroupListenerCollection.cs | 130 +- ...ample_AvailabilityGroupListenerResource.cs | 66 +- .../Sample_SqlVirtualMachineCollection.cs | 402 +++++ ...Sample_SqlVirtualMachineGroupCollection.cs | 192 +++ .../Sample_SqlVirtualMachineGroupResource.cs | 140 ++ .../Sample_SqlVirtualMachineResource.cs | 214 +++ .../Sample_SubscriptionResourceExtensions.cs | 20 +- .../Sample_TenantResourceExtensions.cs | 43 + .../ArmSqlVirtualMachineModelFactory.cs | 121 +- .../AvailabilityGroupListenerCollection.cs | 52 +- ...labilityGroupListenerData.Serialization.cs | 12 +- .../AvailabilityGroupListenerData.cs | 12 +- .../AvailabilityGroupListenerResource.cs | 36 +- .../MockableSqlVirtualMachineArmClient.cs | 24 +- ...eSqlVirtualMachineResourceGroupResource.cs | 80 +- ...leSqlVirtualMachineSubscriptionResource.cs | 80 +- ...MockableSqlVirtualMachineTenantResource.cs | 95 ++ .../Extensions/SqlVirtualMachineExtensions.cs | 242 +-- .../SqlVirtualMachineGroupOperationSource.cs | 36 + .../SqlVirtualMachineOperationSource.cs | 36 + .../SqlVmGroupOperationSource.cs | 36 - .../SqlVmOperationSource.cs | 36 - .../SqlVmTroubleshootingOperationSource.cs | 30 + ...AADAuthenticationSettings.Serialization.cs | 129 ++ ...Result.cs => AADAuthenticationSettings.cs} | 25 +- .../src/Generated/Models/AdditionalOSPatch.cs | 54 + .../src/Generated/Models/AdditionalVmPatch.cs | 51 + ...on.cs => AgConfiguration.Serialization.cs} | 44 +- ...oupConfiguration.cs => AgConfiguration.cs} | 14 +- ...lization.cs => AgReplica.Serialization.cs} | 68 +- ...ailabilityGroupReplica.cs => AgReplica.cs} | 25 +- .../AssessmentDayOfWeek.Serialization.cs | 38 + ...entDayOfWeek.cs => AssessmentDayOfWeek.cs} | 2 +- ...cs => AssessmentSettings.Serialization.cs} | 46 +- ...smentSettings.cs => AssessmentSettings.cs} | 30 +- .../Generated/Models/AutoBackupDaysOfWeek.cs | 66 + ...cs => AutoBackupSettings.Serialization.cs} | 84 +- ...ackupSettings.cs => AutoBackupSettings.cs} | 50 +- ... => AutoPatchingSettings.Serialization.cs} | 71 +- ...ingSettings.cs => AutoPatchingSettings.cs} | 28 +- ...tyGroupListenerListResult.Serialization.cs | 18 +- .../AvailabilityGroupListenerListResult.cs | 25 +- .../AvailabilityGroupReplicaCommitMode.cs | 51 - .../AvailabilityGroupReplicaFailoverMode.cs | 51 - .../Models/AvailabilityGroupReplicaRole.cs | 51 - .../Generated/Models/BackupScheduleType.cs | 51 + .../Generated/Models/ClusterConfiguration.cs | 48 + .../Generated/Models/ClusterManagerType.cs | 48 + .../src/Generated/Models/ClusterSubnetType.cs | 51 + .../src/Generated/Models/Commit.cs | 51 + .../src/Generated/Models/ConnectivityType.cs | 54 + .../Models/DayOfWeek.Serialization.cs | 40 + ...mAutoPatchingDayOfWeek.cs => DayOfWeek.cs} | 2 +- ...skConfigAssessmentContent.Serialization.cs | 133 ++ .../Models/DiskConfigAssessmentContent.cs | 65 + .../Generated/Models/DiskConfigurationType.cs | 54 + .../src/Generated/Models/Failover.cs | 51 + .../Models/FullBackupFrequencyType.cs | 51 + .../Generated/Models/Info.Serialization.cs | 185 +++ .../src/Generated/Models/Info.cs | 78 + ...yVaultCredentialSettings.Serialization.cs} | 52 +- ...tings.cs => KeyVaultCredentialSettings.cs} | 18 +- .../Generated/Models/LeastPrivilegeMode.cs | 51 + ...oadBalancerConfiguration.Serialization.cs} | 84 +- ...ration.cs => LoadBalancerConfiguration.cs} | 25 +- ...ultiSubnetIPConfiguration.Serialization.cs | 12 +- .../Models/MultiSubnetIPConfiguration.cs | 20 +- .../Generated/Models/OSType.Serialization.cs | 28 + .../src/Generated/Models/OSType.cs | 18 + .../Models/OperationDisplay.Serialization.cs | 162 ++ .../src/Generated/Models/OperationDisplay.cs | 77 + ...s => OperationListResult.Serialization.cs} | 60 +- .../Generated/Models/OperationListResult.cs | 77 + .../src/Generated/Models/OperationOrigin.cs | 51 + .../Models/OperationProperty.Serialization.cs | 118 ++ .../src/Generated/Models/OperationProperty.cs | 60 + ...n.cs => PrivateIPAddress.Serialization.cs} | 57 +- ...rivateIPAddress.cs => PrivateIPAddress.cs} | 16 +- .../src/Generated/Models/ReadableSecondary.cs | 54 + .../Generated/Models/ReadableSecondaryMode.cs | 54 - .../src/Generated/Models/Role.cs | 51 + ...s => SQLInstanceSettings.Serialization.cs} | 46 +- ...anceSettings.cs => SQLInstanceSettings.cs} | 22 +- ...cs => SQLStorageSettings.Serialization.cs} | 53 +- ...orageSettings.cs => SQLStorageSettings.cs} | 14 +- ....cs => SQLTempDbSettings.Serialization.cs} | 58 +- ...TempDBSettings.cs => SQLTempDbSettings.cs} | 24 +- .../{SqlVmGroupScaleType.cs => ScaleType.cs} | 24 +- ...alization.cs => Schedule.Serialization.cs} | 46 +- ...SqlVmAssessmentSchedule.cs => Schedule.cs} | 20 +- ...ationsManagementSettings.Serialization.cs} | 58 +- ...ServerConfigurationsManagementSettings.cs} | 27 +- .../Models/SqVmBackupScheduleType.cs | 51 - ...onnectivityUpdateSettings.Serialization.cs | 4 +- .../Models/SqlConnectivityUpdateSettings.cs | 4 +- .../src/Generated/Models/SqlManagementMode.cs | 2 +- .../Models/SqlServerConnectivityType.cs | 54 - .../Generated/Models/SqlServerLicenseType.cs | 8 +- .../SqlStorageUpdateSettings.Serialization.cs | 4 +- .../Models/SqlStorageUpdateSettings.cs | 4 +- ...ualMachineGroupListResult.Serialization.cs | 154 ++ .../SqlVirtualMachineGroupListResult.cs | 77 + ...VirtualMachineGroupPatch.Serialization.cs} | 38 +- ...atch.cs => SqlVirtualMachineGroupPatch.cs} | 10 +- ...VirtualMachineListResult.Serialization.cs} | 60 +- ...sult.cs => SqlVirtualMachineListResult.cs} | 33 +- ...> SqlVirtualMachinePatch.Serialization.cs} | 38 +- ...qlVmPatch.cs => SqlVirtualMachinePatch.cs} | 10 +- .../SqlVmAssessmentDayOfWeek.Serialization.cs | 38 - .../Models/SqlVmAutoBackupDayOfWeek.cs | 66 - ...qlVmAutoPatchingDayOfWeek.Serialization.cs | 40 - .../Models/SqlVmClusterConfiguration.cs | 48 - .../Models/SqlVmClusterManagerType.cs | 48 - .../Models/SqlVmClusterSubnetType.cs | 51 - .../Models/SqlVmDiskConfigurationType.cs | 54 - .../Models/SqlVmFullBackupFrequency.cs | 51 - .../Models/SqlVmStorageWorkloadType.cs | 54 - .../SqlVmTroubleshooting.Serialization.cs | 195 +++ .../Generated/Models/SqlVmTroubleshooting.cs | 93 ++ .../src/Generated/Models/SqlWorkloadType.cs | 8 +- ...ageConfigurationSettings.Serialization.cs} | 90 +- ...ngs.cs => StorageConfigurationSettings.cs} | 34 +- .../Generated/Models/StorageWorkloadType.cs | 54 + ...otingAdditionalProperties.Serialization.cs | 133 ++ .../TroubleshootingAdditionalProperties.cs | 76 + .../Models/TroubleshootingScenario.cs | 48 + .../TroubleshootingStatus.Serialization.cs | 211 +++ .../Generated/Models/TroubleshootingStatus.cs | 90 ++ .../UnhealthyReplicaInfo.Serialization.cs | 129 ++ .../Generated/Models/UnhealthyReplicaInfo.cs | 65 + .../VirtualMachineIdentity.Serialization.cs | 148 ++ .../Models/VirtualMachineIdentity.cs | 70 + .../src/Generated/Models/VmIdentityType.cs | 54 + ...=> WsfcDomainCredentials.Serialization.cs} | 38 +- ...redentials.cs => WsfcDomainCredentials.cs} | 10 +- ....cs => WsfcDomainProfile.Serialization.cs} | 72 +- ...rDomainProfile.cs => WsfcDomainProfile.cs} | 24 +- ...vailabilityGroupListenersRestOperations.cs | 207 +-- .../OperationsRestOperations.cs | 173 +++ .../SqlVirtualMachineGroupsRestOperations.cs | 465 ++++-- .../SqlVirtualMachinesRestOperations.cs | 767 +++++----- ...tion.cs => SqlVirtualMachineCollection.cs} | 238 +-- ...=> SqlVirtualMachineData.Serialization.cs} | 209 ++- ...{SqlVmData.cs => SqlVirtualMachineData.cs} | 85 +- ...cs => SqlVirtualMachineGroupCollection.cs} | 238 +-- ...lVirtualMachineGroupData.Serialization.cs} | 60 +- ...pData.cs => SqlVirtualMachineGroupData.cs} | 28 +- ...rtualMachineGroupResource.Serialization.cs | 26 + ...e.cs => SqlVirtualMachineGroupResource.cs} | 267 ++-- ...SqlVirtualMachineResource.Serialization.cs | 26 + ...source.cs => SqlVirtualMachineResource.cs} | 472 ++++-- .../SqlVmGroupResource.Serialization.cs | 26 - .../Generated/SqlVmResource.Serialization.cs | 26 - .../src/autorest.md | 115 -- .../tsp-location.yaml | 4 + sdk/storage/ci.yml | 2 + 158 files changed, 9786 insertions(+), 4606 deletions(-) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineCollection.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineGroupCollection.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineGroupResource.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineResource.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_TenantResourceExtensions.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineTenantResource.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineGroupOperationSource.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineOperationSource.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmGroupOperationSource.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmOperationSource.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 rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmListResult.cs => AADAuthenticationSettings.cs} (66%) 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 rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{AvailabilityGroupConfiguration.Serialization.cs => AgConfiguration.Serialization.cs} (62%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{AvailabilityGroupConfiguration.cs => AgConfiguration.cs} (81%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{AvailabilityGroupReplica.Serialization.cs => AgReplica.Serialization.cs} (64%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{AvailabilityGroupReplica.cs => AgReplica.cs} (75%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentDayOfWeek.Serialization.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmAssessmentDayOfWeek.cs => AssessmentDayOfWeek.cs} (94%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmAssessmentSettings.Serialization.cs => AssessmentSettings.Serialization.cs} (67%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmAssessmentSettings.cs => AssessmentSettings.cs} (60%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoBackupDaysOfWeek.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmAutoBackupSettings.Serialization.cs => AutoBackupSettings.Serialization.cs} (75%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmAutoBackupSettings.cs => AutoBackupSettings.cs} (69%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmAutoPatchingSettings.Serialization.cs => AutoPatchingSettings.Serialization.cs} (64%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmAutoPatchingSettings.cs => AutoPatchingSettings.cs} (67%) delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaCommitMode.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaFailoverMode.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaRole.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/BackupScheduleType.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ClusterConfiguration.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ClusterManagerType.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ClusterSubnetType.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Commit.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ConnectivityType.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DayOfWeek.Serialization.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmAutoPatchingDayOfWeek.cs => DayOfWeek.cs} (94%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigAssessmentContent.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigAssessmentContent.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigurationType.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Failover.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/FullBackupFrequencyType.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 rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmKeyVaultCredentialSettings.Serialization.cs => KeyVaultCredentialSettings.Serialization.cs} (68%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmKeyVaultCredentialSettings.cs => KeyVaultCredentialSettings.cs} (79%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LeastPrivilegeMode.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{AvailabilityGroupListenerLoadBalancerConfiguration.Serialization.cs => LoadBalancerConfiguration.Serialization.cs} (57%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{AvailabilityGroupListenerLoadBalancerConfiguration.cs => LoadBalancerConfiguration.cs} (68%) 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/OperationDisplay.Serialization.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmListResult.Serialization.cs => OperationListResult.Serialization.cs} (65%) 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 rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{AvailabilityGroupListenerPrivateIPAddress.Serialization.cs => PrivateIPAddress.Serialization.cs} (55%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{AvailabilityGroupListenerPrivateIPAddress.cs => PrivateIPAddress.cs} (77%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondary.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondaryMode.cs create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Role.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlInstanceSettings.Serialization.cs => SQLInstanceSettings.Serialization.cs} (83%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlInstanceSettings.cs => SQLInstanceSettings.cs} (82%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlStorageSettings.Serialization.cs => SQLStorageSettings.Serialization.cs} (71%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlStorageSettings.cs => SQLStorageSettings.cs} (80%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlTempDBSettings.Serialization.cs => SQLTempDbSettings.Serialization.cs} (81%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlTempDBSettings.cs => SQLTempDbSettings.cs} (81%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmGroupScaleType.cs => ScaleType.cs} (51%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmAssessmentSchedule.Serialization.cs => Schedule.Serialization.cs} (73%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmAssessmentSchedule.cs => Schedule.cs} (82%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlServerConfigurationsManagementSettings.Serialization.cs => ServerConfigurationsManagementSettings.Serialization.cs} (68%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlServerConfigurationsManagementSettings.cs => ServerConfigurationsManagementSettings.cs} (73%) delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqVmBackupScheduleType.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConnectivityType.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 rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmGroupPatch.Serialization.cs => SqlVirtualMachineGroupPatch.Serialization.cs} (69%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmGroupPatch.cs => SqlVirtualMachineGroupPatch.cs} (87%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmGroupListResult.Serialization.cs => SqlVirtualMachineListResult.Serialization.cs} (64%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmGroupListResult.cs => SqlVirtualMachineListResult.cs} (62%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmPatch.Serialization.cs => SqlVirtualMachinePatch.Serialization.cs} (70%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmPatch.cs => SqlVirtualMachinePatch.cs} (88%) delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentDayOfWeek.Serialization.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupDayOfWeek.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingDayOfWeek.Serialization.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterConfiguration.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterManagerType.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterSubnetType.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigurationType.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmFullBackupFrequency.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageWorkloadType.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 rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmStorageConfigurationSettings.Serialization.cs => StorageConfigurationSettings.Serialization.cs} (60%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{SqlVmStorageConfigurationSettings.cs => StorageConfigurationSettings.cs} (66%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/StorageWorkloadType.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 rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{WindowsServerFailoverClusterDomainCredentials.Serialization.cs => WsfcDomainCredentials.Serialization.cs} (65%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{WindowsServerFailoverClusterDomainCredentials.cs => WsfcDomainCredentials.cs} (86%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{WindowsServerFailoverClusterDomainProfile.Serialization.cs => WsfcDomainProfile.Serialization.cs} (72%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/{WindowsServerFailoverClusterDomainProfile.cs => WsfcDomainProfile.cs} (80%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/OperationsRestOperations.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/{SqlVmCollection.cs => SqlVirtualMachineCollection.cs} (53%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/{SqlVmData.Serialization.cs => SqlVirtualMachineData.Serialization.cs} (64%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/{SqlVmData.cs => SqlVirtualMachineData.cs} (53%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/{SqlVmGroupCollection.cs => SqlVirtualMachineGroupCollection.cs} (51%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/{SqlVmGroupData.Serialization.cs => SqlVirtualMachineGroupData.Serialization.cs} (78%) rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/{SqlVmGroupData.cs => SqlVirtualMachineGroupData.cs} (74%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupResource.Serialization.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/{SqlVmGroupResource.cs => SqlVirtualMachineGroupResource.cs} (69%) create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineResource.Serialization.cs rename sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/{SqlVmResource.cs => SqlVirtualMachineResource.cs} (56%) delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs delete mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/autorest.md create mode 100644 sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml 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 5fd31ae02dfe..b3d11ff7b218 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 @@ -21,9 +21,9 @@ public partial class AvailabilityGroupListenerData : Azure.ResourceManager.Model { public AvailabilityGroupListenerData() { } public string AvailabilityGroupName { get { throw null; } set { } } - public System.Collections.Generic.IList AvailabilityGroupReplicas { get { throw null; } } + public System.Collections.Generic.IList AvailabilityGroupReplicas { get { throw null; } } public bool? CreateDefaultAvailabilityGroupIfNotExist { get { throw null; } set { } } - public System.Collections.Generic.IList LoadBalancerConfigurations { get { throw null; } } + public System.Collections.Generic.IList LoadBalancerConfigurations { get { throw null; } } public System.Collections.Generic.IList MultiSubnetIPConfigurations { get { throw null; } } public int? Port { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } @@ -40,7 +40,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; } @@ -59,157 +59,169 @@ internal AzureResourceManagerSqlVirtualMachineContext() { } public static Azure.ResourceManager.SqlVirtualMachine.AzureResourceManagerSqlVirtualMachineContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } - public static partial class SqlVirtualMachineExtensions + public partial class SqlVirtualMachineCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - 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; } - public static Azure.Response GetSqlVmGroup(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetSqlVmGroupAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupResource GetSqlVmGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupCollection GetSqlVmGroups(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetSqlVmGroups(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetSqlVmGroupsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmResource GetSqlVmResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmCollection GetSqlVms(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetSqlVms(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetSqlVmsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class SqlVmCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected SqlVmCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sqlVmName, Azure.ResourceManager.SqlVirtualMachine.SqlVmData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sqlVmName, Azure.ResourceManager.SqlVirtualMachine.SqlVmData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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; } - public virtual System.Threading.Tasks.Task> GetAsync(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + protected SqlVirtualMachineCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sqlVirtualMachineName, Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sqlVirtualMachineName, Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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; } + public virtual System.Threading.Tasks.Task> GetAsync(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class SqlVmData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SqlVirtualMachineData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmData(Azure.Core.AzureLocation location) { } - 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 SqlVirtualMachineData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch? AdditionalVmPatch { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.AssessmentSettings AssessmentSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupSettings AutoBackupSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.AutoPatchingSettings 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.KeyVaultCredentialSettings KeyVaultCredentialSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.OSType? OSType { get { throw null; } } public string ProvisioningState { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.ServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get { throw null; } set { } } public string SqlImageOffer { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? SqlImageSku { get { throw null; } set { } } 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 Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings StorageConfigurationSettings { 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 { } } + public string SqlVirtualMachineGroupResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.StorageConfigurationSettings StorageConfigurationSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingStatus TroubleshootingStatus { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.VirtualMachineIdentity VirtualMachineIdentitySettings { get { throw null; } set { } } + public string VirtualMachineResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainCredentials WsfcDomainCredentials { get { throw null; } set { } } + public string WsfcStaticIP { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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 SqlVmGroupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected SqlVmGroupCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sqlVmGroupName, Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sqlVmGroupName, Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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; } - public virtual System.Threading.Tasks.Task> GetAsync(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData 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.SqlVirtualMachineData 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 static partial class SqlVirtualMachineExtensions + { + public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetOperations(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetOperationsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetSqlVirtualMachine(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSqlVirtualMachineAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetSqlVirtualMachineGroup(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSqlVirtualMachineGroupAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupResource GetSqlVirtualMachineGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupCollection GetSqlVirtualMachineGroups(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSqlVirtualMachineGroups(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSqlVirtualMachineGroupsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineResource GetSqlVirtualMachineResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineCollection GetSqlVirtualMachines(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSqlVirtualMachines(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSqlVirtualMachinesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SqlVirtualMachineGroupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SqlVirtualMachineGroupCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sqlVirtualMachineGroupName, Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sqlVirtualMachineGroupName, Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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; } + public virtual System.Threading.Tasks.Task> GetAsync(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class SqlVmGroupData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SqlVirtualMachineGroupData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmGroupData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? ClusterConfiguration { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? ClusterManagerType { get { throw null; } } + public SqlVirtualMachineGroupData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration? ClusterConfiguration { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType? ClusterManagerType { get { throw null; } } public string ProvisioningState { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? ScaleType { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType? ScaleType { get { throw null; } } public string SqlImageOffer { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? SqlImageSku { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile WindowsServerFailoverClusterDomainProfile { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainProfile WsfcDomainProfile { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData 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.SqlVirtualMachineGroupData 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 SqlVmGroupResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SqlVirtualMachineGroupResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected SqlVmGroupResource() { } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData Data { get { throw null; } } + protected SqlVirtualMachineGroupResource() { } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData Data { get { throw null; } } 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 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 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; } - public virtual System.Threading.Tasks.Task> GetAsync(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; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAvailabilityGroupListener(string availabilityGroupListenerName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAvailabilityGroupListenerAsync(string availabilityGroupListenerName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerCollection GetAvailabilityGroupListeners() { throw null; } - public virtual Azure.Pageable GetSqlVmsBySqlVmGroup(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSqlVmsBySqlVmGroupAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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; } - 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 Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch 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.SqlVmGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class SqlVmResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public virtual Azure.Pageable GetBySqlVmGroup(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetBySqlVmGroupAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData 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.SqlVirtualMachineGroupData 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 Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVirtualMachineGroupPatch 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.SqlVirtualMachineGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SqlVirtualMachineResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected SqlVmResource() { } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmData Data { get { throw null; } } + protected SqlVirtualMachineResource() { } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData Data { get { throw null; } } 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 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 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.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 FetchDCAssessment(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigAssessmentContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FetchDCAssessmentAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigAssessmentContent content, 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; } public virtual System.Threading.Tasks.Task RedeployAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation StartAssessment(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartAssessmentAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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; } - 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 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; } + Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData 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.SqlVirtualMachineData 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.SqlVirtualMachinePatch 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.SqlVirtualMachinePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.SqlVirtualMachine.Mocking @@ -218,530 +230,743 @@ public partial class MockableSqlVirtualMachineArmClient : Azure.ResourceManager. { protected MockableSqlVirtualMachineArmClient() { } public virtual Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupResource GetSqlVmGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmResource GetSqlVmResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupResource GetSqlVirtualMachineGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineResource GetSqlVirtualMachineResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableSqlVirtualMachineResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableSqlVirtualMachineResourceGroupResource() { } - public virtual Azure.Response GetSqlVm(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSqlVmAsync(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetSqlVmGroup(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSqlVmGroupAsync(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupCollection GetSqlVmGroups() { throw null; } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmCollection GetSqlVms() { throw null; } + public virtual Azure.Response GetSqlVirtualMachine(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSqlVirtualMachineAsync(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSqlVirtualMachineGroup(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSqlVirtualMachineGroupAsync(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupCollection GetSqlVirtualMachineGroups() { throw null; } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineCollection GetSqlVirtualMachines() { throw null; } } public partial class MockableSqlVirtualMachineSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableSqlVirtualMachineSubscriptionResource() { } - public virtual Azure.Pageable GetSqlVmGroups(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSqlVmGroupsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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 virtual Azure.Pageable GetSqlVirtualMachineGroups(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSqlVirtualMachineGroupsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSqlVirtualMachines(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSqlVirtualMachinesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MockableSqlVirtualMachineTenantResource : Azure.ResourceManager.ArmResource + { + protected MockableSqlVirtualMachineTenantResource() { } + public virtual Azure.Pageable GetOperations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOperationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public static partial class ArmSqlVirtualMachineModelFactory + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdditionalOSPatch : System.IEquatable { - 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; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdditionalOSPatch(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch WSUS { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch WU { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch WUMU { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch right) { throw null; } + public override string ToString() { throw null; } } - public partial class AvailabilityGroupListenerLoadBalancerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdditionalVmPatch : System.IEquatable { - public AvailabilityGroupListenerLoadBalancerConfiguration() { } - public Azure.Core.ResourceIdentifier LoadBalancerResourceId { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress PrivateIPAddress { get { throw null; } set { } } - 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdditionalVmPatch(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch MicrosoftUpdate { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch right) { throw null; } + public override string ToString() { throw null; } } - public partial class AvailabilityGroupListenerPrivateIPAddress : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AgReplica : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AvailabilityGroupListenerPrivateIPAddress() { } - public System.Net.IPAddress IPAddress { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier SubnetResourceId { get { throw null; } set { } } + public AgReplica() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.Commit? Commit { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.Failover? Failover { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary? ReadableSecondary { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.Role? Role { get { throw null; } set { } } + public string SqlVirtualMachineInstanceId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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 AvailabilityGroupReplica : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AvailabilityGroupReplica() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode? Commit { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode? Failover { get { throw null; } set { } } - 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 { } } + Azure.ResourceManager.SqlVirtualMachine.Models.AgReplica 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.AgReplica 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 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.Info Info(string name = null, Azure.ResourceManager.SqlVirtualMachine.Models.OperationDisplay display = null, Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin? origin = default(Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.OperationDisplay OperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData SqlVirtualMachineData(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, string 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?), string sqlVirtualMachineGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainCredentials wsfcDomainCredentials = null, string wsfcStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.AutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.KeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.ServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.StorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.AssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.VirtualMachineIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.OSType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.OSType?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData SqlVirtualMachineGroupData(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.ScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainProfile wsfcDomainProfile = 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.TroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario?), string unhealthyReplicaInfoAvailabilityGroupName = null, string virtualMachineResourceId = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingStatus TroubleshootingStatus(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.TroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario?), string unhealthyReplicaInfoAvailabilityGroupName = null) { throw null; } + } + public enum AssessmentDayOfWeek + { + Monday = 0, + Tuesday = 1, + Wednesday = 2, + Thursday = 3, + Friday = 4, + Saturday = 5, + Sunday = 6, + } + public partial class AssessmentSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AssessmentSettings() { } + public bool? Enable { get { throw null; } set { } } + public bool? RunImmediately { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.Schedule Schedule { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.AssessmentSettings 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.AssessmentSettings 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 AvailabilityGroupReplicaCommitMode : System.IEquatable + public readonly partial struct AutoBackupDaysOfWeek : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AvailabilityGroupReplicaCommitMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode AsynchronousCommit { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode SynchronousCommit { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode other) { throw null; } + public AutoBackupDaysOfWeek(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Friday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Monday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Saturday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Sunday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Thursday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Tuesday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Wednesday { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek right) { throw null; } public override string ToString() { throw null; } } + public partial class AutoBackupSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AutoBackupSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType? BackupScheduleType { get { throw null; } set { } } + public bool? BackupSystemDbs { get { throw null; } set { } } + public System.Collections.Generic.IList DaysOfWeek { get { throw null; } } + public bool? Enable { get { throw null; } set { } } + public bool? EnableEncryption { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType? FullBackupFrequency { get { throw null; } set { } } + public int? FullBackupStartTime { get { throw null; } set { } } + public int? FullBackupWindowHours { get { throw null; } set { } } + public int? LogBackupFrequency { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public int? RetentionPeriod { get { throw null; } set { } } + public string StorageAccessKey { get { throw null; } set { } } + public string StorageAccountUri { get { throw null; } set { } } + public string StorageContainerName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupSettings 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.AutoBackupSettings 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 AutoPatchingSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AutoPatchingSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch? AdditionalVmPatch { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.DayOfWeek? DayOfWeek { get { throw null; } set { } } + public bool? Enable { get { throw null; } set { } } + public int? MaintenanceWindowDuration { get { throw null; } set { } } + public int? MaintenanceWindowStartingHour { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.AutoPatchingSettings 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.AutoPatchingSettings 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 AvailabilityGroupReplicaFailoverMode : System.IEquatable + public readonly partial struct BackupScheduleType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AvailabilityGroupReplicaFailoverMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode Automatic { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode Manual { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode other) { throw null; } + public BackupScheduleType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType Automated { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AvailabilityGroupReplicaRole : System.IEquatable + public readonly partial struct ClusterConfiguration : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AvailabilityGroupReplicaRole(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole Primary { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole Secondary { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole other) { throw null; } + public ClusterConfiguration(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration Domainful { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration right) { throw null; } public override string ToString() { throw null; } } - public partial class MultiSubnetIPConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ClusterManagerType : System.IEquatable { - 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ClusterManagerType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType WSFC { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ReadableSecondaryMode : System.IEquatable + public readonly partial struct ClusterSubnetType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ReadableSecondaryMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode All { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode No { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode ReadOnly { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode other) { throw null; } + public ClusterSubnetType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType MultiSubnet { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType SingleSubnet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlConnectivityUpdateSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Commit : System.IEquatable { - public SqlConnectivityUpdateSettings() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType? ConnectivityType { get { throw null; } set { } } - public int? Port { get { throw null; } set { } } - public string SqlAuthUpdatePassword { get { throw null; } set { } } - public string SqlAuthUpdateUserName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Commit(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Commit AsynchronousCommit { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Commit SynchronousCommit { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.Commit other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.Commit left, Azure.ResourceManager.SqlVirtualMachine.Models.Commit right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.Commit (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.Commit left, Azure.ResourceManager.SqlVirtualMachine.Models.Commit right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlImageSku : System.IEquatable + public readonly partial struct ConnectivityType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlImageSku(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Developer { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Enterprise { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Express { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Standard { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Web { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku other) { throw null; } + public ConnectivityType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType LOCAL { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType PRIVATE { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType PUBLIC { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlInstanceSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public enum DayOfWeek { - public SqlInstanceSettings() { } - public string Collation { get { throw null; } set { } } - public bool? IsIfiEnabled { get { throw null; } set { } } - public bool? IsLpimEnabled { get { throw null; } set { } } - public bool? IsOptimizeForAdHocWorkloadsEnabled { get { throw null; } set { } } - public int? MaxDop { get { throw null; } set { } } - public int? MaxServerMemoryInMB { get { throw null; } set { } } - public int? MinServerMemoryInMB { get { throw null; } set { } } + Everyday = 0, + Monday = 1, + Tuesday = 2, + Wednesday = 3, + Thursday = 4, + Friday = 5, + Saturday = 6, + Sunday = 7, + } + public partial class DiskConfigAssessmentContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiskConfigAssessmentContent() { } + public bool? RunDiskConfigRules { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigAssessmentContent 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.DiskConfigAssessmentContent 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 SqlManagementMode : System.IEquatable + public readonly partial struct DiskConfigurationType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlManagementMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode Full { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode LightWeight { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode NoAgent { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode other) { throw null; } + public DiskConfigurationType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType ADD { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType EXTEND { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType NEW { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlServerConfigurationsManagementSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SqlServerConfigurationsManagementSettings() { } - 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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 SqlServerConnectivityType : System.IEquatable + public readonly partial struct Failover : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlServerConnectivityType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType Local { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType Private { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType Public { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType other) { throw null; } + public Failover(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Failover Automatic { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Failover Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.Failover other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.Failover left, Azure.ResourceManager.SqlVirtualMachine.Models.Failover right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.Failover (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.Failover left, Azure.ResourceManager.SqlVirtualMachine.Models.Failover right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlServerLicenseType : System.IEquatable + public readonly partial struct FullBackupFrequencyType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlServerLicenseType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType Ahub { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType DR { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType Payg { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType other) { throw null; } + public FullBackupFrequencyType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType Daily { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType Weekly { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType left, Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType left, Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlStorageSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Info : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlStorageSettings() { } - public string DefaultFilePath { get { throw null; } set { } } - public System.Collections.Generic.IList Luns { get { throw null; } } + internal Info() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.OperationDisplay Display { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin? Origin { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + 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; } } - public partial class SqlStorageUpdateSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class KeyVaultCredentialSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - 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 { } } + public KeyVaultCredentialSettings() { } + public string AzureKeyVaultUri { get { throw null; } set { } } + public string CredentialName { get { throw null; } set { } } + public bool? Enable { get { throw null; } set { } } + public string ServicePrincipalName { get { throw null; } set { } } + public string ServicePrincipalSecret { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.KeyVaultCredentialSettings 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.KeyVaultCredentialSettings 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 SqlTempDBSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LeastPrivilegeMode : System.IEquatable { - public SqlTempDBSettings() { } - public int? DataFileCount { get { throw null; } set { } } - public int? DataFileSize { get { throw null; } set { } } - public int? DataGrowth { get { throw null; } set { } } - public string DefaultFilePath { get { throw null; } set { } } - public int? LogFileSize { get { throw null; } set { } } - public int? LogGrowth { get { throw null; } set { } } - public System.Collections.Generic.IList LogicalUnitNumbers { get { throw null; } } - public bool? PersistFolder { get { throw null; } set { } } - public string PersistFolderPath { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } + 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; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } + public override string ToString() { throw null; } } - public enum SqlVmAssessmentDayOfWeek + public partial class LoadBalancerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - Monday = 0, - Tuesday = 1, - Wednesday = 2, - Thursday = 3, - Friday = 4, - Saturday = 5, - Sunday = 6, + public LoadBalancerConfiguration() { } + public string LoadBalancerResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.PrivateIPAddress PrivateIPAddress { get { throw null; } set { } } + public int? ProbePort { get { throw null; } set { } } + public string PublicIPAddressResourceId { get { throw null; } set { } } + public System.Collections.Generic.IList SqlVirtualMachineInstances { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.LoadBalancerConfiguration 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.LoadBalancerConfiguration 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 SqlVmAssessmentSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class MultiSubnetIPConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmAssessmentSchedule() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentDayOfWeek? DayOfWeek { get { throw null; } set { } } - public bool? IsEnabled { get { throw null; } set { } } - public int? MonthlyOccurrence { get { throw null; } set { } } - public string StartTime { get { throw null; } set { } } - public int? WeeklyInterval { get { throw null; } set { } } + public MultiSubnetIPConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.PrivateIPAddress privateIPAddress, string sqlVirtualMachineInstance) { } + public Azure.ResourceManager.SqlVirtualMachine.Models.PrivateIPAddress PrivateIPAddress { get { throw null; } set { } } + public string SqlVirtualMachineInstance { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + 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 SqlVmAssessmentSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class OperationDisplay : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - 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 { } } + internal OperationDisplay() { } + 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.OperationDisplay 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.OperationDisplay 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 SqlVmAutoBackupDayOfWeek : System.IEquatable + public readonly partial struct OperationOrigin : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmAutoBackupDayOfWeek(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Friday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Monday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Saturday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Sunday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Thursday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Tuesday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Wednesday { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek other) { throw null; } + public OperationOrigin(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin System { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin User { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlVmAutoBackupSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class OperationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmAutoBackupSettings() { } - public bool? AreSystemDbsIncludedInBackup { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? BackupScheduleType { get { throw null; } set { } } - public System.Collections.Generic.IList DaysOfWeek { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? FullBackupFrequency { get { throw null; } set { } } - public int? FullBackupStartHour { get { throw null; } set { } } - public int? FullBackupWindowHours { get { throw null; } set { } } - public bool? IsEnabled { get { throw null; } set { } } - public bool? IsEncryptionEnabled { get { throw null; } set { } } - public int? LogBackupFrequency { get { throw null; } set { } } - public string Password { get { throw null; } set { } } - public int? RetentionPeriodInDays { get { throw null; } set { } } - public string StorageAccessKey { get { throw null; } set { } } - public System.Uri StorageAccountUri { get { throw null; } set { } } - public string StorageContainerName { get { throw null; } set { } } + internal OperationProperty() { } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + 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; } } - public enum SqlVmAutoPatchingDayOfWeek + public enum OSType { - Everyday = 0, - Monday = 1, - Tuesday = 2, - Wednesday = 3, - Thursday = 4, - Friday = 5, - Saturday = 6, - Sunday = 7, + Windows = 0, + Linux = 1, } - public partial class SqlVmAutoPatchingSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PrivateIPAddress : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmAutoPatchingSettings() { } - 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 { } } + public PrivateIPAddress() { } + public string IPAddress { get { throw null; } set { } } + public string SubnetResourceId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.PrivateIPAddress 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.PrivateIPAddress 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 SqlVmClusterConfiguration : System.IEquatable + public readonly partial struct ReadableSecondary : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmClusterConfiguration(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration Domainful { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration other) { throw null; } + public ReadableSecondary(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary All { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary No { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary ReadOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlVmClusterManagerType : System.IEquatable + public readonly partial struct Role : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmClusterManagerType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType WindowsServerFailoverCluster { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType other) { throw null; } + public Role(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Role Primary { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Role Secondary { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.Role other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.Role left, Azure.ResourceManager.SqlVirtualMachine.Models.Role right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.Role (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.Role left, Azure.ResourceManager.SqlVirtualMachine.Models.Role right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlVmClusterSubnetType : System.IEquatable + public readonly partial struct ScaleType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmClusterSubnetType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType MultiSubnet { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType SingleSubnet { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType other) { throw null; } + public ScaleType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType HA { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType right) { throw null; } public override string ToString() { throw null; } } + public partial class Schedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Schedule() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.AssessmentDayOfWeek? DayOfWeek { get { throw null; } set { } } + public bool? Enable { get { throw null; } set { } } + public int? MonthlyOccurrence { get { throw null; } set { } } + public string StartTime { get { throw null; } set { } } + public int? WeeklyInterval { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.Schedule 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.Schedule 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 ServerConfigurationsManagementSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServerConfigurationsManagementSettings() { } + 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.ServerConfigurationsManagementSettings 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.ServerConfigurationsManagementSettings 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 SqlConnectivityUpdateSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlConnectivityUpdateSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType? ConnectivityType { get { throw null; } set { } } + public int? Port { get { throw null; } set { } } + public string SqlAuthUpdatePassword { get { throw null; } set { } } + public string SqlAuthUpdateUserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + 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; } + 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 SqlImageSku : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlImageSku(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Developer { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Enterprise { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Express { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Standard { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Web { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SQLInstanceSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SQLInstanceSettings() { } + public string Collation { get { throw null; } set { } } + public bool? IsIfiEnabled { get { throw null; } set { } } + public bool? IsLpimEnabled { get { throw null; } set { } } + public bool? IsOptimizeForAdHocWorkloadsEnabled { get { throw null; } set { } } + public int? MaxDop { get { throw null; } set { } } + public int? MaxServerMemoryMB { get { throw null; } set { } } + public int? MinServerMemoryMB { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + 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; } + 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 + public readonly partial struct SqlManagementMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmDiskConfigurationType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType Add { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType Extend { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType New { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType other) { throw null; } + public SqlManagementMode(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode Full { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode LightWeight { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode NoAgent { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType right) { 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlVmFullBackupFrequency : System.IEquatable + public readonly partial struct SqlServerLicenseType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmFullBackupFrequency(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency Daily { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency Weekly { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency other) { throw null; } + public SqlServerLicenseType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType AHUB { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType DR { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType PAYG { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency right) { 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType right) { throw null; } public override string ToString() { throw null; } } + public partial class SQLStorageSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + 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; } + 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 SqlStorageUpdateSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlStorageUpdateSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType? DiskConfigurationType { get { throw null; } set { } } + public int? DiskCount { get { throw null; } set { } } + public int? StartingDeviceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + 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; } + 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 SQLTempDbSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SQLTempDbSettings() { } + public int? DataFileCount { get { throw null; } set { } } + public int? DataFileSize { get { throw null; } set { } } + public int? DataGrowth { get { throw null; } set { } } + public string DefaultFilePath { get { throw null; } set { } } + public int? LogFileSize { get { throw null; } set { } } + public int? LogGrowth { get { throw null; } set { } } + public System.Collections.Generic.IList Luns { 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + 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; } + } + public partial class SqlVirtualMachineGroupPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVirtualMachineGroupPatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVirtualMachineGroupPatch 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.SqlVirtualMachineGroupPatch 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 SqlVirtualMachinePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVirtualMachinePatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVirtualMachinePatch 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.SqlVirtualMachinePatch 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 SqlVmGroupImageSku : System.IEquatable { @@ -760,162 +985,171 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlVmGroupPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SqlVmTroubleshooting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmGroupPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public SqlVmTroubleshooting() { } + public System.DateTimeOffset? EndTimeUtc { get { throw null; } set { } } + public System.DateTimeOffset? StartTimeUtc { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario? TroubleshootingScenario { get { throw null; } set { } } + public string UnhealthyReplicaInfoAvailabilityGroupName { get { throw null; } set { } } + public string VirtualMachineResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + 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 SqlVmGroupScaleType : System.IEquatable + public readonly partial struct SqlWorkloadType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmGroupScaleType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType HA { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType other) { throw null; } + public SqlWorkloadType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType DW { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType GENERAL { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType OLTP { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType right) { 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlVmKeyVaultCredentialSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class StorageConfigurationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmKeyVaultCredentialSettings() { } - public System.Uri AzureKeyVaultUri { get { throw null; } set { } } - public string CredentialName { get { throw null; } set { } } - public bool? IsEnabled { get { throw null; } set { } } - public string ServicePrincipalName { get { throw null; } set { } } - public string ServicePrincipalSecret { get { throw null; } set { } } + public StorageConfigurationSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType? DiskConfigurationType { get { throw null; } set { } } + public bool? EnableStorageConfigBlade { 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 bool? SqlSystemDbOnDataDisk { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SQLTempDbSettings SqlTempDbSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType? StorageWorkloadType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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 SqlVmPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SqlVmPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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 SqlVmStorageConfigurationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SqlVmStorageConfigurationSettings() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? DiskConfigurationType { 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.StorageConfigurationSettings 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.StorageConfigurationSettings 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 SqlVmStorageWorkloadType : System.IEquatable + public readonly partial struct StorageWorkloadType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmStorageWorkloadType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType DW { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType General { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType Oltp { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType other) { throw null; } + public StorageWorkloadType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType DW { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType GENERAL { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType OLTP { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType 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 + public readonly partial struct TroubleshootingScenario : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlWorkloadType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType DW { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType General { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType Oltp { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType other) { throw null; } + public TroubleshootingScenario(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario UnhealthyReplica { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario left, Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario left, Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario right) { throw null; } public override string ToString() { throw null; } } + public partial class TroubleshootingStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TroubleshootingStatus() { } + 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 Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario? TroubleshootingScenario { get { throw null; } } + public string UnhealthyReplicaInfoAvailabilityGroupName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingStatus 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.TroubleshootingStatus 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 VirtualMachineIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VirtualMachineIdentity() { } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType? Type { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.VirtualMachineIdentity 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.VirtualMachineIdentity 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 SqVmBackupScheduleType : System.IEquatable + public readonly partial struct VmIdentityType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqVmBackupScheduleType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType Automated { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType Manual { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType other) { throw null; } + public VmIdentityType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType None { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType left, Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType left, Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType right) { throw null; } public override string ToString() { throw null; } } - public partial class WindowsServerFailoverClusterDomainCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class WsfcDomainCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public WindowsServerFailoverClusterDomainCredentials() { } + public WsfcDomainCredentials() { } public string ClusterBootstrapAccountPassword { get { throw null; } set { } } public string ClusterOperatorAccountPassword { get { throw null; } set { } } public string SqlServiceAccountPassword { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainCredentials 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.WsfcDomainCredentials 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 WindowsServerFailoverClusterDomainProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class WsfcDomainProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public WindowsServerFailoverClusterDomainProfile() { } + public WsfcDomainProfile() { } public string ClusterBootstrapAccount { get { throw null; } set { } } public string ClusterOperatorAccount { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType? ClusterSubnetType { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType? ClusterSubnetType { get { throw null; } set { } } public string DomainFqdn { get { throw null; } set { } } public string FileShareWitnessPath { get { throw null; } set { } } - public string OrganizationalUnitPath { get { throw null; } set { } } + public bool? IsSqlServiceAccountGmsa { get { throw null; } set { } } + public string OuPath { 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 { } } + public string StorageAccountUri { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainProfile 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.WsfcDomainProfile 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; } } } 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 5fd31ae02dfe..b3d11ff7b218 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 @@ -21,9 +21,9 @@ public partial class AvailabilityGroupListenerData : Azure.ResourceManager.Model { public AvailabilityGroupListenerData() { } public string AvailabilityGroupName { get { throw null; } set { } } - public System.Collections.Generic.IList AvailabilityGroupReplicas { get { throw null; } } + public System.Collections.Generic.IList AvailabilityGroupReplicas { get { throw null; } } public bool? CreateDefaultAvailabilityGroupIfNotExist { get { throw null; } set { } } - public System.Collections.Generic.IList LoadBalancerConfigurations { get { throw null; } } + public System.Collections.Generic.IList LoadBalancerConfigurations { get { throw null; } } public System.Collections.Generic.IList MultiSubnetIPConfigurations { get { throw null; } } public int? Port { get { throw null; } set { } } public string ProvisioningState { get { throw null; } } @@ -40,7 +40,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; } @@ -59,157 +59,169 @@ internal AzureResourceManagerSqlVirtualMachineContext() { } public static Azure.ResourceManager.SqlVirtualMachine.AzureResourceManagerSqlVirtualMachineContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } - public static partial class SqlVirtualMachineExtensions + public partial class SqlVirtualMachineCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - 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; } - public static Azure.Response GetSqlVmGroup(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetSqlVmGroupAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupResource GetSqlVmGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupCollection GetSqlVmGroups(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetSqlVmGroups(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetSqlVmGroupsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmResource GetSqlVmResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.SqlVmCollection GetSqlVms(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetSqlVms(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetSqlVmsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class SqlVmCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected SqlVmCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sqlVmName, Azure.ResourceManager.SqlVirtualMachine.SqlVmData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sqlVmName, Azure.ResourceManager.SqlVirtualMachine.SqlVmData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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; } - public virtual System.Threading.Tasks.Task> GetAsync(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + protected SqlVirtualMachineCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sqlVirtualMachineName, Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sqlVirtualMachineName, Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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; } + public virtual System.Threading.Tasks.Task> GetAsync(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class SqlVmData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SqlVirtualMachineData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmData(Azure.Core.AzureLocation location) { } - 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 SqlVirtualMachineData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch? AdditionalVmPatch { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.AssessmentSettings AssessmentSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupSettings AutoBackupSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.AutoPatchingSettings 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.KeyVaultCredentialSettings KeyVaultCredentialSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode? LeastPrivilegeMode { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.OSType? OSType { get { throw null; } } public string ProvisioningState { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.ServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get { throw null; } set { } } public string SqlImageOffer { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku? SqlImageSku { get { throw null; } set { } } 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 Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageConfigurationSettings StorageConfigurationSettings { 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 { } } + public string SqlVirtualMachineGroupResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.StorageConfigurationSettings StorageConfigurationSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingStatus TroubleshootingStatus { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.VirtualMachineIdentity VirtualMachineIdentitySettings { get { throw null; } set { } } + public string VirtualMachineResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainCredentials WsfcDomainCredentials { get { throw null; } set { } } + public string WsfcStaticIP { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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 SqlVmGroupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected SqlVmGroupCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sqlVmGroupName, Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sqlVmGroupName, Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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; } - public virtual System.Threading.Tasks.Task> GetAsync(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData 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.SqlVirtualMachineData 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 static partial class SqlVirtualMachineExtensions + { + public static Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetOperations(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetOperationsAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetSqlVirtualMachine(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSqlVirtualMachineAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetSqlVirtualMachineGroup(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSqlVirtualMachineGroupAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupResource GetSqlVirtualMachineGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupCollection GetSqlVirtualMachineGroups(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSqlVirtualMachineGroups(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSqlVirtualMachineGroupsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineResource GetSqlVirtualMachineResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineCollection GetSqlVirtualMachines(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSqlVirtualMachines(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSqlVirtualMachinesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SqlVirtualMachineGroupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SqlVirtualMachineGroupCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string sqlVirtualMachineGroupName, Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string sqlVirtualMachineGroupName, Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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; } + public virtual System.Threading.Tasks.Task> GetAsync(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class SqlVmGroupData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SqlVirtualMachineGroupData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmGroupData(Azure.Core.AzureLocation location) { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration? ClusterConfiguration { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType? ClusterManagerType { get { throw null; } } + public SqlVirtualMachineGroupData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration? ClusterConfiguration { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType? ClusterManagerType { get { throw null; } } public string ProvisioningState { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType? ScaleType { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType? ScaleType { get { throw null; } } public string SqlImageOffer { get { throw null; } set { } } public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku? SqlImageSku { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.WindowsServerFailoverClusterDomainProfile WindowsServerFailoverClusterDomainProfile { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainProfile WsfcDomainProfile { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData 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.SqlVirtualMachineGroupData 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 SqlVmGroupResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SqlVirtualMachineGroupResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected SqlVmGroupResource() { } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupData Data { get { throw null; } } + protected SqlVirtualMachineGroupResource() { } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData Data { get { throw null; } } 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 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 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; } - public virtual System.Threading.Tasks.Task> GetAsync(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; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetAvailabilityGroupListener(string availabilityGroupListenerName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAvailabilityGroupListenerAsync(string availabilityGroupListenerName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerCollection GetAvailabilityGroupListeners() { throw null; } - public virtual Azure.Pageable GetSqlVmsBySqlVmGroup(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSqlVmsBySqlVmGroupAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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; } - 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 Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupPatch 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.SqlVmGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class SqlVmResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public virtual Azure.Pageable GetBySqlVmGroup(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetBySqlVmGroupAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData 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.SqlVirtualMachineGroupData 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 Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVirtualMachineGroupPatch 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.SqlVirtualMachineGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SqlVirtualMachineResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public static readonly Azure.Core.ResourceType ResourceType; - protected SqlVmResource() { } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmData Data { get { throw null; } } + protected SqlVirtualMachineResource() { } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData Data { get { throw null; } } 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 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 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.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 FetchDCAssessment(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigAssessmentContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FetchDCAssessmentAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigAssessmentContent content, 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; } public virtual System.Threading.Tasks.Task RedeployAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation StartAssessment(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task StartAssessmentAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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; } - 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 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; } + Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData 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.SqlVirtualMachineData 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.SqlVirtualMachinePatch 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.SqlVirtualMachinePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.SqlVirtualMachine.Mocking @@ -218,530 +230,743 @@ public partial class MockableSqlVirtualMachineArmClient : Azure.ResourceManager. { protected MockableSqlVirtualMachineArmClient() { } public virtual Azure.ResourceManager.SqlVirtualMachine.AvailabilityGroupListenerResource GetAvailabilityGroupListenerResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupResource GetSqlVmGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmResource GetSqlVmResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupResource GetSqlVirtualMachineGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineResource GetSqlVirtualMachineResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableSqlVirtualMachineResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableSqlVirtualMachineResourceGroupResource() { } - public virtual Azure.Response GetSqlVm(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSqlVmAsync(string sqlVmName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetSqlVmGroup(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSqlVmGroupAsync(string sqlVmGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmGroupCollection GetSqlVmGroups() { throw null; } - public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVmCollection GetSqlVms() { throw null; } + public virtual Azure.Response GetSqlVirtualMachine(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSqlVirtualMachineAsync(string sqlVirtualMachineName, string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSqlVirtualMachineGroup(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSqlVirtualMachineGroupAsync(string sqlVirtualMachineGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupCollection GetSqlVirtualMachineGroups() { throw null; } + public virtual Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineCollection GetSqlVirtualMachines() { throw null; } } public partial class MockableSqlVirtualMachineSubscriptionResource : Azure.ResourceManager.ArmResource { protected MockableSqlVirtualMachineSubscriptionResource() { } - public virtual Azure.Pageable GetSqlVmGroups(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSqlVmGroupsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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 virtual Azure.Pageable GetSqlVirtualMachineGroups(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSqlVirtualMachineGroupsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSqlVirtualMachines(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSqlVirtualMachinesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MockableSqlVirtualMachineTenantResource : Azure.ResourceManager.ArmResource + { + protected MockableSqlVirtualMachineTenantResource() { } + public virtual Azure.Pageable GetOperations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOperationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public static partial class ArmSqlVirtualMachineModelFactory + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdditionalOSPatch : System.IEquatable { - 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; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdditionalOSPatch(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch WSUS { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch WU { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch WUMU { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch right) { throw null; } + public override string ToString() { throw null; } } - public partial class AvailabilityGroupListenerLoadBalancerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AdditionalVmPatch : System.IEquatable { - public AvailabilityGroupListenerLoadBalancerConfiguration() { } - public Azure.Core.ResourceIdentifier LoadBalancerResourceId { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupListenerPrivateIPAddress PrivateIPAddress { get { throw null; } set { } } - 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AdditionalVmPatch(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch MicrosoftUpdate { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch NotSet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch left, Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch right) { throw null; } + public override string ToString() { throw null; } } - public partial class AvailabilityGroupListenerPrivateIPAddress : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AgReplica : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AvailabilityGroupListenerPrivateIPAddress() { } - public System.Net.IPAddress IPAddress { get { throw null; } set { } } - public Azure.Core.ResourceIdentifier SubnetResourceId { get { throw null; } set { } } + public AgReplica() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.Commit? Commit { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.Failover? Failover { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary? ReadableSecondary { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.Role? Role { get { throw null; } set { } } + public string SqlVirtualMachineInstanceId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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 AvailabilityGroupReplica : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AvailabilityGroupReplica() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode? Commit { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode? Failover { get { throw null; } set { } } - 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 { } } + Azure.ResourceManager.SqlVirtualMachine.Models.AgReplica 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.AgReplica 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 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.Info Info(string name = null, Azure.ResourceManager.SqlVirtualMachine.Models.OperationDisplay display = null, Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin? origin = default(Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.OperationDisplay OperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineData SqlVirtualMachineData(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, string 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?), string sqlVirtualMachineGroupResourceId = null, Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainCredentials wsfcDomainCredentials = null, string wsfcStaticIP = null, Azure.ResourceManager.SqlVirtualMachine.Models.AutoPatchingSettings autoPatchingSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupSettings autoBackupSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.KeyVaultCredentialSettings keyVaultCredentialSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.ServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.StorageConfigurationSettings storageConfigurationSettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingStatus troubleshootingStatus = null, Azure.ResourceManager.SqlVirtualMachine.Models.AssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = default(bool?), Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch? additionalVmPatch = default(Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalOSPatch?), Azure.ResourceManager.SqlVirtualMachine.Models.VirtualMachineIdentity virtualMachineIdentitySettings = null, Azure.ResourceManager.SqlVirtualMachine.Models.OSType? osType = default(Azure.ResourceManager.SqlVirtualMachine.Models.OSType?)) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.SqlVirtualMachineGroupData SqlVirtualMachineGroupData(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.ScaleType? scaleType = default(Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType?), Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType? clusterManagerType = default(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType?), Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration? clusterConfiguration = default(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration?), Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainProfile wsfcDomainProfile = 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.TroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario?), string unhealthyReplicaInfoAvailabilityGroupName = null, string virtualMachineResourceId = null) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingStatus TroubleshootingStatus(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.TroubleshootingScenario? troubleshootingScenario = default(Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario?), string unhealthyReplicaInfoAvailabilityGroupName = null) { throw null; } + } + public enum AssessmentDayOfWeek + { + Monday = 0, + Tuesday = 1, + Wednesday = 2, + Thursday = 3, + Friday = 4, + Saturday = 5, + Sunday = 6, + } + public partial class AssessmentSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AssessmentSettings() { } + public bool? Enable { get { throw null; } set { } } + public bool? RunImmediately { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.Schedule Schedule { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.AssessmentSettings 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.AssessmentSettings 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 AvailabilityGroupReplicaCommitMode : System.IEquatable + public readonly partial struct AutoBackupDaysOfWeek : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AvailabilityGroupReplicaCommitMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode AsynchronousCommit { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode SynchronousCommit { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode other) { throw null; } + public AutoBackupDaysOfWeek(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Friday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Monday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Saturday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Sunday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Thursday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Tuesday { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek Wednesday { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaCommitMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupDaysOfWeek right) { throw null; } public override string ToString() { throw null; } } + public partial class AutoBackupSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AutoBackupSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType? BackupScheduleType { get { throw null; } set { } } + public bool? BackupSystemDbs { get { throw null; } set { } } + public System.Collections.Generic.IList DaysOfWeek { get { throw null; } } + public bool? Enable { get { throw null; } set { } } + public bool? EnableEncryption { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType? FullBackupFrequency { get { throw null; } set { } } + public int? FullBackupStartTime { get { throw null; } set { } } + public int? FullBackupWindowHours { get { throw null; } set { } } + public int? LogBackupFrequency { get { throw null; } set { } } + public string Password { get { throw null; } set { } } + public int? RetentionPeriod { get { throw null; } set { } } + public string StorageAccessKey { get { throw null; } set { } } + public string StorageAccountUri { get { throw null; } set { } } + public string StorageContainerName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.AutoBackupSettings 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.AutoBackupSettings 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 AutoPatchingSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AutoPatchingSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.AdditionalVmPatch? AdditionalVmPatch { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.DayOfWeek? DayOfWeek { get { throw null; } set { } } + public bool? Enable { get { throw null; } set { } } + public int? MaintenanceWindowDuration { get { throw null; } set { } } + public int? MaintenanceWindowStartingHour { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.AutoPatchingSettings 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.AutoPatchingSettings 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 AvailabilityGroupReplicaFailoverMode : System.IEquatable + public readonly partial struct BackupScheduleType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AvailabilityGroupReplicaFailoverMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode Automatic { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode Manual { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode other) { throw null; } + public BackupScheduleType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType Automated { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaFailoverMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.BackupScheduleType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AvailabilityGroupReplicaRole : System.IEquatable + public readonly partial struct ClusterConfiguration : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AvailabilityGroupReplicaRole(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole Primary { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole Secondary { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole other) { throw null; } + public ClusterConfiguration(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration Domainful { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole left, Azure.ResourceManager.SqlVirtualMachine.Models.AvailabilityGroupReplicaRole right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterConfiguration right) { throw null; } public override string ToString() { throw null; } } - public partial class MultiSubnetIPConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ClusterManagerType : System.IEquatable { - 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ClusterManagerType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType WSFC { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterManagerType right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ReadableSecondaryMode : System.IEquatable + public readonly partial struct ClusterSubnetType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ReadableSecondaryMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode All { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode No { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode ReadOnly { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode other) { throw null; } + public ClusterSubnetType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType MultiSubnet { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType SingleSubnet { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondaryMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlConnectivityUpdateSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Commit : System.IEquatable { - public SqlConnectivityUpdateSettings() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType? ConnectivityType { get { throw null; } set { } } - public int? Port { get { throw null; } set { } } - public string SqlAuthUpdatePassword { get { throw null; } set { } } - public string SqlAuthUpdateUserName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Commit(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Commit AsynchronousCommit { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Commit SynchronousCommit { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.Commit other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.Commit left, Azure.ResourceManager.SqlVirtualMachine.Models.Commit right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.Commit (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.Commit left, Azure.ResourceManager.SqlVirtualMachine.Models.Commit right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlImageSku : System.IEquatable + public readonly partial struct ConnectivityType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlImageSku(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Developer { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Enterprise { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Express { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Standard { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Web { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku other) { throw null; } + public ConnectivityType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType LOCAL { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType PRIVATE { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType PUBLIC { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlInstanceSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public enum DayOfWeek { - public SqlInstanceSettings() { } - public string Collation { get { throw null; } set { } } - public bool? IsIfiEnabled { get { throw null; } set { } } - public bool? IsLpimEnabled { get { throw null; } set { } } - public bool? IsOptimizeForAdHocWorkloadsEnabled { get { throw null; } set { } } - public int? MaxDop { get { throw null; } set { } } - public int? MaxServerMemoryInMB { get { throw null; } set { } } - public int? MinServerMemoryInMB { get { throw null; } set { } } + Everyday = 0, + Monday = 1, + Tuesday = 2, + Wednesday = 3, + Thursday = 4, + Friday = 5, + Saturday = 6, + Sunday = 7, + } + public partial class DiskConfigAssessmentContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiskConfigAssessmentContent() { } + public bool? RunDiskConfigRules { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigAssessmentContent 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.DiskConfigAssessmentContent 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 SqlManagementMode : System.IEquatable + public readonly partial struct DiskConfigurationType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlManagementMode(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode Full { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode LightWeight { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode NoAgent { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode other) { throw null; } + public DiskConfigurationType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType ADD { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType EXTEND { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType NEW { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlServerConfigurationsManagementSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SqlServerConfigurationsManagementSettings() { } - 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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 SqlServerConnectivityType : System.IEquatable + public readonly partial struct Failover : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlServerConnectivityType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType Local { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType Private { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType Public { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType other) { throw null; } + public Failover(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Failover Automatic { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Failover Manual { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.Failover other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerConnectivityType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.Failover left, Azure.ResourceManager.SqlVirtualMachine.Models.Failover right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.Failover (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.Failover left, Azure.ResourceManager.SqlVirtualMachine.Models.Failover right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlServerLicenseType : System.IEquatable + public readonly partial struct FullBackupFrequencyType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlServerLicenseType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType Ahub { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType DR { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType Payg { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType other) { throw null; } + public FullBackupFrequencyType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType Daily { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType Weekly { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType left, Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType left, Azure.ResourceManager.SqlVirtualMachine.Models.FullBackupFrequencyType right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlStorageSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Info : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlStorageSettings() { } - public string DefaultFilePath { get { throw null; } set { } } - public System.Collections.Generic.IList Luns { get { throw null; } } + internal Info() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.OperationDisplay Display { get { throw null; } } + public string Name { get { throw null; } } + public Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin? Origin { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Properties { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + 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; } } - public partial class SqlStorageUpdateSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class KeyVaultCredentialSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - 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 { } } + public KeyVaultCredentialSettings() { } + public string AzureKeyVaultUri { get { throw null; } set { } } + public string CredentialName { get { throw null; } set { } } + public bool? Enable { get { throw null; } set { } } + public string ServicePrincipalName { get { throw null; } set { } } + public string ServicePrincipalSecret { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.KeyVaultCredentialSettings 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.KeyVaultCredentialSettings 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 SqlTempDBSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LeastPrivilegeMode : System.IEquatable { - public SqlTempDBSettings() { } - public int? DataFileCount { get { throw null; } set { } } - public int? DataFileSize { get { throw null; } set { } } - public int? DataGrowth { get { throw null; } set { } } - public string DefaultFilePath { get { throw null; } set { } } - public int? LogFileSize { get { throw null; } set { } } - public int? LogGrowth { get { throw null; } set { } } - public System.Collections.Generic.IList LogicalUnitNumbers { get { throw null; } } - public bool? PersistFolder { get { throw null; } set { } } - public string PersistFolderPath { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } + 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; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode left, Azure.ResourceManager.SqlVirtualMachine.Models.LeastPrivilegeMode right) { throw null; } + public override string ToString() { throw null; } } - public enum SqlVmAssessmentDayOfWeek + public partial class LoadBalancerConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - Monday = 0, - Tuesday = 1, - Wednesday = 2, - Thursday = 3, - Friday = 4, - Saturday = 5, - Sunday = 6, + public LoadBalancerConfiguration() { } + public string LoadBalancerResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.PrivateIPAddress PrivateIPAddress { get { throw null; } set { } } + public int? ProbePort { get { throw null; } set { } } + public string PublicIPAddressResourceId { get { throw null; } set { } } + public System.Collections.Generic.IList SqlVirtualMachineInstances { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.LoadBalancerConfiguration 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.LoadBalancerConfiguration 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 SqlVmAssessmentSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class MultiSubnetIPConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmAssessmentSchedule() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAssessmentDayOfWeek? DayOfWeek { get { throw null; } set { } } - public bool? IsEnabled { get { throw null; } set { } } - public int? MonthlyOccurrence { get { throw null; } set { } } - public string StartTime { get { throw null; } set { } } - public int? WeeklyInterval { get { throw null; } set { } } + public MultiSubnetIPConfiguration(Azure.ResourceManager.SqlVirtualMachine.Models.PrivateIPAddress privateIPAddress, string sqlVirtualMachineInstance) { } + public Azure.ResourceManager.SqlVirtualMachine.Models.PrivateIPAddress PrivateIPAddress { get { throw null; } set { } } + public string SqlVirtualMachineInstance { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + 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 SqlVmAssessmentSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class OperationDisplay : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - 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 { } } + internal OperationDisplay() { } + 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.OperationDisplay 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.OperationDisplay 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 SqlVmAutoBackupDayOfWeek : System.IEquatable + public readonly partial struct OperationOrigin : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmAutoBackupDayOfWeek(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Friday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Monday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Saturday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Sunday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Thursday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Tuesday { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek Wednesday { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek other) { throw null; } + public OperationOrigin(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin System { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin User { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmAutoBackupDayOfWeek right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin left, Azure.ResourceManager.SqlVirtualMachine.Models.OperationOrigin right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlVmAutoBackupSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class OperationProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmAutoBackupSettings() { } - public bool? AreSystemDbsIncludedInBackup { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType? BackupScheduleType { get { throw null; } set { } } - public System.Collections.Generic.IList DaysOfWeek { get { throw null; } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency? FullBackupFrequency { get { throw null; } set { } } - public int? FullBackupStartHour { get { throw null; } set { } } - public int? FullBackupWindowHours { get { throw null; } set { } } - public bool? IsEnabled { get { throw null; } set { } } - public bool? IsEncryptionEnabled { get { throw null; } set { } } - public int? LogBackupFrequency { get { throw null; } set { } } - public string Password { get { throw null; } set { } } - public int? RetentionPeriodInDays { get { throw null; } set { } } - public string StorageAccessKey { get { throw null; } set { } } - public System.Uri StorageAccountUri { get { throw null; } set { } } - public string StorageContainerName { get { throw null; } set { } } + internal OperationProperty() { } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + 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; } } - public enum SqlVmAutoPatchingDayOfWeek + public enum OSType { - Everyday = 0, - Monday = 1, - Tuesday = 2, - Wednesday = 3, - Thursday = 4, - Friday = 5, - Saturday = 6, - Sunday = 7, + Windows = 0, + Linux = 1, } - public partial class SqlVmAutoPatchingSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PrivateIPAddress : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmAutoPatchingSettings() { } - 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 { } } + public PrivateIPAddress() { } + public string IPAddress { get { throw null; } set { } } + public string SubnetResourceId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.PrivateIPAddress 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.PrivateIPAddress 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 SqlVmClusterConfiguration : System.IEquatable + public readonly partial struct ReadableSecondary : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmClusterConfiguration(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration Domainful { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration other) { throw null; } + public ReadableSecondary(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary All { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary No { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary ReadOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterConfiguration right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary left, Azure.ResourceManager.SqlVirtualMachine.Models.ReadableSecondary right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlVmClusterManagerType : System.IEquatable + public readonly partial struct Role : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmClusterManagerType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType WindowsServerFailoverCluster { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType other) { throw null; } + public Role(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Role Primary { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.Role Secondary { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.Role other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterManagerType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.Role left, Azure.ResourceManager.SqlVirtualMachine.Models.Role right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.Role (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.Role left, Azure.ResourceManager.SqlVirtualMachine.Models.Role right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlVmClusterSubnetType : System.IEquatable + public readonly partial struct ScaleType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmClusterSubnetType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType MultiSubnet { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType SingleSubnet { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType other) { throw null; } + public ScaleType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType HA { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.ScaleType right) { throw null; } public override string ToString() { throw null; } } + public partial class Schedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public Schedule() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.AssessmentDayOfWeek? DayOfWeek { get { throw null; } set { } } + public bool? Enable { get { throw null; } set { } } + public int? MonthlyOccurrence { get { throw null; } set { } } + public string StartTime { get { throw null; } set { } } + public int? WeeklyInterval { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.Schedule 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.Schedule 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 ServerConfigurationsManagementSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServerConfigurationsManagementSettings() { } + 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.ServerConfigurationsManagementSettings 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.ServerConfigurationsManagementSettings 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 SqlConnectivityUpdateSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlConnectivityUpdateSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.ConnectivityType? ConnectivityType { get { throw null; } set { } } + public int? Port { get { throw null; } set { } } + public string SqlAuthUpdatePassword { get { throw null; } set { } } + public string SqlAuthUpdateUserName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + 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; } + 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 SqlImageSku : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlImageSku(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Developer { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Enterprise { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Express { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Standard { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku Web { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlImageSku right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SQLInstanceSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SQLInstanceSettings() { } + public string Collation { get { throw null; } set { } } + public bool? IsIfiEnabled { get { throw null; } set { } } + public bool? IsLpimEnabled { get { throw null; } set { } } + public bool? IsOptimizeForAdHocWorkloadsEnabled { get { throw null; } set { } } + public int? MaxDop { get { throw null; } set { } } + public int? MaxServerMemoryMB { get { throw null; } set { } } + public int? MinServerMemoryMB { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + 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; } + 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 + public readonly partial struct SqlManagementMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmDiskConfigurationType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType Add { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType Extend { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType New { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType other) { throw null; } + public SqlManagementMode(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode Full { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode LightWeight { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode NoAgent { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType right) { 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlManagementMode right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SqlVmFullBackupFrequency : System.IEquatable + public readonly partial struct SqlServerLicenseType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmFullBackupFrequency(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency Daily { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency Weekly { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency other) { throw null; } + public SqlServerLicenseType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType AHUB { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType DR { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType PAYG { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmFullBackupFrequency right) { 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlServerLicenseType right) { throw null; } public override string ToString() { throw null; } } + public partial class SQLStorageSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + 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; } + 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 SqlStorageUpdateSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlStorageUpdateSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType? DiskConfigurationType { get { throw null; } set { } } + public int? DiskCount { get { throw null; } set { } } + public int? StartingDeviceId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + 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; } + 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 SQLTempDbSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SQLTempDbSettings() { } + public int? DataFileCount { get { throw null; } set { } } + public int? DataFileSize { get { throw null; } set { } } + public int? DataGrowth { get { throw null; } set { } } + public string DefaultFilePath { get { throw null; } set { } } + public int? LogFileSize { get { throw null; } set { } } + public int? LogGrowth { get { throw null; } set { } } + public System.Collections.Generic.IList Luns { 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + 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; } + } + public partial class SqlVirtualMachineGroupPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVirtualMachineGroupPatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVirtualMachineGroupPatch 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.SqlVirtualMachineGroupPatch 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 SqlVirtualMachinePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlVirtualMachinePatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.SqlVirtualMachinePatch 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.SqlVirtualMachinePatch 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 SqlVmGroupImageSku : System.IEquatable { @@ -760,162 +985,171 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupImageSku right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlVmGroupPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SqlVmTroubleshooting : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmGroupPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public SqlVmTroubleshooting() { } + public System.DateTimeOffset? EndTimeUtc { get { throw null; } set { } } + public System.DateTimeOffset? StartTimeUtc { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario? TroubleshootingScenario { get { throw null; } set { } } + public string UnhealthyReplicaInfoAvailabilityGroupName { get { throw null; } set { } } + public string VirtualMachineResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + 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 SqlVmGroupScaleType : System.IEquatable + public readonly partial struct SqlWorkloadType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmGroupScaleType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType HA { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType other) { throw null; } + public SqlWorkloadType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType DW { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType GENERAL { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType OLTP { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmGroupScaleType right) { 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType right) { throw null; } public override string ToString() { throw null; } } - public partial class SqlVmKeyVaultCredentialSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class StorageConfigurationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SqlVmKeyVaultCredentialSettings() { } - public System.Uri AzureKeyVaultUri { get { throw null; } set { } } - public string CredentialName { get { throw null; } set { } } - public bool? IsEnabled { get { throw null; } set { } } - public string ServicePrincipalName { get { throw null; } set { } } - public string ServicePrincipalSecret { get { throw null; } set { } } + public StorageConfigurationSettings() { } + public Azure.ResourceManager.SqlVirtualMachine.Models.DiskConfigurationType? DiskConfigurationType { get { throw null; } set { } } + public bool? EnableStorageConfigBlade { 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 bool? SqlSystemDbOnDataDisk { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.SQLTempDbSettings SqlTempDbSettings { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType? StorageWorkloadType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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 SqlVmPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SqlVmPatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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 SqlVmStorageConfigurationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SqlVmStorageConfigurationSettings() { } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmDiskConfigurationType? DiskConfigurationType { 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 void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.StorageConfigurationSettings 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.StorageConfigurationSettings 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 SqlVmStorageWorkloadType : System.IEquatable + public readonly partial struct StorageWorkloadType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlVmStorageWorkloadType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType DW { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType General { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType Oltp { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType other) { throw null; } + public StorageWorkloadType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType DW { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType GENERAL { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType OLTP { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmStorageWorkloadType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.StorageWorkloadType 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 + public readonly partial struct TroubleshootingScenario : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqlWorkloadType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType DW { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType General { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType Oltp { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType other) { throw null; } + public TroubleshootingScenario(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario UnhealthyReplica { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqlWorkloadType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario left, Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario left, Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario right) { throw null; } public override string ToString() { throw null; } } + public partial class TroubleshootingStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal TroubleshootingStatus() { } + 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 Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingScenario? TroubleshootingScenario { get { throw null; } } + public string UnhealthyReplicaInfoAvailabilityGroupName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.TroubleshootingStatus 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.TroubleshootingStatus 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 VirtualMachineIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VirtualMachineIdentity() { } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType? Type { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SqlVirtualMachine.Models.VirtualMachineIdentity 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.VirtualMachineIdentity 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 SqVmBackupScheduleType : System.IEquatable + public readonly partial struct VmIdentityType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SqVmBackupScheduleType(string value) { throw null; } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType Automated { get { throw null; } } - public static Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType Manual { get { throw null; } } - public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType other) { throw null; } + public VmIdentityType(string value) { throw null; } + public static Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType None { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType SystemAssigned { get { throw null; } } + public static Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType UserAssigned { get { throw null; } } + public bool Equals(Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] 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 bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType left, Azure.ResourceManager.SqlVirtualMachine.Models.SqVmBackupScheduleType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType left, Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType right) { throw null; } + public static implicit operator Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType left, Azure.ResourceManager.SqlVirtualMachine.Models.VmIdentityType right) { throw null; } public override string ToString() { throw null; } } - public partial class WindowsServerFailoverClusterDomainCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class WsfcDomainCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public WindowsServerFailoverClusterDomainCredentials() { } + public WsfcDomainCredentials() { } public string ClusterBootstrapAccountPassword { get { throw null; } set { } } public string ClusterOperatorAccountPassword { get { throw null; } set { } } public string SqlServiceAccountPassword { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainCredentials 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.WsfcDomainCredentials 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 WindowsServerFailoverClusterDomainProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class WsfcDomainProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public WindowsServerFailoverClusterDomainProfile() { } + public WsfcDomainProfile() { } public string ClusterBootstrapAccount { get { throw null; } set { } } public string ClusterOperatorAccount { get { throw null; } set { } } - public Azure.ResourceManager.SqlVirtualMachine.Models.SqlVmClusterSubnetType? ClusterSubnetType { get { throw null; } set { } } + public Azure.ResourceManager.SqlVirtualMachine.Models.ClusterSubnetType? ClusterSubnetType { get { throw null; } set { } } public string DomainFqdn { get { throw null; } set { } } public string FileShareWitnessPath { get { throw null; } set { } } - public string OrganizationalUnitPath { get { throw null; } set { } } + public bool? IsSqlServiceAccountGmsa { get { throw null; } set { } } + public string OuPath { 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 { } } + public string StorageAccountUri { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - 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; } - 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; } + Azure.ResourceManager.SqlVirtualMachine.Models.WsfcDomainProfile 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.WsfcDomainProfile 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; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_AvailabilityGroupListenerCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_AvailabilityGroupListenerCollection.cs index 4c2b7893e93d..0bf8b31d9a0f 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_AvailabilityGroupListenerCollection.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_AvailabilityGroupListenerCollection.cs @@ -6,11 +6,9 @@ #nullable disable using System; -using System.Net; using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.SqlVirtualMachine.Models; using NUnit.Framework; namespace Azure.ResourceManager.SqlVirtualMachine.Samples @@ -21,43 +19,28 @@ public partial class Sample_AvailabilityGroupListenerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesAnAvailabilityGroupListenerUsingLoadBalancerThisIsUsedForVMsPresentInSingleSubnet() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateAvailabilityGroupListener.json - // this example is just showing the usage of "AvailabilityGroupListeners_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/CreateOrUpdateAvailabilityGroupListener.json + // this example is just showing the usage of "AvailabilityGroupListener_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SqlVmGroupResource created on azure - // for more information of creating SqlVmGroupResource, please refer to the document of SqlVmGroupResource + // this example assumes you already have this SqlVirtualMachineGroupResource created on azure + // for more information of creating SqlVirtualMachineGroupResource, please refer to the document of SqlVirtualMachineGroupResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; - string sqlVmGroupName = "testvmgroup"; - ResourceIdentifier sqlVmGroupResourceId = SqlVmGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVmGroupName); - SqlVmGroupResource sqlVmGroup = client.GetSqlVmGroupResource(sqlVmGroupResourceId); + string sqlVirtualMachineGroupName = "testvmgroup"; + ResourceIdentifier sqlVirtualMachineGroupResourceId = SqlVirtualMachineGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource sqlVirtualMachineGroup = client.GetSqlVirtualMachineGroupResource(sqlVirtualMachineGroupResourceId); // get the collection of this AvailabilityGroupListenerResource - AvailabilityGroupListenerCollection collection = sqlVmGroup.GetAvailabilityGroupListeners(); + AvailabilityGroupListenerCollection collection = sqlVirtualMachineGroup.GetAvailabilityGroupListeners(); // invoke the operation string availabilityGroupListenerName = "agl-test"; - AvailabilityGroupListenerData data = new AvailabilityGroupListenerData - { - AvailabilityGroupName = "ag-test", - LoadBalancerConfigurations = {new AvailabilityGroupListenerLoadBalancerConfiguration -{ -PrivateIPAddress = new AvailabilityGroupListenerPrivateIPAddress -{ -IPAddress = IPAddress.Parse("10.1.0.112"), -SubnetResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), -}, -LoadBalancerResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test"), -ProbePort = 59983, -SqlVmInstances = {new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2"), new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3")}, -}}, - Port = 1433, - }; + AvailabilityGroupListenerData data = new AvailabilityGroupListenerData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, availabilityGroupListenerName, data); AvailabilityGroupListenerResource result = lro.Value; @@ -72,41 +55,28 @@ public async Task CreateOrUpdate_CreatesOrUpdatesAnAvailabilityGroupListenerUsin [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesAnAvailabilityGroupListenerThisIsUsedForVMsPresentInMultiSubnet() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json - // this example is just showing the usage of "AvailabilityGroupListeners_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json + // this example is just showing the usage of "AvailabilityGroupListener_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SqlVmGroupResource created on azure - // for more information of creating SqlVmGroupResource, please refer to the document of SqlVmGroupResource + // this example assumes you already have this SqlVirtualMachineGroupResource created on azure + // for more information of creating SqlVirtualMachineGroupResource, please refer to the document of SqlVirtualMachineGroupResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; - string sqlVmGroupName = "testvmgroup"; - ResourceIdentifier sqlVmGroupResourceId = SqlVmGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVmGroupName); - SqlVmGroupResource sqlVmGroup = client.GetSqlVmGroupResource(sqlVmGroupResourceId); + string sqlVirtualMachineGroupName = "testvmgroup"; + ResourceIdentifier sqlVirtualMachineGroupResourceId = SqlVirtualMachineGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource sqlVirtualMachineGroup = client.GetSqlVirtualMachineGroupResource(sqlVirtualMachineGroupResourceId); // get the collection of this AvailabilityGroupListenerResource - AvailabilityGroupListenerCollection collection = sqlVmGroup.GetAvailabilityGroupListeners(); + AvailabilityGroupListenerCollection collection = sqlVirtualMachineGroup.GetAvailabilityGroupListeners(); // invoke the operation string availabilityGroupListenerName = "agl-test"; - AvailabilityGroupListenerData data = new AvailabilityGroupListenerData - { - AvailabilityGroupName = "ag-test", - MultiSubnetIPConfigurations = {new MultiSubnetIPConfiguration(new AvailabilityGroupListenerPrivateIPAddress -{ -IPAddress = IPAddress.Parse("10.0.0.112"), -SubnetResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), -}, "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2"), new MultiSubnetIPConfiguration(new AvailabilityGroupListenerPrivateIPAddress -{ -IPAddress = IPAddress.Parse("10.0.1.112"), -SubnetResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate"), -}, "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1")}, - Port = 1433, - }; + AvailabilityGroupListenerData data = new AvailabilityGroupListenerData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, availabilityGroupListenerName, data); AvailabilityGroupListenerResource result = lro.Value; @@ -121,24 +91,24 @@ public async Task CreateOrUpdate_CreatesOrUpdatesAnAvailabilityGroupListenerThis [Ignore("Only validating compilation of examples")] public async Task Get_GetsAnAvailabilityGroupListener() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/GetAvailabilityGroupListener.json - // this example is just showing the usage of "AvailabilityGroupListeners_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/GetAvailabilityGroupListener.json + // this example is just showing the usage of "AvailabilityGroupListener_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SqlVmGroupResource created on azure - // for more information of creating SqlVmGroupResource, please refer to the document of SqlVmGroupResource + // this example assumes you already have this SqlVirtualMachineGroupResource created on azure + // for more information of creating SqlVirtualMachineGroupResource, please refer to the document of SqlVirtualMachineGroupResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; - string sqlVmGroupName = "testvmgroup"; - ResourceIdentifier sqlVmGroupResourceId = SqlVmGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVmGroupName); - SqlVmGroupResource sqlVmGroup = client.GetSqlVmGroupResource(sqlVmGroupResourceId); + string sqlVirtualMachineGroupName = "testvmgroup"; + ResourceIdentifier sqlVirtualMachineGroupResourceId = SqlVirtualMachineGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource sqlVirtualMachineGroup = client.GetSqlVirtualMachineGroupResource(sqlVirtualMachineGroupResourceId); // get the collection of this AvailabilityGroupListenerResource - AvailabilityGroupListenerCollection collection = sqlVmGroup.GetAvailabilityGroupListeners(); + AvailabilityGroupListenerCollection collection = sqlVirtualMachineGroup.GetAvailabilityGroupListeners(); // invoke the operation string availabilityGroupListenerName = "agl-test"; @@ -155,24 +125,24 @@ public async Task Get_GetsAnAvailabilityGroupListener() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsAllAvailabilityGroupListenersInASQLVirtualMachineGroup() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListByGroupAvailabilityGroupListener.json - // this example is just showing the usage of "AvailabilityGroupListeners_ListByGroup" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/ListByGroupAvailabilityGroupListener.json + // this example is just showing the usage of "AvailabilityGroupListener_ListByGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SqlVmGroupResource created on azure - // for more information of creating SqlVmGroupResource, please refer to the document of SqlVmGroupResource + // this example assumes you already have this SqlVirtualMachineGroupResource created on azure + // for more information of creating SqlVirtualMachineGroupResource, please refer to the document of SqlVirtualMachineGroupResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; - string sqlVmGroupName = "testvmgroup"; - ResourceIdentifier sqlVmGroupResourceId = SqlVmGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVmGroupName); - SqlVmGroupResource sqlVmGroup = client.GetSqlVmGroupResource(sqlVmGroupResourceId); + string sqlVirtualMachineGroupName = "testvmgroup"; + ResourceIdentifier sqlVirtualMachineGroupResourceId = SqlVirtualMachineGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource sqlVirtualMachineGroup = client.GetSqlVirtualMachineGroupResource(sqlVirtualMachineGroupResourceId); // get the collection of this AvailabilityGroupListenerResource - AvailabilityGroupListenerCollection collection = sqlVmGroup.GetAvailabilityGroupListeners(); + AvailabilityGroupListenerCollection collection = sqlVirtualMachineGroup.GetAvailabilityGroupListeners(); // invoke the operation and iterate over the result await foreach (AvailabilityGroupListenerResource item in collection.GetAllAsync()) @@ -191,24 +161,24 @@ public async Task GetAll_ListsAllAvailabilityGroupListenersInASQLVirtualMachineG [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAnAvailabilityGroupListener() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/GetAvailabilityGroupListener.json - // this example is just showing the usage of "AvailabilityGroupListeners_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/GetAvailabilityGroupListener.json + // this example is just showing the usage of "AvailabilityGroupListener_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SqlVmGroupResource created on azure - // for more information of creating SqlVmGroupResource, please refer to the document of SqlVmGroupResource + // this example assumes you already have this SqlVirtualMachineGroupResource created on azure + // for more information of creating SqlVirtualMachineGroupResource, please refer to the document of SqlVirtualMachineGroupResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; - string sqlVmGroupName = "testvmgroup"; - ResourceIdentifier sqlVmGroupResourceId = SqlVmGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVmGroupName); - SqlVmGroupResource sqlVmGroup = client.GetSqlVmGroupResource(sqlVmGroupResourceId); + string sqlVirtualMachineGroupName = "testvmgroup"; + ResourceIdentifier sqlVirtualMachineGroupResourceId = SqlVirtualMachineGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource sqlVirtualMachineGroup = client.GetSqlVirtualMachineGroupResource(sqlVirtualMachineGroupResourceId); // get the collection of this AvailabilityGroupListenerResource - AvailabilityGroupListenerCollection collection = sqlVmGroup.GetAvailabilityGroupListeners(); + AvailabilityGroupListenerCollection collection = sqlVirtualMachineGroup.GetAvailabilityGroupListeners(); // invoke the operation string availabilityGroupListenerName = "agl-test"; @@ -221,24 +191,24 @@ public async Task Exists_GetsAnAvailabilityGroupListener() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAnAvailabilityGroupListener() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/GetAvailabilityGroupListener.json - // this example is just showing the usage of "AvailabilityGroupListeners_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/GetAvailabilityGroupListener.json + // this example is just showing the usage of "AvailabilityGroupListener_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); // authenticate your client ArmClient client = new ArmClient(cred); - // this example assumes you already have this SqlVmGroupResource created on azure - // for more information of creating SqlVmGroupResource, please refer to the document of SqlVmGroupResource + // this example assumes you already have this SqlVirtualMachineGroupResource created on azure + // for more information of creating SqlVirtualMachineGroupResource, please refer to the document of SqlVirtualMachineGroupResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; - string sqlVmGroupName = "testvmgroup"; - ResourceIdentifier sqlVmGroupResourceId = SqlVmGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVmGroupName); - SqlVmGroupResource sqlVmGroup = client.GetSqlVmGroupResource(sqlVmGroupResourceId); + string sqlVirtualMachineGroupName = "testvmgroup"; + ResourceIdentifier sqlVirtualMachineGroupResourceId = SqlVirtualMachineGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource sqlVirtualMachineGroup = client.GetSqlVirtualMachineGroupResource(sqlVirtualMachineGroupResourceId); // get the collection of this AvailabilityGroupListenerResource - AvailabilityGroupListenerCollection collection = sqlVmGroup.GetAvailabilityGroupListeners(); + AvailabilityGroupListenerCollection collection = sqlVirtualMachineGroup.GetAvailabilityGroupListeners(); // invoke the operation string availabilityGroupListenerName = "agl-test"; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_AvailabilityGroupListenerResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_AvailabilityGroupListenerResource.cs index 845ed7eb5ad0..7be14b27ebd1 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_AvailabilityGroupListenerResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_AvailabilityGroupListenerResource.cs @@ -6,11 +6,9 @@ #nullable disable using System; -using System.Net; using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.SqlVirtualMachine.Models; using NUnit.Framework; namespace Azure.ResourceManager.SqlVirtualMachine.Samples @@ -21,8 +19,8 @@ public partial class Sample_AvailabilityGroupListenerResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAnAvailabilityGroupListener() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/GetAvailabilityGroupListener.json - // this example is just showing the usage of "AvailabilityGroupListeners_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/GetAvailabilityGroupListener.json + // this example is just showing the usage of "AvailabilityGroupListener_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -33,9 +31,9 @@ public async Task Get_GetsAnAvailabilityGroupListener() // for more information of creating AvailabilityGroupListenerResource, please refer to the document of AvailabilityGroupListenerResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; - string sqlVmGroupName = "testvmgroup"; + string sqlVirtualMachineGroupName = "testvmgroup"; string availabilityGroupListenerName = "agl-test"; - ResourceIdentifier availabilityGroupListenerResourceId = AvailabilityGroupListenerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName); + ResourceIdentifier availabilityGroupListenerResourceId = AvailabilityGroupListenerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName); AvailabilityGroupListenerResource availabilityGroupListener = client.GetAvailabilityGroupListenerResource(availabilityGroupListenerResourceId); // invoke the operation @@ -52,8 +50,8 @@ public async Task Get_GetsAnAvailabilityGroupListener() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAnAvailabilityGroupListener() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/DeleteAvailabilityGroupListener.json - // this example is just showing the usage of "AvailabilityGroupListeners_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/DeleteAvailabilityGroupListener.json + // this example is just showing the usage of "AvailabilityGroupListener_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -64,9 +62,9 @@ public async Task Delete_DeletesAnAvailabilityGroupListener() // for more information of creating AvailabilityGroupListenerResource, please refer to the document of AvailabilityGroupListenerResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; - string sqlVmGroupName = "testvmgroup"; + string sqlVirtualMachineGroupName = "testvmgroup"; string availabilityGroupListenerName = "agl-test"; - ResourceIdentifier availabilityGroupListenerResourceId = AvailabilityGroupListenerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName); + ResourceIdentifier availabilityGroupListenerResourceId = AvailabilityGroupListenerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName); AvailabilityGroupListenerResource availabilityGroupListener = client.GetAvailabilityGroupListenerResource(availabilityGroupListenerResourceId); // invoke the operation @@ -79,8 +77,8 @@ public async Task Delete_DeletesAnAvailabilityGroupListener() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesAnAvailabilityGroupListenerUsingLoadBalancerThisIsUsedForVMsPresentInSingleSubnet() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateAvailabilityGroupListener.json - // this example is just showing the usage of "AvailabilityGroupListeners_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/CreateOrUpdateAvailabilityGroupListener.json + // this example is just showing the usage of "AvailabilityGroupListener_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -91,28 +89,13 @@ public async Task Update_CreatesOrUpdatesAnAvailabilityGroupListenerUsingLoadBal // for more information of creating AvailabilityGroupListenerResource, please refer to the document of AvailabilityGroupListenerResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; - string sqlVmGroupName = "testvmgroup"; + string sqlVirtualMachineGroupName = "testvmgroup"; string availabilityGroupListenerName = "agl-test"; - ResourceIdentifier availabilityGroupListenerResourceId = AvailabilityGroupListenerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName); + ResourceIdentifier availabilityGroupListenerResourceId = AvailabilityGroupListenerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName); AvailabilityGroupListenerResource availabilityGroupListener = client.GetAvailabilityGroupListenerResource(availabilityGroupListenerResourceId); // invoke the operation - AvailabilityGroupListenerData data = new AvailabilityGroupListenerData - { - AvailabilityGroupName = "ag-test", - LoadBalancerConfigurations = {new AvailabilityGroupListenerLoadBalancerConfiguration -{ -PrivateIPAddress = new AvailabilityGroupListenerPrivateIPAddress -{ -IPAddress = IPAddress.Parse("10.1.0.112"), -SubnetResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), -}, -LoadBalancerResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/loadBalancers/lb-test"), -ProbePort = 59983, -SqlVmInstances = {new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2"), new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm3")}, -}}, - Port = 1433, - }; + AvailabilityGroupListenerData data = new AvailabilityGroupListenerData(); ArmOperation lro = await availabilityGroupListener.UpdateAsync(WaitUntil.Completed, data); AvailabilityGroupListenerResource result = lro.Value; @@ -127,8 +110,8 @@ public async Task Update_CreatesOrUpdatesAnAvailabilityGroupListenerUsingLoadBal [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesAnAvailabilityGroupListenerThisIsUsedForVMsPresentInMultiSubnet() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json - // this example is just showing the usage of "AvailabilityGroupListeners_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/CreateOrUpdateAvailabilityGroupListenerWithMultiSubnet.json + // this example is just showing the usage of "AvailabilityGroupListener_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -139,26 +122,13 @@ public async Task Update_CreatesOrUpdatesAnAvailabilityGroupListenerThisIsUsedFo // for more information of creating AvailabilityGroupListenerResource, please refer to the document of AvailabilityGroupListenerResource string subscriptionId = "00000000-1111-2222-3333-444444444444"; string resourceGroupName = "testrg"; - string sqlVmGroupName = "testvmgroup"; + string sqlVirtualMachineGroupName = "testvmgroup"; string availabilityGroupListenerName = "agl-test"; - ResourceIdentifier availabilityGroupListenerResourceId = AvailabilityGroupListenerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName); + ResourceIdentifier availabilityGroupListenerResourceId = AvailabilityGroupListenerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName); AvailabilityGroupListenerResource availabilityGroupListener = client.GetAvailabilityGroupListenerResource(availabilityGroupListenerResourceId); // invoke the operation - AvailabilityGroupListenerData data = new AvailabilityGroupListenerData - { - AvailabilityGroupName = "ag-test", - MultiSubnetIPConfigurations = {new MultiSubnetIPConfiguration(new AvailabilityGroupListenerPrivateIPAddress -{ -IPAddress = IPAddress.Parse("10.0.0.112"), -SubnetResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"), -}, "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm2"), new MultiSubnetIPConfiguration(new AvailabilityGroupListenerPrivateIPAddress -{ -IPAddress = IPAddress.Parse("10.0.1.112"), -SubnetResourceId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/alternate"), -}, "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm1")}, - Port = 1433, - }; + AvailabilityGroupListenerData data = new AvailabilityGroupListenerData(); ArmOperation lro = await availabilityGroupListener.UpdateAsync(WaitUntil.Completed, data); AvailabilityGroupListenerResource result = lro.Value; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineCollection.cs new file mode 100644 index 000000000000..f96277ad82e5 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineCollection.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.SqlVirtualMachine.Samples +{ + public partial class Sample_SqlVirtualMachineCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatesOrUpdatesASQLVirtualMachineForAutomatedBackUpSettingsWithWeeklyAndDaysOfTheWeekToRunTheBackUp() + { + // Generated from example definition: 2023-10-01/CreateOrUpdateSqlVirtualMachineAutomatedBackupWeekly.json + // this example is just showing the usage of "SqlVirtualMachine_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation + string sqlVirtualMachineName = "testvm"; + SqlVirtualMachineData data = new SqlVirtualMachineData(default); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sqlVirtualMachineName, data); + SqlVirtualMachineResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatesOrUpdatesASQLVirtualMachineWithMaxParameters() + { + // Generated from example definition: 2023-10-01/CreateOrUpdateSqlVirtualMachineMAX.json + // this example is just showing the usage of "SqlVirtualMachine_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation + string sqlVirtualMachineName = "testvm"; + SqlVirtualMachineData data = new SqlVirtualMachineData(default); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sqlVirtualMachineName, data); + SqlVirtualMachineResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatesOrUpdatesASQLVirtualMachineWithMinParameters() + { + // Generated from example definition: 2023-10-01/CreateOrUpdateSqlVirtualMachineMIN.json + // this example is just showing the usage of "SqlVirtualMachine_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation + string sqlVirtualMachineName = "testvm"; + SqlVirtualMachineData data = new SqlVirtualMachineData(default); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sqlVirtualMachineName, data); + SqlVirtualMachineResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatesOrUpdatesASQLVirtualMachineForStorageConfigurationSettingsToEXTENDDataLogOrTempDBStoragePool() + { + // Generated from example definition: 2023-10-01/CreateOrUpdateSqlVirtualMachineStorageConfigurationEXTEND.json + // this example is just showing the usage of "SqlVirtualMachine_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation + string sqlVirtualMachineName = "testvm"; + SqlVirtualMachineData data = new SqlVirtualMachineData(default); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sqlVirtualMachineName, data); + SqlVirtualMachineResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatesOrUpdatesASQLVirtualMachineForStorageConfigurationSettingsToNEWDataLogAndTempDBStoragePool() + { + // Generated from example definition: 2023-10-01/CreateOrUpdateSqlVirtualMachineStorageConfigurationNEW.json + // this example is just showing the usage of "SqlVirtualMachine_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation + string sqlVirtualMachineName = "testvm"; + SqlVirtualMachineData data = new SqlVirtualMachineData(default); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sqlVirtualMachineName, data); + SqlVirtualMachineResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatesOrUpdatesASQLVirtualMachineToEnableTheUsageOfVirtualMachineManagedIdentity() + { + // Generated from example definition: 2023-10-01/CreateOrUpdateSqlVirtualMachineVmIdentitySettings.json + // this example is just showing the usage of "SqlVirtualMachine_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation + string sqlVirtualMachineName = "testvm"; + SqlVirtualMachineData data = new SqlVirtualMachineData(default); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sqlVirtualMachineName, data); + SqlVirtualMachineResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatesOrUpdatesASQLVirtualMachineAndJoinsItToASQLVirtualMachineGroup() + { + // Generated from example definition: 2023-10-01/CreateOrUpdateVirtualMachineWithVMGroup.json + // this example is just showing the usage of "SqlVirtualMachine_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation + string sqlVirtualMachineName = "testvm"; + SqlVirtualMachineData data = new SqlVirtualMachineData(default); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sqlVirtualMachineName, data); + SqlVirtualMachineResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsASQLVirtualMachine() + { + // Generated from example definition: 2023-10-01/GetSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachine_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation + string sqlVirtualMachineName = "testvm"; + SqlVirtualMachineResource result = await collection.GetAsync(sqlVirtualMachineName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_GetsAllSQLVirtualMachinesInAResourceGroup() + { + // Generated from example definition: 2023-10-01/ListByResourceGroupSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachine_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation and iterate over the result + await foreach (SqlVirtualMachineResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsASQLVirtualMachine() + { + // Generated from example definition: 2023-10-01/GetSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachine_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation + string sqlVirtualMachineName = "testvm"; + bool result = await collection.ExistsAsync(sqlVirtualMachineName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsASQLVirtualMachine() + { + // Generated from example definition: 2023-10-01/GetSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachine_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineResource + SqlVirtualMachineCollection collection = resourceGroupResource.GetSqlVirtualMachines(); + + // invoke the operation + string sqlVirtualMachineName = "testvm"; + NullableResponse response = await collection.GetIfExistsAsync(sqlVirtualMachineName); + SqlVirtualMachineResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineGroupCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineGroupCollection.cs new file mode 100644 index 000000000000..0e96c3389cb6 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineGroupCollection.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.SqlVirtualMachine.Samples +{ + public partial class Sample_SqlVirtualMachineGroupCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_CreatesOrUpdatesASQLVirtualMachineGroup() + { + // Generated from example definition: 2023-10-01/CreateOrUpdateSqlVirtualMachineGroup.json + // this example is just showing the usage of "SqlVirtualMachineGroup_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineGroupResource + SqlVirtualMachineGroupCollection collection = resourceGroupResource.GetSqlVirtualMachineGroups(); + + // invoke the operation + string sqlVirtualMachineGroupName = "testvmgroup"; + SqlVirtualMachineGroupData data = new SqlVirtualMachineGroupData(default); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, sqlVirtualMachineGroupName, data); + SqlVirtualMachineGroupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsASQLVirtualMachineGroup() + { + // Generated from example definition: 2023-10-01/GetSqlVirtualMachineGroup.json + // this example is just showing the usage of "SqlVirtualMachineGroup_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineGroupResource + SqlVirtualMachineGroupCollection collection = resourceGroupResource.GetSqlVirtualMachineGroups(); + + // invoke the operation + string sqlVirtualMachineGroupName = "testvmgroup"; + SqlVirtualMachineGroupResource result = await collection.GetAsync(sqlVirtualMachineGroupName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_GetsAllSQLVirtualMachineGroupsInAResourceGroup() + { + // Generated from example definition: 2023-10-01/ListByResourceGroupSqlVirtualMachineGroup.json + // this example is just showing the usage of "SqlVirtualMachineGroup_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineGroupResource + SqlVirtualMachineGroupCollection collection = resourceGroupResource.GetSqlVirtualMachineGroups(); + + // invoke the operation and iterate over the result + await foreach (SqlVirtualMachineGroupResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineGroupData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetsASQLVirtualMachineGroup() + { + // Generated from example definition: 2023-10-01/GetSqlVirtualMachineGroup.json + // this example is just showing the usage of "SqlVirtualMachineGroup_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineGroupResource + SqlVirtualMachineGroupCollection collection = resourceGroupResource.GetSqlVirtualMachineGroups(); + + // invoke the operation + string sqlVirtualMachineGroupName = "testvmgroup"; + bool result = await collection.ExistsAsync(sqlVirtualMachineGroupName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsASQLVirtualMachineGroup() + { + // Generated from example definition: 2023-10-01/GetSqlVirtualMachineGroup.json + // this example is just showing the usage of "SqlVirtualMachineGroup_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SqlVirtualMachineGroupResource + SqlVirtualMachineGroupCollection collection = resourceGroupResource.GetSqlVirtualMachineGroups(); + + // invoke the operation + string sqlVirtualMachineGroupName = "testvmgroup"; + NullableResponse response = await collection.GetIfExistsAsync(sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineGroupResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineGroupResource.cs new file mode 100644 index 000000000000..17bba85982c6 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineGroupResource.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SqlVirtualMachine.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SqlVirtualMachine.Samples +{ + public partial class Sample_SqlVirtualMachineGroupResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsASQLVirtualMachineGroup() + { + // Generated from example definition: 2023-10-01/GetSqlVirtualMachineGroup.json + // this example is just showing the usage of "SqlVirtualMachineGroup_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineGroupResource created on azure + // for more information of creating SqlVirtualMachineGroupResource, please refer to the document of SqlVirtualMachineGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineGroupName = "testvmgroup"; + ResourceIdentifier sqlVirtualMachineGroupResourceId = SqlVirtualMachineGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource sqlVirtualMachineGroup = client.GetSqlVirtualMachineGroupResource(sqlVirtualMachineGroupResourceId); + + // invoke the operation + SqlVirtualMachineGroupResource result = await sqlVirtualMachineGroup.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeletesASQLVirtualMachineGroup() + { + // Generated from example definition: 2023-10-01/DeleteSqlVirtualMachineGroup.json + // this example is just showing the usage of "SqlVirtualMachineGroup_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineGroupResource created on azure + // for more information of creating SqlVirtualMachineGroupResource, please refer to the document of SqlVirtualMachineGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineGroupName = "testvmgroup"; + ResourceIdentifier sqlVirtualMachineGroupResourceId = SqlVirtualMachineGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource sqlVirtualMachineGroup = client.GetSqlVirtualMachineGroupResource(sqlVirtualMachineGroupResourceId); + + // invoke the operation + await sqlVirtualMachineGroup.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdatesASQLVirtualMachineGroupTags() + { + // Generated from example definition: 2023-10-01/UpdateSqlVirtualMachineGroup.json + // this example is just showing the usage of "SqlVirtualMachineGroup_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineGroupResource created on azure + // for more information of creating SqlVirtualMachineGroupResource, please refer to the document of SqlVirtualMachineGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineGroupName = "testvmgroup"; + ResourceIdentifier sqlVirtualMachineGroupResourceId = SqlVirtualMachineGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource sqlVirtualMachineGroup = client.GetSqlVirtualMachineGroupResource(sqlVirtualMachineGroupResourceId); + + // invoke the operation + SqlVirtualMachineGroupPatch patch = new SqlVirtualMachineGroupPatch(); + ArmOperation lro = await sqlVirtualMachineGroup.UpdateAsync(WaitUntil.Completed, patch); + SqlVirtualMachineGroupResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineGroupData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetBySqlVmGroup_GetsTheListOfSqlVirtualMachinesInASQLVirtualMachineGroup() + { + // Generated from example definition: 2023-10-01/ListBySqlVirtualMachineGroupSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachineGroups_ListBySqlVmGroup" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineGroupResource created on azure + // for more information of creating SqlVirtualMachineGroupResource, please refer to the document of SqlVirtualMachineGroupResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineGroupName = "testvm"; + ResourceIdentifier sqlVirtualMachineGroupResourceId = SqlVirtualMachineGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + SqlVirtualMachineGroupResource sqlVirtualMachineGroup = client.GetSqlVirtualMachineGroupResource(sqlVirtualMachineGroupResourceId); + + // invoke the operation and iterate over the result + await foreach (SqlVirtualMachineResource item in sqlVirtualMachineGroup.GetBySqlVmGroupAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineResource.cs new file mode 100644 index 000000000000..5c4f4947342e --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SqlVirtualMachineResource.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.SqlVirtualMachine.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SqlVirtualMachine.Samples +{ + public partial class Sample_SqlVirtualMachineResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsASQLVirtualMachine() + { + // Generated from example definition: 2023-10-01/GetSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachine_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineResource created on azure + // for more information of creating SqlVirtualMachineResource, please refer to the document of SqlVirtualMachineResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineName = "testvm"; + ResourceIdentifier sqlVirtualMachineResourceId = SqlVirtualMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineName); + SqlVirtualMachineResource sqlVirtualMachine = client.GetSqlVirtualMachineResource(sqlVirtualMachineResourceId); + + // invoke the operation + SqlVirtualMachineResource result = await sqlVirtualMachine.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DeletesASQLVirtualMachine() + { + // Generated from example definition: 2023-10-01/DeleteSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachine_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineResource created on azure + // for more information of creating SqlVirtualMachineResource, please refer to the document of SqlVirtualMachineResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineName = "testvm1"; + ResourceIdentifier sqlVirtualMachineResourceId = SqlVirtualMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineName); + SqlVirtualMachineResource sqlVirtualMachine = client.GetSqlVirtualMachineResource(sqlVirtualMachineResourceId); + + // invoke the operation + await sqlVirtualMachine.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_UpdatesASQLVirtualMachineTags() + { + // Generated from example definition: 2023-10-01/UpdateSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachine_Update" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineResource created on azure + // for more information of creating SqlVirtualMachineResource, please refer to the document of SqlVirtualMachineResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineName = "testvm"; + ResourceIdentifier sqlVirtualMachineResourceId = SqlVirtualMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineName); + SqlVirtualMachineResource sqlVirtualMachine = client.GetSqlVirtualMachineResource(sqlVirtualMachineResourceId); + + // invoke the operation + SqlVirtualMachinePatch patch = new SqlVirtualMachinePatch(); + ArmOperation lro = await sqlVirtualMachine.UpdateAsync(WaitUntil.Completed, patch); + SqlVirtualMachineResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + SqlVirtualMachineData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task StartAssessment_StartsSQLBestPracticesAssessmentOnSQLVirtualMachine() + { + // Generated from example definition: 2023-10-01/StartAssessmentOnSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachines_StartAssessment" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineResource created on azure + // for more information of creating SqlVirtualMachineResource, please refer to the document of SqlVirtualMachineResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineName = "testvm"; + ResourceIdentifier sqlVirtualMachineResourceId = SqlVirtualMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineName); + SqlVirtualMachineResource sqlVirtualMachine = client.GetSqlVirtualMachineResource(sqlVirtualMachineResourceId); + + // invoke the operation + await sqlVirtualMachine.StartAssessmentAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task FetchDCAssessment_StartsSQLBestPracticesAssessmentWithDiskConfigRulesOnSQLVirtualMachine() + { + // Generated from example definition: 2023-10-01/StartDiskConfigAssessmentOnSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachines_FetchDCAssessment" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineResource created on azure + // for more information of creating SqlVirtualMachineResource, please refer to the document of SqlVirtualMachineResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineName = "testvm"; + ResourceIdentifier sqlVirtualMachineResourceId = SqlVirtualMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineName); + SqlVirtualMachineResource sqlVirtualMachine = client.GetSqlVirtualMachineResource(sqlVirtualMachineResourceId); + + // invoke the operation + DiskConfigAssessmentContent content = new DiskConfigAssessmentContent(); + await sqlVirtualMachine.FetchDCAssessmentAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Redeploy_UninstallsAndReinstallsTheSQLIaaSExtension() + { + // Generated from example definition: 2023-10-01/RedeploySqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachines_Redeploy" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineResource created on azure + // for more information of creating SqlVirtualMachineResource, please refer to the document of SqlVirtualMachineResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineName = "testvm"; + ResourceIdentifier sqlVirtualMachineResourceId = SqlVirtualMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineName); + SqlVirtualMachineResource sqlVirtualMachine = client.GetSqlVirtualMachineResource(sqlVirtualMachineResourceId); + + // invoke the operation + await sqlVirtualMachine.RedeployAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Troubleshoot_StartSQLVirtualMachineTroubleshootingOperation() + { + // Generated from example definition: 2023-10-01/TroubleshootSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachines_Troubleshoot" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlVirtualMachineResource created on azure + // for more information of creating SqlVirtualMachineResource, please refer to the document of SqlVirtualMachineResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "testrg"; + string sqlVirtualMachineName = "testvm"; + ResourceIdentifier sqlVirtualMachineResourceId = SqlVirtualMachineResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, sqlVirtualMachineName); + SqlVirtualMachineResource sqlVirtualMachine = client.GetSqlVirtualMachineResource(sqlVirtualMachineResourceId); + + // invoke the operation + SqlVmTroubleshooting sqlVmTroubleshooting = new SqlVmTroubleshooting(); + ArmOperation lro = await sqlVirtualMachine.TroubleshootAsync(WaitUntil.Completed, sqlVmTroubleshooting); + SqlVmTroubleshooting result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 4c360c3df127..d5a82d70f244 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -18,10 +18,10 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task GetSqlVmGroups_GetsAllSQLVirtualMachineGroupsInASubscription() + public async Task GetSqlVirtualMachineGroups_GetsAllSQLVirtualMachineGroupsInASubscription() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListSubscriptionSqlVirtualMachineGroup.json - // this example is just showing the usage of "SqlVirtualMachineGroups_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/ListSubscriptionSqlVirtualMachineGroup.json + // this example is just showing the usage of "SqlVirtualMachineGroup_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -35,11 +35,11 @@ public async Task GetSqlVmGroups_GetsAllSQLVirtualMachineGroupsInASubscription() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (SqlVmGroupResource item in subscriptionResource.GetSqlVmGroupsAsync()) + await foreach (SqlVirtualMachineGroupResource item in subscriptionResource.GetSqlVirtualMachineGroupsAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SqlVmGroupData resourceData = item.Data; + SqlVirtualMachineGroupData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } @@ -49,10 +49,10 @@ public async Task GetSqlVmGroups_GetsAllSQLVirtualMachineGroupsInASubscription() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetSqlVms_GetsAllSQLVirtualMachinesInASubscription() + public async Task GetSqlVirtualMachines_GetsAllSQLVirtualMachinesInASubscription() { - // Generated from example definition: specification/sqlvirtualmachine/resource-manager/Microsoft.SqlVirtualMachine/stable/2022-02-01/examples/ListSubscriptionSqlVirtualMachine.json - // this example is just showing the usage of "SqlVirtualMachines_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2023-10-01/ListSubscriptionSqlVirtualMachine.json + // this example is just showing the usage of "SqlVirtualMachine_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -66,11 +66,11 @@ public async Task GetSqlVms_GetsAllSQLVirtualMachinesInASubscription() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (SqlVmResource item in subscriptionResource.GetSqlVmsAsync()) + await foreach (SqlVirtualMachineResource item in subscriptionResource.GetSqlVirtualMachinesAsync()) { // the variable item is a resource, you could call other operations on this instance as well // but just for demo, we get its data from this resource instance - SqlVmData resourceData = item.Data; + SqlVirtualMachineData resourceData = item.Data; // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_TenantResourceExtensions.cs new file mode 100644 index 000000000000..185c71e182da --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.SqlVirtualMachine.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SqlVirtualMachine.Samples +{ + public partial class Sample_TenantResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetOperations_ListsAllOfTheAvailableSQLVirtualMachineRestAPIOperations() + { + // Generated from example definition: 2023-10-01/ListOperation.json + // this example is just showing the usage of "Operations_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + TenantResource tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current; + + // invoke the operation and iterate over the result + await foreach (Info item in tenantResource.GetOperationsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs index 98798137a3b4..2bc814b9d406 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/ArmSqlVirtualMachineModelFactory.cs @@ -8,7 +8,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Net; using Azure.Core; using Azure.ResourceManager.Models; @@ -17,6 +16,30 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models /// Model factory for models. public static partial class ArmSqlVirtualMachineModelFactory { + /// 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. + /// A new instance for mocking. + public static Info Info(string name = null, OperationDisplay display = null, OperationOrigin? origin = null, IReadOnlyDictionary properties = null) + { + properties ??= new Dictionary(); + + return new Info(name, display, origin, properties, serializedAdditionalRawData: null); + } + + /// 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. + /// A new instance for mocking. + public static OperationDisplay OperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) + { + return new OperationDisplay(provider, resource, operation, description, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -30,11 +53,11 @@ public static partial class ArmSqlVirtualMachineModelFactory /// Listener port. /// Availability Group configuration. /// 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 = 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) { - loadBalancerConfigurations ??= new List(); + loadBalancerConfigurations ??= new List(); multiSubnetIPConfigurations ??= new List(); - availabilityGroupReplicas ??= new List(); + availabilityGroupReplicas ??= new List(); return new AvailabilityGroupListenerData( id, @@ -47,11 +70,11 @@ public static AvailabilityGroupListenerData AvailabilityGroupListenerData(Resour multiSubnetIPConfigurations?.ToList(), createDefaultAvailabilityGroupIfNotExist, port, - availabilityGroupReplicas != null ? new AvailabilityGroupConfiguration(availabilityGroupReplicas?.ToList(), serializedAdditionalRawData: null) : null, + availabilityGroupReplicas != null ? new AgConfiguration(availabilityGroupReplicas?.ToList(), serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -64,13 +87,13 @@ public static AvailabilityGroupListenerData AvailabilityGroupListenerData(Resour /// 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. - 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) + /// Cluster Active Directory domain profile. + /// A new instance for mocking. + public static SqlVirtualMachineGroupData SqlVirtualMachineGroupData(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, ScaleType? scaleType = null, ClusterManagerType? clusterManagerType = null, ClusterConfiguration? clusterConfiguration = null, WsfcDomainProfile wsfcDomainProfile = null) { tags ??= new Dictionary(); - return new SqlVmGroupData( + return new SqlVirtualMachineGroupData( id, name, resourceType, @@ -83,39 +106,45 @@ public static SqlVmGroupData SqlVmGroupData(ResourceIdentifier id = null, string scaleType, clusterManagerType, clusterConfiguration, - windowsServerFailoverClusterDomainProfile, + wsfcDomainProfile, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// 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. + /// DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server. /// 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 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. + /// 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. - /// 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) + /// 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. + /// A new instance for mocking. + public static SqlVirtualMachineData SqlVirtualMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string virtualMachineResourceId = null, string provisioningState = null, string sqlImageOffer = null, SqlServerLicenseType? sqlServerLicenseType = null, SqlManagementMode? sqlManagement = null, LeastPrivilegeMode? leastPrivilegeMode = null, SqlImageSku? sqlImageSku = null, string sqlVirtualMachineGroupResourceId = null, WsfcDomainCredentials wsfcDomainCredentials = null, string wsfcStaticIP = null, AutoPatchingSettings autoPatchingSettings = null, AutoBackupSettings autoBackupSettings = null, KeyVaultCredentialSettings keyVaultCredentialSettings = null, ServerConfigurationsManagementSettings serverConfigurationsManagementSettings = null, StorageConfigurationSettings storageConfigurationSettings = null, TroubleshootingStatus troubleshootingStatus = null, AssessmentSettings assessmentSettings = null, bool? enableAutomaticUpgrade = null, AdditionalOSPatch? additionalVmPatch = null, VirtualMachineIdentity virtualMachineIdentitySettings = null, OSType? osType = null) { tags ??= new Dictionary(); - return new SqlVmData( + return new SqlVirtualMachineData( id, name, resourceType, @@ -128,16 +157,60 @@ public static SqlVmData SqlVmData(ResourceIdentifier id = null, string name = nu sqlImageOffer, sqlServerLicenseType, sqlManagement, + leastPrivilegeMode, sqlImageSku, - sqlVmGroupResourceId, - windowsServerFailoverClusterDomainCredentials, - windowsServerFailoverClusterStaticIP, + sqlVirtualMachineGroupResourceId, + wsfcDomainCredentials, + wsfcStaticIP, autoPatchingSettings, autoBackupSettings, keyVaultCredentialSettings, serverConfigurationsManagementSettings, storageConfigurationSettings, + troubleshootingStatus, assessmentSettings, + enableAutomaticUpgrade, + additionalVmPatch, + virtualMachineIdentitySettings, + osType, + serializedAdditionalRawData: null); + } + + /// 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. + /// A new instance for mocking. + public static TroubleshootingStatus TroubleshootingStatus(string rootCause = null, DateTimeOffset? lastTriggerTimeUtc = null, DateTimeOffset? startTimeUtc = null, DateTimeOffset? endTimeUtc = null, TroubleshootingScenario? troubleshootingScenario = null, string unhealthyReplicaInfoAvailabilityGroupName = null) + { + return new TroubleshootingStatus( + rootCause, + lastTriggerTimeUtc, + startTimeUtc, + endTimeUtc, + troubleshootingScenario, + unhealthyReplicaInfoAvailabilityGroupName != null ? new TroubleshootingAdditionalProperties(new UnhealthyReplicaInfo(unhealthyReplicaInfoAvailabilityGroupName, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// 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. + /// A new instance for mocking. + public static SqlVmTroubleshooting SqlVmTroubleshooting(DateTimeOffset? startTimeUtc = null, DateTimeOffset? endTimeUtc = null, TroubleshootingScenario? troubleshootingScenario = null, string unhealthyReplicaInfoAvailabilityGroupName = null, string virtualMachineResourceId = null) + { + return new SqlVmTroubleshooting( + startTimeUtc, + endTimeUtc, + troubleshootingScenario, + unhealthyReplicaInfoAvailabilityGroupName != null ? new TroubleshootingAdditionalProperties(new UnhealthyReplicaInfo(unhealthyReplicaInfoAvailabilityGroupName, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null, + virtualMachineResourceId, serializedAdditionalRawData: null); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerCollection.cs index 8d28a017a242..014eb0c1b81c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerCollection.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerCollection.cs @@ -19,8 +19,8 @@ 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 . + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAvailabilityGroupListeners method from an instance of . /// public partial class AvailabilityGroupListenerCollection : ArmCollection, IEnumerable, IAsyncEnumerable { @@ -47,8 +47,8 @@ internal AvailabilityGroupListenerCollection(ArmClient client, ResourceIdentifie 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)); + if (id.ResourceType != SqlVirtualMachineGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SqlVirtualMachineGroupResource.ResourceType), nameof(id)); } /// @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// AvailabilityGroupListeners_CreateOrUpdate + /// AvailabilityGroupListener_CreateOrUpdate /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -88,7 +88,7 @@ public virtual async Task> Creat 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); + var operation = new SqlVirtualMachineArmOperation(new AvailabilityGroupListenerOperationSource(Client), _availabilityGroupListenerClientDiagnostics, Pipeline, _availabilityGroupListenerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -109,11 +109,11 @@ public virtual async Task> Creat /// /// /// Operation Id - /// AvailabilityGroupListeners_CreateOrUpdate + /// AvailabilityGroupListener_CreateOrUpdate /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(Wa 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); + var operation = new SqlVirtualMachineArmOperation(new AvailabilityGroupListenerOperationSource(Client), _availabilityGroupListenerClientDiagnostics, Pipeline, _availabilityGroupListenerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, availabilityGroupListenerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -158,11 +158,11 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Operation Id - /// AvailabilityGroupListeners_Get + /// AvailabilityGroupListener_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -204,11 +204,11 @@ public virtual async Task> GetAsync( /// /// /// Operation Id - /// AvailabilityGroupListeners_Get + /// AvailabilityGroupListener_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -250,11 +250,11 @@ public virtual Response Get(string availabili /// /// /// Operation Id - /// AvailabilityGroupListeners_ListByGroup + /// AvailabilityGroupListener_ListByGroup /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -280,11 +280,11 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Operation Id - /// AvailabilityGroupListeners_ListByGroup + /// AvailabilityGroupListener_ListByGroup /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -310,11 +310,11 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Operation Id - /// AvailabilityGroupListeners_Get + /// AvailabilityGroupListener_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -354,11 +354,11 @@ public virtual async Task> ExistsAsync(string availabilityGroupLi /// /// /// Operation Id - /// AvailabilityGroupListeners_Get + /// AvailabilityGroupListener_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -398,11 +398,11 @@ public virtual Response Exists(string availabilityGroupListenerName, strin /// /// /// Operation Id - /// AvailabilityGroupListeners_Get + /// AvailabilityGroupListener_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -444,11 +444,11 @@ public virtual async Task> G /// /// /// Operation Id - /// AvailabilityGroupListeners_Get + /// AvailabilityGroupListener_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource 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 2c9030d07b2e..3b6461a58f66 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.Serialization.cs @@ -113,11 +113,11 @@ internal static AvailabilityGroupListenerData DeserializeAvailabilityGroupListen SystemData systemData = default; string provisioningState = default; string availabilityGroupName = default; - IList loadBalancerConfigurations = default; + IList loadBalancerConfigurations = default; IList multiSubnetIPConfigurations = default; bool? createDefaultAvailabilityGroupIfNotExist = default; int? port = default; - AvailabilityGroupConfiguration availabilityGroupConfiguration = default; + AgConfiguration availabilityGroupConfiguration = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -171,10 +171,10 @@ internal static AvailabilityGroupListenerData DeserializeAvailabilityGroupListen { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(AvailabilityGroupListenerLoadBalancerConfiguration.DeserializeAvailabilityGroupListenerLoadBalancerConfiguration(item, options)); + array.Add(LoadBalancerConfiguration.DeserializeLoadBalancerConfiguration(item, options)); } loadBalancerConfigurations = array; continue; @@ -217,7 +217,7 @@ internal static AvailabilityGroupListenerData DeserializeAvailabilityGroupListen { continue; } - availabilityGroupConfiguration = AvailabilityGroupConfiguration.DeserializeAvailabilityGroupConfiguration(property0.Value, options); + availabilityGroupConfiguration = AgConfiguration.DeserializeAgConfiguration(property0.Value, options); continue; } } @@ -236,7 +236,7 @@ internal static AvailabilityGroupListenerData DeserializeAvailabilityGroupListen systemData, provisioningState, availabilityGroupName, - loadBalancerConfigurations ?? new ChangeTrackingList(), + loadBalancerConfigurations ?? new ChangeTrackingList(), multiSubnetIPConfigurations ?? new ChangeTrackingList(), createDefaultAvailabilityGroupIfNotExist, port, diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.cs index 67fafa5ab268..91079b1f5642 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerData.cs @@ -54,7 +54,7 @@ public partial class AvailabilityGroupListenerData : ResourceData /// Initializes a new instance of . public AvailabilityGroupListenerData() { - LoadBalancerConfigurations = new ChangeTrackingList(); + LoadBalancerConfigurations = new ChangeTrackingList(); MultiSubnetIPConfigurations = new ChangeTrackingList(); } @@ -71,7 +71,7 @@ public AvailabilityGroupListenerData() /// 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) + internal AvailabilityGroupListenerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string provisioningState, string availabilityGroupName, IList loadBalancerConfigurations, IList multiSubnetIPConfigurations, bool? createDefaultAvailabilityGroupIfNotExist, int? port, AgConfiguration availabilityGroupConfiguration, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; AvailabilityGroupName = availabilityGroupName; @@ -88,7 +88,7 @@ internal AvailabilityGroupListenerData(ResourceIdentifier id, string name, Resou /// Name of the availability group. public string AvailabilityGroupName { get; set; } /// List of load balancer configurations for an availability group listener. - public IList LoadBalancerConfigurations { get; } + public IList LoadBalancerConfigurations { get; } /// List of multi subnet IP configurations for an AG listener. public IList MultiSubnetIPConfigurations { get; } /// Create a default availability group if it does not exist. @@ -96,14 +96,14 @@ internal AvailabilityGroupListenerData(ResourceIdentifier id, string name, Resou /// Listener port. public int? Port { get; set; } /// Availability Group configuration. - internal AvailabilityGroupConfiguration AvailabilityGroupConfiguration { get; set; } + internal AgConfiguration AvailabilityGroupConfiguration { get; set; } /// Replica configurations. - public IList AvailabilityGroupReplicas + public IList AvailabilityGroupReplicas { get { if (AvailabilityGroupConfiguration is null) - AvailabilityGroupConfiguration = new AvailabilityGroupConfiguration(); + AvailabilityGroupConfiguration = new AgConfiguration(); return AvailabilityGroupConfiguration.Replicas; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.cs index 3df1f999398b..05d9f0a82647 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.cs @@ -18,18 +18,18 @@ 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. + /// Otherwise you can get one from its parent resource using the GetAvailabilityGroupListener method. /// public partial class AvailabilityGroupListenerResource : ArmResource { /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. - /// The sqlVmGroupName. + /// The sqlVirtualMachineGroupName. /// The availabilityGroupListenerName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName) + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVmGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}/availabilityGroupListeners/{availabilityGroupListenerName}"; return new ResourceIdentifier(resourceId); } @@ -97,11 +97,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// AvailabilityGroupListeners_Get + /// AvailabilityGroupListener_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -138,11 +138,11 @@ public virtual async Task> GetAsync( /// /// /// Operation Id - /// AvailabilityGroupListeners_Get + /// AvailabilityGroupListener_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -179,11 +179,11 @@ public virtual Response Get(string expand = n /// /// /// Operation Id - /// AvailabilityGroupListeners_Delete + /// AvailabilityGroupListener_Delete /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -221,11 +221,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// AvailabilityGroupListeners_Delete + /// AvailabilityGroupListener_Delete /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -263,11 +263,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// AvailabilityGroupListeners_CreateOrUpdate + /// AvailabilityGroupListener_CreateOrUpdate /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> Updat 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); + var operation = new SqlVirtualMachineArmOperation(new AvailabilityGroupListenerOperationSource(Client), _availabilityGroupListenerClientDiagnostics, Pipeline, _availabilityGroupListenerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -309,11 +309,11 @@ public virtual async Task> Updat /// /// /// Operation Id - /// AvailabilityGroupListeners_CreateOrUpdate + /// AvailabilityGroupListener_CreateOrUpdate /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ArmOperation Update(WaitUntil 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); + var operation = new SqlVirtualMachineArmOperation(new AvailabilityGroupListenerOperationSource(Client), _availabilityGroupListenerClientDiagnostics, Pipeline, _availabilityGroupListenerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; 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..b649d5f022f8 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineArmClient.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineArmClient.cs @@ -47,27 +47,27 @@ public virtual AvailabilityGroupListenerResource GetAvailabilityGroupListenerRes } /// - /// 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. + /// 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) + /// Returns a object. + public virtual SqlVirtualMachineGroupResource GetSqlVirtualMachineGroupResource(ResourceIdentifier id) { - SqlVmGroupResource.ValidateResourceId(id); - return new SqlVmGroupResource(Client, id); + SqlVirtualMachineGroupResource.ValidateResourceId(id); + return new SqlVirtualMachineGroupResource(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. + /// You can use to create a from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual SqlVmResource GetSqlVmResource(ResourceIdentifier id) + /// Returns a object. + public virtual SqlVirtualMachineResource GetSqlVirtualMachineResource(ResourceIdentifier id) { - SqlVmResource.ValidateResourceId(id); - return new SqlVmResource(Client, id); + SqlVirtualMachineResource.ValidateResourceId(id); + return new SqlVirtualMachineResource(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..7ff4281e4327 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineResourceGroupResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineResourceGroupResource.cs @@ -33,11 +33,11 @@ private string GetApiVersionOrNull(ResourceType resourceType) 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 SqlVirtualMachineGroupResources in the ResourceGroupResource. + /// An object representing collection of SqlVirtualMachineGroupResources and their operations over a SqlVirtualMachineGroupResource. + public virtual SqlVirtualMachineGroupCollection GetSqlVirtualMachineGroups() { - return GetCachedClient(client => new SqlVmGroupCollection(client, Id)); + return GetCachedClient(client => new SqlVirtualMachineGroupCollection(client, Id)); } /// @@ -49,26 +49,26 @@ public virtual SqlVmGroupCollection GetSqlVmGroups() /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 sqlVmGroupName, CancellationToken cancellationToken = default) + public virtual async Task> GetSqlVirtualMachineGroupAsync(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { - return await GetSqlVmGroups().GetAsync(sqlVmGroupName, cancellationToken).ConfigureAwait(false); + return await GetSqlVirtualMachineGroups().GetAsync(sqlVirtualMachineGroupName, cancellationToken).ConfigureAwait(false); } /// @@ -80,33 +80,33 @@ public virtual async Task> GetSqlVmGroupAsync(strin /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 sqlVmGroupName, CancellationToken cancellationToken = default) + public virtual Response GetSqlVirtualMachineGroup(string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { - return GetSqlVmGroups().Get(sqlVmGroupName, cancellationToken); + return GetSqlVirtualMachineGroups().Get(sqlVirtualMachineGroupName, 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 SqlVirtualMachineResources in the ResourceGroupResource. + /// An object representing collection of SqlVirtualMachineResources and their operations over a SqlVirtualMachineResource. + public virtual SqlVirtualMachineCollection GetSqlVirtualMachines() { - return GetCachedClient(client => new SqlVmCollection(client, Id)); + return GetCachedClient(client => new SqlVirtualMachineCollection(client, Id)); } /// @@ -118,27 +118,27 @@ public virtual SqlVmCollection GetSqlVms() /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 sqlVmName, string expand = null, CancellationToken cancellationToken = default) + public virtual async Task> GetSqlVirtualMachineAsync(string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { - return await GetSqlVms().GetAsync(sqlVmName, expand, cancellationToken).ConfigureAwait(false); + return await GetSqlVirtualMachines().GetAsync(sqlVirtualMachineName, expand, cancellationToken).ConfigureAwait(false); } /// @@ -150,27 +150,27 @@ public virtual async Task> GetSqlVmAsync(string sqlVmNam /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 sqlVmName, string expand = null, CancellationToken cancellationToken = default) + public virtual Response GetSqlVirtualMachine(string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { - return GetSqlVms().Get(sqlVmName, expand, cancellationToken); + return GetSqlVirtualMachines().Get(sqlVirtualMachineName, expand, 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..3b50e4f968a4 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineSubscriptionResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineSubscriptionResource.cs @@ -15,10 +15,10 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableSqlVirtualMachineSubscriptionResource : ArmResource { - private ClientDiagnostics _sqlVmGroupSqlVmGroupsClientDiagnostics; - private SqlVirtualMachineGroupsRestOperations _sqlVmGroupSqlVmGroupsRestClient; - private ClientDiagnostics _sqlVmSqlVirtualMachinesClientDiagnostics; - private SqlVirtualMachinesRestOperations _sqlVmSqlVirtualMachinesRestClient; + private ClientDiagnostics _sqlVirtualMachineGroupClientDiagnostics; + private SqlVirtualMachineGroupsRestOperations _sqlVirtualMachineGroupRestClient; + private ClientDiagnostics _sqlVirtualMachineClientDiagnostics; + private SqlVirtualMachinesRestOperations _sqlVirtualMachineRestClient; /// Initializes a new instance of the class for mocking. protected MockableSqlVirtualMachineSubscriptionResource() @@ -32,10 +32,10 @@ internal MockableSqlVirtualMachineSubscriptionResource(ArmClient client, Resourc { } - 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 SqlVirtualMachineGroupClientDiagnostics => _sqlVirtualMachineGroupClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVirtualMachineGroupResource.ResourceType.Namespace, Diagnostics); + private SqlVirtualMachineGroupsRestOperations SqlVirtualMachineGroupRestClient => _sqlVirtualMachineGroupRestClient ??= new SqlVirtualMachineGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SqlVirtualMachineGroupResource.ResourceType)); + private ClientDiagnostics SqlVirtualMachineClientDiagnostics => _sqlVirtualMachineClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVirtualMachineResource.ResourceType.Namespace, Diagnostics); + private SqlVirtualMachinesRestOperations SqlVirtualMachineRestClient => _sqlVirtualMachineRestClient ??= new SqlVirtualMachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SqlVirtualMachineResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -52,25 +52,25 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Operation Id - /// SqlVirtualMachineGroups_List + /// SqlVirtualMachineGroup_List /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSqlVirtualMachineGroupsAsync(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); + HttpMessage FirstPageRequest(int? pageSizeHint) => SqlVirtualMachineGroupRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlVirtualMachineGroupRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlVirtualMachineGroupResource(Client, SqlVirtualMachineGroupData.DeserializeSqlVirtualMachineGroupData(e)), SqlVirtualMachineGroupClientDiagnostics, Pipeline, "MockableSqlVirtualMachineSubscriptionResource.GetSqlVirtualMachineGroups", "value", "nextLink", cancellationToken); } /// @@ -82,25 +82,25 @@ public virtual AsyncPageable GetSqlVmGroupsAsync(Cancellatio /// /// /// Operation Id - /// SqlVirtualMachineGroups_List + /// SqlVirtualMachineGroup_List /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// 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 GetSqlVirtualMachineGroups(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); + HttpMessage FirstPageRequest(int? pageSizeHint) => SqlVirtualMachineGroupRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlVirtualMachineGroupRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlVirtualMachineGroupResource(Client, SqlVirtualMachineGroupData.DeserializeSqlVirtualMachineGroupData(e)), SqlVirtualMachineGroupClientDiagnostics, Pipeline, "MockableSqlVirtualMachineSubscriptionResource.GetSqlVirtualMachineGroups", "value", "nextLink", cancellationToken); } /// @@ -112,25 +112,25 @@ public virtual Pageable GetSqlVmGroups(CancellationToken can /// /// /// Operation Id - /// SqlVirtualMachines_List + /// SqlVirtualMachine_List /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSqlVirtualMachinesAsync(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); + HttpMessage FirstPageRequest(int? pageSizeHint) => SqlVirtualMachineRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlVirtualMachineRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlVirtualMachineResource(Client, SqlVirtualMachineData.DeserializeSqlVirtualMachineData(e)), SqlVirtualMachineClientDiagnostics, Pipeline, "MockableSqlVirtualMachineSubscriptionResource.GetSqlVirtualMachines", "value", "nextLink", cancellationToken); } /// @@ -142,25 +142,25 @@ public virtual AsyncPageable GetSqlVmsAsync(CancellationToken can /// /// /// Operation Id - /// SqlVirtualMachines_List + /// SqlVirtualMachine_List /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// 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 GetSqlVirtualMachines(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); + HttpMessage FirstPageRequest(int? pageSizeHint) => SqlVirtualMachineRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SqlVirtualMachineRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlVirtualMachineResource(Client, SqlVirtualMachineData.DeserializeSqlVirtualMachineData(e)), SqlVirtualMachineClientDiagnostics, Pipeline, "MockableSqlVirtualMachineSubscriptionResource.GetSqlVirtualMachines", "value", "nextLink", cancellationToken); } } } 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..877929e6e012 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/MockableSqlVirtualMachineTenantResource.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine.Mocking +{ + /// A class to add extension methods to TenantResource. + public partial class MockableSqlVirtualMachineTenantResource : ArmResource + { + private ClientDiagnostics _operationsClientDiagnostics; + private OperationsRestOperations _operationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableSqlVirtualMachineTenantResource() + { + } + + /// Initializes a new instance of the 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", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OperationsRestOperations OperationsRestClient => _operationsRestClient ??= new OperationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// 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. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetOperationsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => OperationsRestClient.CreateListRequest(); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OperationsRestClient.CreateListNextPageRequest(nextLink); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => Info.DeserializeInfo(e), OperationsClientDiagnostics, Pipeline, "MockableSqlVirtualMachineTenantResource.GetOperations", "value", "nextLink", cancellationToken); + } + + /// + /// 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 GetOperations(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => OperationsRestClient.CreateListRequest(); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OperationsRestClient.CreateListNextPageRequest(nextLink); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => Info.DeserializeInfo(e), OperationsClientDiagnostics, Pipeline, "MockableSqlVirtualMachineTenantResource.GetOperations", "value", "nextLink", 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 d1eb21b936ef..880cf0d4a4bd 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Extensions/SqlVirtualMachineExtensions.cs @@ -11,6 +11,7 @@ using Azure.Core; using Azure.ResourceManager.Resources; using Azure.ResourceManager.SqlVirtualMachine.Mocking; +using Azure.ResourceManager.SqlVirtualMachine.Models; namespace Azure.ResourceManager.SqlVirtualMachine { @@ -32,6 +33,11 @@ private static MockableSqlVirtualMachineSubscriptionResource GetMockableSqlVirtu return resource.GetCachedClient(client => new MockableSqlVirtualMachineSubscriptionResource(client, resource.Id)); } + private static MockableSqlVirtualMachineTenantResource GetMockableSqlVirtualMachineTenantResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSqlVirtualMachineTenantResource(client, resource.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. @@ -52,58 +58,58 @@ 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. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance 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 SqlVirtualMachineGroupResource GetSqlVirtualMachineGroupResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableSqlVirtualMachineArmClient(client).GetSqlVmGroupResource(id); + return GetMockableSqlVirtualMachineArmClient(client).GetSqlVirtualMachineGroupResource(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. + /// You can use to create a from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance 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 SqlVirtualMachineResource GetSqlVirtualMachineResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableSqlVirtualMachineArmClient(client).GetSqlVmResource(id); + return GetMockableSqlVirtualMachineArmClient(client).GetSqlVirtualMachineResource(id); } /// - /// Gets a collection of SqlVmGroupResources in the ResourceGroupResource. + /// Gets a collection of SqlVirtualMachineGroupResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance 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 SqlVirtualMachineGroupResources and their operations over a SqlVirtualMachineGroupResource. + public static SqlVirtualMachineGroupCollection GetSqlVirtualMachineGroups(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroups(); + return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVirtualMachineGroups(); } /// @@ -115,33 +121,33 @@ public static SqlVmGroupCollection GetSqlVmGroups(this ResourceGroupResource res /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Name of the SQL virtual machine group. + /// 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. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static async Task> GetSqlVmGroupAsync(this ResourceGroupResource resourceGroupResource, string sqlVmGroupName, CancellationToken cancellationToken = default) + public static async Task> GetSqlVirtualMachineGroupAsync(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroupAsync(sqlVmGroupName, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVirtualMachineGroupAsync(sqlVirtualMachineGroupName, cancellationToken).ConfigureAwait(false); } /// @@ -153,50 +159,50 @@ public static async Task> GetSqlVmGroupAsync(this R /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// Name of the SQL virtual machine group. + /// 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. + /// or is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public static Response GetSqlVmGroup(this ResourceGroupResource resourceGroupResource, string sqlVmGroupName, CancellationToken cancellationToken = default) + public static Response GetSqlVirtualMachineGroup(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmGroup(sqlVmGroupName, cancellationToken); + return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVirtualMachineGroup(sqlVirtualMachineGroupName, cancellationToken); } /// - /// Gets a collection of SqlVmResources in the ResourceGroupResource. + /// Gets a collection of SqlVirtualMachineResources in the ResourceGroupResource. /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance 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 SqlVirtualMachineResources and their operations over a SqlVirtualMachineResource. + public static SqlVirtualMachineCollection GetSqlVirtualMachines(this ResourceGroupResource resourceGroupResource) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVms(); + return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVirtualMachines(); } /// @@ -208,34 +214,34 @@ public static SqlVmCollection GetSqlVms(this ResourceGroupResource resourceGroup /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance 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. - /// or is null. - /// 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. [ForwardsClientCalls] - public static async Task> GetSqlVmAsync(this ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + public static async Task> GetSqlVirtualMachineAsync(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVmAsync(sqlVmName, expand, cancellationToken).ConfigureAwait(false); + return await GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVirtualMachineAsync(sqlVirtualMachineName, expand, cancellationToken).ConfigureAwait(false); } /// @@ -247,34 +253,34 @@ public static async Task> GetSqlVmAsync(this ResourceGro /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance 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. - /// or is null. - /// 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. [ForwardsClientCalls] - public static Response GetSqlVm(this ResourceGroupResource resourceGroupResource, string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + public static Response GetSqlVirtualMachine(this ResourceGroupResource resourceGroupResource, string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVm(sqlVmName, expand, cancellationToken); + return GetMockableSqlVirtualMachineResourceGroupResource(resourceGroupResource).GetSqlVirtualMachine(sqlVirtualMachineName, expand, cancellationToken); } /// @@ -286,31 +292,31 @@ public static Response GetSqlVm(this ResourceGroupResource resour /// /// /// Operation Id - /// SqlVirtualMachineGroups_List + /// SqlVirtualMachineGroup_List /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance 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 GetSqlVmGroupsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSqlVirtualMachineGroupsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVmGroupsAsync(cancellationToken); + return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVirtualMachineGroupsAsync(cancellationToken); } /// @@ -322,31 +328,31 @@ public static AsyncPageable GetSqlVmGroupsAsync(this Subscri /// /// /// Operation Id - /// SqlVirtualMachineGroups_List + /// SqlVirtualMachineGroup_List /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance 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 GetSqlVmGroups(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSqlVirtualMachineGroups(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVmGroups(cancellationToken); + return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVirtualMachineGroups(cancellationToken); } /// @@ -358,31 +364,31 @@ public static Pageable GetSqlVmGroups(this SubscriptionResou /// /// /// Operation Id - /// SqlVirtualMachines_List + /// SqlVirtualMachine_List /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance 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) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetSqlVirtualMachinesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVmsAsync(cancellationToken); + return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVirtualMachinesAsync(cancellationToken); } /// @@ -394,31 +400,95 @@ public static AsyncPageable GetSqlVmsAsync(this SubscriptionResou /// /// /// Operation Id - /// SqlVirtualMachines_List + /// SqlVirtualMachine_List /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance 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) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetSqlVirtualMachines(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVms(cancellationToken); + return GetMockableSqlVirtualMachineSubscriptionResource(subscriptionResource).GetSqlVirtualMachines(cancellationToken); + } + + /// + /// 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 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetOperationsAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableSqlVirtualMachineTenantResource(tenantResource).GetOperationsAsync(cancellationToken); + } + + /// + /// 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 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance 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 GetOperations(this TenantResource tenantResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableSqlVirtualMachineTenantResource(tenantResource).GetOperations(cancellationToken); } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineGroupOperationSource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineGroupOperationSource.cs new file mode 100644 index 000000000000..d0751c5d69c6 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineGroupOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal class SqlVirtualMachineGroupOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SqlVirtualMachineGroupOperationSource(ArmClient client) + { + _client = client; + } + + SqlVirtualMachineGroupResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); + return new SqlVirtualMachineGroupResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); + return await Task.FromResult(new SqlVirtualMachineGroupResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineOperationSource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineOperationSource.cs new file mode 100644 index 000000000000..6ad2b6306039 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVirtualMachineOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal class SqlVirtualMachineOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SqlVirtualMachineOperationSource(ArmClient client) + { + _client = client; + } + + SqlVirtualMachineResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); + return new SqlVirtualMachineResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); + return await Task.FromResult(new SqlVirtualMachineResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmGroupOperationSource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmGroupOperationSource.cs deleted file mode 100644 index 589378bfac2b..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmGroupOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.SqlVirtualMachine -{ - internal class SqlVmGroupOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal SqlVmGroupOperationSource(ArmClient client) - { - _client = client; - } - - SqlVmGroupResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); - return new SqlVmGroupResource(_client, data); - } - - 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); - } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmOperationSource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmOperationSource.cs deleted file mode 100644 index 4b15fb493f5e..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmOperationSource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.ClientModel.Primitives; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -namespace Azure.ResourceManager.SqlVirtualMachine -{ - internal class SqlVmOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal SqlVmOperationSource(ArmClient client) - { - _client = client; - } - - SqlVmResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSqlVirtualMachineContext.Default); - return new SqlVmResource(_client, data); - } - - 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); - } - } -} 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..4fdd0ec43cf6 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/LongRunningOperation/SqlVmTroubleshootingOperationSource.cs @@ -0,0 +1,30 @@ +// 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.Core; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal class SqlVmTroubleshootingOperationSource : IOperationSource + { + SqlVmTroubleshooting IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return SqlVmTroubleshooting.DeserializeSqlVmTroubleshooting(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return SqlVmTroubleshooting.DeserializeSqlVmTroubleshooting(document.RootElement); + } + } +} 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..dbd43dc23989 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.Serialization.cs @@ -0,0 +1,129 @@ +// 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 AADAuthenticationSettings : 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(AADAuthenticationSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + } + 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 + } + } + } + + AADAuthenticationSettings 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(AADAuthenticationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAADAuthenticationSettings(document.RootElement, options); + } + + internal static AADAuthenticationSettings DeserializeAADAuthenticationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clientId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientId"u8)) + { + clientId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AADAuthenticationSettings(clientId, 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(AADAuthenticationSettings)} does not support writing '{options.Format}' format."); + } + } + + AADAuthenticationSettings 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 DeserializeAADAuthenticationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AADAuthenticationSettings)} 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/AADAuthenticationSettings.cs similarity index 66% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.cs index bd81f083086c..a6c0b518ea2d 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AADAuthenticationSettings.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// A list of SQL virtual machines. - internal partial class SqlVmListResult + /// Enable AAD authentication for SQL VM. + internal partial class AADAuthenticationSettings { /// /// Keeps track of any properties unknown to the library. @@ -45,26 +45,21 @@ internal partial class SqlVmListResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal SqlVmListResult() + /// Initializes a new instance of . + public AADAuthenticationSettings() { - Value = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// Array of results. - /// Link to retrieve next page of results. + /// 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 SqlVmListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal AADAuthenticationSettings(string clientId, IDictionary serializedAdditionalRawData) { - Value = value; - NextLink = nextLink; + ClientId = clientId; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Array of results. - public IReadOnlyList Value { get; } - /// Link to retrieve next page of results. - public string NextLink { get; } + /// 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/AdditionalOSPatch.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalOSPatch.cs new file mode 100644 index 000000000000..d76c657a8dc8 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalOSPatch.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Additional VM Patching solution enabled on the Virtual Machine. + public readonly partial struct AdditionalOSPatch : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AdditionalOSPatch(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WUValue = "WU"; + private const string WUMUValue = "WUMU"; + private const string WSUSValue = "WSUS"; + + /// WU. + public static AdditionalOSPatch WU { get; } = new AdditionalOSPatch(WUValue); + /// WUMU. + public static AdditionalOSPatch WUMU { get; } = new AdditionalOSPatch(WUMUValue); + /// WSUS. + public static AdditionalOSPatch WSUS { get; } = new AdditionalOSPatch(WSUSValue); + /// Determines if two values are the same. + public static bool operator ==(AdditionalOSPatch left, AdditionalOSPatch right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AdditionalOSPatch left, AdditionalOSPatch right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AdditionalOSPatch(string value) => 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..9aa3f4f37374 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AdditionalVmPatch.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +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; + + /// Initializes a new instance of . + /// is null. + public AdditionalVmPatch(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSetValue = "NotSet"; + private const string MicrosoftUpdateValue = "MicrosoftUpdate"; + + /// NotSet. + public static AdditionalVmPatch NotSet { get; } = new AdditionalVmPatch(NotSetValue); + /// MicrosoftUpdate. + public static AdditionalVmPatch MicrosoftUpdate { get; } = new AdditionalVmPatch(MicrosoftUpdateValue); + /// Determines if two values are the same. + public static bool operator ==(AdditionalVmPatch left, AdditionalVmPatch right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AdditionalVmPatch left, AdditionalVmPatch right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AdditionalVmPatch(string value) => 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/AgConfiguration.Serialization.cs similarity index 62% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AgConfiguration.Serialization.cs index 0de634c5f40e..bfa1db89852e 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AgConfiguration.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - internal partial class AvailabilityGroupConfiguration : IUtf8JsonSerializable, IJsonModel + internal partial class AgConfiguration : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(AgConfiguration)} does not support writing '{format}' format."); } if (Optional.IsCollectionDefined(Replicas)) @@ -61,19 +61,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AvailabilityGroupConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AgConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(AgConfiguration)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAvailabilityGroupConfiguration(document.RootElement, options); + return DeserializeAgConfiguration(document.RootElement, options); } - internal static AvailabilityGroupConfiguration DeserializeAvailabilityGroupConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + internal static AgConfiguration DeserializeAgConfiguration(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -81,7 +81,7 @@ internal static AvailabilityGroupConfiguration DeserializeAvailabilityGroupConfi { return null; } - IList replicas = default; + IList replicas = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -92,10 +92,10 @@ internal static AvailabilityGroupConfiguration DeserializeAvailabilityGroupConfi { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AvailabilityGroupReplica.DeserializeAvailabilityGroupReplica(item, options)); + array.Add(AgReplica.DeserializeAgReplica(item, options)); } replicas = array; continue; @@ -106,38 +106,38 @@ internal static AvailabilityGroupConfiguration DeserializeAvailabilityGroupConfi } } serializedAdditionalRawData = rawDataDictionary; - return new AvailabilityGroupConfiguration(replicas ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new AgConfiguration(replicas ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(AvailabilityGroupConfiguration)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AgConfiguration)} does not support writing '{options.Format}' format."); } } - AvailabilityGroupConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AgConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAvailabilityGroupConfiguration(document.RootElement, options); + return DeserializeAgConfiguration(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AvailabilityGroupConfiguration)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AgConfiguration)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/AgConfiguration.cs similarity index 81% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AgConfiguration.cs index 78fde31660f8..5141512d6d6a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupConfiguration.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AgConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Availability group configuration. - internal partial class AvailabilityGroupConfiguration + internal partial class AgConfiguration { /// /// Keeps track of any properties unknown to the library. @@ -45,22 +45,22 @@ internal partial class AvailabilityGroupConfiguration /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public AvailabilityGroupConfiguration() + /// Initializes a new instance of . + public AgConfiguration() { - Replicas = new ChangeTrackingList(); + Replicas = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Replica configurations. /// Keeps track of any properties unknown to the library. - internal AvailabilityGroupConfiguration(IList replicas, IDictionary serializedAdditionalRawData) + internal AgConfiguration(IList replicas, IDictionary serializedAdditionalRawData) { Replicas = replicas; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Replica configurations. - public IList Replicas { get; } + public IList Replicas { get; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AgReplica.Serialization.cs similarity index 64% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AgReplica.Serialization.cs index 2d480652ba8f..a01069462c71 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AgReplica.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class AvailabilityGroupReplica : IUtf8JsonSerializable, IJsonModel + public partial class AgReplica : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,16 +28,16 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(AgReplica)} does not support writing '{format}' format."); } - if (Optional.IsDefined(SqlVmInstanceId)) + if (Optional.IsDefined(SqlVirtualMachineInstanceId)) { writer.WritePropertyName("sqlVirtualMachineInstanceId"u8); - writer.WriteStringValue(SqlVmInstanceId); + writer.WriteStringValue(SqlVirtualMachineInstanceId); } if (Optional.IsDefined(Role)) { @@ -76,19 +76,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AvailabilityGroupReplica IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AgReplica IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(AgReplica)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAvailabilityGroupReplica(document.RootElement, options); + return DeserializeAgReplica(document.RootElement, options); } - internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(JsonElement element, ModelReaderWriterOptions options = null) + internal static AgReplica DeserializeAgReplica(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -96,22 +96,18 @@ internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(Jso { return null; } - ResourceIdentifier sqlVmInstanceId = default; - AvailabilityGroupReplicaRole? role = default; - AvailabilityGroupReplicaCommitMode? commit = default; - AvailabilityGroupReplicaFailoverMode? failover = default; - ReadableSecondaryMode? readableSecondary = default; + string sqlVirtualMachineInstanceId = default; + Role? role = default; + Commit? commit = default; + Failover? failover = default; + ReadableSecondary? readableSecondary = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("sqlVirtualMachineInstanceId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sqlVmInstanceId = new ResourceIdentifier(property.Value.GetString()); + sqlVirtualMachineInstanceId = property.Value.GetString(); continue; } if (property.NameEquals("role"u8)) @@ -120,7 +116,7 @@ internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(Jso { continue; } - role = new AvailabilityGroupReplicaRole(property.Value.GetString()); + role = new Role(property.Value.GetString()); continue; } if (property.NameEquals("commit"u8)) @@ -129,7 +125,7 @@ internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(Jso { continue; } - commit = new AvailabilityGroupReplicaCommitMode(property.Value.GetString()); + commit = new Commit(property.Value.GetString()); continue; } if (property.NameEquals("failover"u8)) @@ -138,7 +134,7 @@ internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(Jso { continue; } - failover = new AvailabilityGroupReplicaFailoverMode(property.Value.GetString()); + failover = new Failover(property.Value.GetString()); continue; } if (property.NameEquals("readableSecondary"u8)) @@ -147,7 +143,7 @@ internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(Jso { continue; } - readableSecondary = new ReadableSecondaryMode(property.Value.GetString()); + readableSecondary = new ReadableSecondary(property.Value.GetString()); continue; } if (options.Format != "W") @@ -156,8 +152,8 @@ internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new AvailabilityGroupReplica( - sqlVmInstanceId, + return new AgReplica( + sqlVirtualMachineInstanceId, role, commit, failover, @@ -165,35 +161,35 @@ internal static AvailabilityGroupReplica DeserializeAvailabilityGroupReplica(Jso serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(AvailabilityGroupReplica)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AgReplica)} does not support writing '{options.Format}' format."); } } - AvailabilityGroupReplica IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AgReplica IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAvailabilityGroupReplica(document.RootElement, options); + return DeserializeAgReplica(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AvailabilityGroupReplica)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AgReplica)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/AgReplica.cs similarity index 75% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AgReplica.cs index 6c9fb0124f8b..8fba7deef712 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplica.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AgReplica.cs @@ -7,12 +7,11 @@ using System; using System.Collections.Generic; -using Azure.Core; namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Availability group replica configuration. - public partial class AvailabilityGroupReplica + public partial class AgReplica { /// /// Keeps track of any properties unknown to the library. @@ -46,21 +45,21 @@ public partial class AvailabilityGroupReplica /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public AvailabilityGroupReplica() + /// Initializes a new instance of . + public AgReplica() { } - /// Initializes a new instance of . - /// Sql VirtualMachine Instance Id. + /// Initializes a new instance of . + /// Sql VirtualMachine Instance Id. /// Replica Role in availability group. /// 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) + internal AgReplica(string sqlVirtualMachineInstanceId, Role? role, Commit? commit, Failover? failover, ReadableSecondary? readableSecondary, IDictionary serializedAdditionalRawData) { - SqlVmInstanceId = sqlVmInstanceId; + SqlVirtualMachineInstanceId = sqlVirtualMachineInstanceId; Role = role; Commit = commit; Failover = failover; @@ -69,14 +68,14 @@ internal AvailabilityGroupReplica(ResourceIdentifier sqlVmInstanceId, Availabili } /// Sql VirtualMachine Instance Id. - public ResourceIdentifier SqlVmInstanceId { get; set; } + public string SqlVirtualMachineInstanceId { get; set; } /// Replica Role in availability group. - public AvailabilityGroupReplicaRole? Role { get; set; } + public Role? Role { get; set; } /// Replica commit mode in availability group. - public AvailabilityGroupReplicaCommitMode? Commit { get; set; } + public Commit? Commit { get; set; } /// Replica failover mode in availability group. - public AvailabilityGroupReplicaFailoverMode? Failover { get; set; } + public Failover? Failover { get; set; } /// Replica readable secondary mode in availability group. - public ReadableSecondaryMode? ReadableSecondary { get; set; } + public ReadableSecondary? ReadableSecondary { get; set; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentDayOfWeek.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentDayOfWeek.Serialization.cs new file mode 100644 index 000000000000..492bcd6e6540 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentDayOfWeek.Serialization.cs @@ -0,0 +1,38 @@ +// 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 AssessmentDayOfWeekExtensions + { + public static string ToSerialString(this AssessmentDayOfWeek value) => value switch + { + AssessmentDayOfWeek.Monday => "Monday", + AssessmentDayOfWeek.Tuesday => "Tuesday", + AssessmentDayOfWeek.Wednesday => "Wednesday", + AssessmentDayOfWeek.Thursday => "Thursday", + AssessmentDayOfWeek.Friday => "Friday", + AssessmentDayOfWeek.Saturday => "Saturday", + AssessmentDayOfWeek.Sunday => "Sunday", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AssessmentDayOfWeek value.") + }; + + public static AssessmentDayOfWeek ToAssessmentDayOfWeek(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Monday")) return AssessmentDayOfWeek.Monday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Tuesday")) return AssessmentDayOfWeek.Tuesday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wednesday")) return AssessmentDayOfWeek.Wednesday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Thursday")) return AssessmentDayOfWeek.Thursday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Friday")) return AssessmentDayOfWeek.Friday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Saturday")) return AssessmentDayOfWeek.Saturday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Sunday")) return AssessmentDayOfWeek.Sunday; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AssessmentDayOfWeek value."); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentDayOfWeek.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentDayOfWeek.cs similarity index 94% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentDayOfWeek.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentDayOfWeek.cs index 878ed26112e1..568d49f2916c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentDayOfWeek.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentDayOfWeek.cs @@ -8,7 +8,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Day of the week to run assessment. - public enum SqlVmAssessmentDayOfWeek + public enum AssessmentDayOfWeek { /// Monday. Monday, diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentSettings.Serialization.cs similarity index 67% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentSettings.Serialization.cs index c2405a50f0af..c5c0466e690e 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentSettings.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmAssessmentSettings : IUtf8JsonSerializable, IJsonModel + public partial class AssessmentSettings : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,16 +28,16 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(AssessmentSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) + if (Optional.IsDefined(Enable)) { writer.WritePropertyName("enable"u8); - writer.WriteBooleanValue(IsEnabled.Value); + writer.WriteBooleanValue(Enable.Value); } if (Optional.IsDefined(RunImmediately)) { @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmAssessmentSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AssessmentSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(AssessmentSettings)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmAssessmentSettings(document.RootElement, options); + return DeserializeAssessmentSettings(document.RootElement, options); } - internal static SqlVmAssessmentSettings DeserializeSqlVmAssessmentSettings(JsonElement element, ModelReaderWriterOptions options = null) + internal static AssessmentSettings DeserializeAssessmentSettings(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -88,7 +88,7 @@ internal static SqlVmAssessmentSettings DeserializeSqlVmAssessmentSettings(JsonE } bool? enable = default; bool? runImmediately = default; - SqlVmAssessmentSchedule schedule = default; + Schedule schedule = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -117,7 +117,7 @@ internal static SqlVmAssessmentSettings DeserializeSqlVmAssessmentSettings(JsonE { continue; } - schedule = SqlVmAssessmentSchedule.DeserializeSqlVmAssessmentSchedule(property.Value, options); + schedule = Schedule.DeserializeSchedule(property.Value, options); continue; } if (options.Format != "W") @@ -126,38 +126,38 @@ internal static SqlVmAssessmentSettings DeserializeSqlVmAssessmentSettings(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmAssessmentSettings(enable, runImmediately, schedule, serializedAdditionalRawData); + return new AssessmentSettings(enable, runImmediately, schedule, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlVmAssessmentSettings)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AssessmentSettings)} does not support writing '{options.Format}' format."); } } - SqlVmAssessmentSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AssessmentSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmAssessmentSettings(document.RootElement, options); + return DeserializeAssessmentSettings(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmAssessmentSettings)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AssessmentSettings)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/AssessmentSettings.cs similarity index 60% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentSettings.cs index a74a7cb1e0ad..005e38ec692f 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AssessmentSettings.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// Configure assessment for databases in your SQL virtual machine. - public partial class SqlVmAssessmentSettings + /// Configure SQL best practices Assessment for databases in your SQL virtual machine. + public partial class AssessmentSettings { /// /// Keeps track of any properties unknown to the library. @@ -45,29 +45,29 @@ public partial class SqlVmAssessmentSettings /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlVmAssessmentSettings() + /// Initializes a new instance of . + public AssessmentSettings() { } - /// Initializes a new instance of . - /// Enable or disable assessment feature on SQL virtual machine. - /// Run assessment immediately on SQL virtual machine. - /// Schedule for Assessment. + /// Initializes a new instance of . + /// 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 serializedAdditionalRawData) + internal AssessmentSettings(bool? enable, bool? runImmediately, Schedule schedule, IDictionary serializedAdditionalRawData) { - IsEnabled = isEnabled; + Enable = enable; RunImmediately = runImmediately; Schedule = schedule; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Enable or disable assessment feature on SQL virtual machine. - public bool? IsEnabled { get; set; } - /// Run assessment immediately on SQL virtual machine. + /// Enable or disable SQL best practices Assessment feature on SQL virtual machine. + public bool? Enable { get; set; } + /// Run SQL best practices Assessment immediately on SQL virtual machine. public bool? RunImmediately { get; set; } - /// Schedule for Assessment. - public SqlVmAssessmentSchedule Schedule { get; set; } + /// Schedule for SQL best practices Assessment. + public Schedule Schedule { get; set; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoBackupDaysOfWeek.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoBackupDaysOfWeek.cs new file mode 100644 index 000000000000..79e27229ff49 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoBackupDaysOfWeek.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The AutoBackupDaysOfWeek. + public readonly partial struct AutoBackupDaysOfWeek : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoBackupDaysOfWeek(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MondayValue = "Monday"; + private const string TuesdayValue = "Tuesday"; + private const string WednesdayValue = "Wednesday"; + private const string ThursdayValue = "Thursday"; + private const string FridayValue = "Friday"; + private const string SaturdayValue = "Saturday"; + private const string SundayValue = "Sunday"; + + /// Monday. + public static AutoBackupDaysOfWeek Monday { get; } = new AutoBackupDaysOfWeek(MondayValue); + /// Tuesday. + public static AutoBackupDaysOfWeek Tuesday { get; } = new AutoBackupDaysOfWeek(TuesdayValue); + /// Wednesday. + public static AutoBackupDaysOfWeek Wednesday { get; } = new AutoBackupDaysOfWeek(WednesdayValue); + /// Thursday. + public static AutoBackupDaysOfWeek Thursday { get; } = new AutoBackupDaysOfWeek(ThursdayValue); + /// Friday. + public static AutoBackupDaysOfWeek Friday { get; } = new AutoBackupDaysOfWeek(FridayValue); + /// Saturday. + public static AutoBackupDaysOfWeek Saturday { get; } = new AutoBackupDaysOfWeek(SaturdayValue); + /// Sunday. + public static AutoBackupDaysOfWeek Sunday { get; } = new AutoBackupDaysOfWeek(SundayValue); + /// Determines if two values are the same. + public static bool operator ==(AutoBackupDaysOfWeek left, AutoBackupDaysOfWeek right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoBackupDaysOfWeek left, AutoBackupDaysOfWeek right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutoBackupDaysOfWeek(string value) => new AutoBackupDaysOfWeek(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoBackupDaysOfWeek other && Equals(other); + /// + public bool Equals(AutoBackupDaysOfWeek 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/AutoBackupSettings.Serialization.cs similarity index 75% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoBackupSettings.Serialization.cs index 88b214fc6f5e..e0d4f2d440c7 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoBackupSettings.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmAutoBackupSettings : IUtf8JsonSerializable, IJsonModel + public partial class AutoBackupSettings : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,31 +28,31 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(AutoBackupSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) + if (Optional.IsDefined(Enable)) { writer.WritePropertyName("enable"u8); - writer.WriteBooleanValue(IsEnabled.Value); + writer.WriteBooleanValue(Enable.Value); } - if (Optional.IsDefined(IsEncryptionEnabled)) + if (Optional.IsDefined(EnableEncryption)) { writer.WritePropertyName("enableEncryption"u8); - writer.WriteBooleanValue(IsEncryptionEnabled.Value); + writer.WriteBooleanValue(EnableEncryption.Value); } - if (Optional.IsDefined(RetentionPeriodInDays)) + if (Optional.IsDefined(RetentionPeriod)) { writer.WritePropertyName("retentionPeriod"u8); - writer.WriteNumberValue(RetentionPeriodInDays.Value); + writer.WriteNumberValue(RetentionPeriod.Value); } if (Optional.IsDefined(StorageAccountUri)) { writer.WritePropertyName("storageAccountUrl"u8); - writer.WriteStringValue(StorageAccountUri.AbsoluteUri); + writer.WriteStringValue(StorageAccountUri); } if (Optional.IsDefined(StorageContainerName)) { @@ -69,10 +69,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("password"u8); writer.WriteStringValue(Password); } - if (Optional.IsDefined(AreSystemDbsIncludedInBackup)) + if (Optional.IsDefined(BackupSystemDbs)) { writer.WritePropertyName("backupSystemDbs"u8); - writer.WriteBooleanValue(AreSystemDbsIncludedInBackup.Value); + writer.WriteBooleanValue(BackupSystemDbs.Value); } if (Optional.IsDefined(BackupScheduleType)) { @@ -94,10 +94,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(FullBackupStartHour)) + if (Optional.IsDefined(FullBackupStartTime)) { writer.WritePropertyName("fullBackupStartTime"u8); - writer.WriteNumberValue(FullBackupStartHour.Value); + writer.WriteNumberValue(FullBackupStartTime.Value); } if (Optional.IsDefined(FullBackupWindowHours)) { @@ -126,19 +126,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmAutoBackupSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AutoBackupSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(AutoBackupSettings)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmAutoBackupSettings(document.RootElement, options); + return DeserializeAutoBackupSettings(document.RootElement, options); } - internal static SqlVmAutoBackupSettings DeserializeSqlVmAutoBackupSettings(JsonElement element, ModelReaderWriterOptions options = null) + internal static AutoBackupSettings DeserializeAutoBackupSettings(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -149,14 +149,14 @@ internal static SqlVmAutoBackupSettings DeserializeSqlVmAutoBackupSettings(JsonE bool? enable = default; bool? enableEncryption = default; int? retentionPeriod = default; - Uri storageAccountUrl = default; + string storageAccountUrl = default; string storageContainerName = default; string storageAccessKey = default; string password = default; bool? backupSystemDbs = default; - SqVmBackupScheduleType? backupScheduleType = default; - SqlVmFullBackupFrequency? fullBackupFrequency = default; - IList daysOfWeek = default; + BackupScheduleType? backupScheduleType = default; + FullBackupFrequencyType? fullBackupFrequency = default; + IList daysOfWeek = default; int? fullBackupStartTime = default; int? fullBackupWindowHours = default; int? logBackupFrequency = default; @@ -193,11 +193,7 @@ internal static SqlVmAutoBackupSettings DeserializeSqlVmAutoBackupSettings(JsonE } if (property.NameEquals("storageAccountUrl"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storageAccountUrl = new Uri(property.Value.GetString()); + storageAccountUrl = property.Value.GetString(); continue; } if (property.NameEquals("storageContainerName"u8)) @@ -230,7 +226,7 @@ internal static SqlVmAutoBackupSettings DeserializeSqlVmAutoBackupSettings(JsonE { continue; } - backupScheduleType = new SqVmBackupScheduleType(property.Value.GetString()); + backupScheduleType = new BackupScheduleType(property.Value.GetString()); continue; } if (property.NameEquals("fullBackupFrequency"u8)) @@ -239,7 +235,7 @@ internal static SqlVmAutoBackupSettings DeserializeSqlVmAutoBackupSettings(JsonE { continue; } - fullBackupFrequency = new SqlVmFullBackupFrequency(property.Value.GetString()); + fullBackupFrequency = new FullBackupFrequencyType(property.Value.GetString()); continue; } if (property.NameEquals("daysOfWeek"u8)) @@ -248,10 +244,10 @@ internal static SqlVmAutoBackupSettings DeserializeSqlVmAutoBackupSettings(JsonE { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(new SqlVmAutoBackupDayOfWeek(item.GetString())); + array.Add(new AutoBackupDaysOfWeek(item.GetString())); } daysOfWeek = array; continue; @@ -289,7 +285,7 @@ internal static SqlVmAutoBackupSettings DeserializeSqlVmAutoBackupSettings(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmAutoBackupSettings( + return new AutoBackupSettings( enable, enableEncryption, retentionPeriod, @@ -300,42 +296,42 @@ internal static SqlVmAutoBackupSettings DeserializeSqlVmAutoBackupSettings(JsonE backupSystemDbs, backupScheduleType, fullBackupFrequency, - daysOfWeek ?? new ChangeTrackingList(), + daysOfWeek ?? new ChangeTrackingList(), fullBackupStartTime, fullBackupWindowHours, logBackupFrequency, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlVmAutoBackupSettings)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AutoBackupSettings)} does not support writing '{options.Format}' format."); } } - SqlVmAutoBackupSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AutoBackupSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmAutoBackupSettings(document.RootElement, options); + return DeserializeAutoBackupSettings(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmAutoBackupSettings)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AutoBackupSettings)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/AutoBackupSettings.cs similarity index 69% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoBackupSettings.cs index 4b68d99bb22a..76d7495733ec 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoBackupSettings.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Configure backups for databases in your SQL virtual machine. - public partial class SqlVmAutoBackupSettings + public partial class AutoBackupSettings { /// /// Keeps track of any properties unknown to the library. @@ -45,55 +45,55 @@ public partial class SqlVmAutoBackupSettings /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlVmAutoBackupSettings() + /// Initializes a new instance of . + public AutoBackupSettings() { - DaysOfWeek = new ChangeTrackingList(); + DaysOfWeek = new ChangeTrackingList(); } - /// Initializes a new instance of . - /// 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. + /// Initializes a new instance of . + /// 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. + /// 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. + /// 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) + internal AutoBackupSettings(bool? enable, bool? enableEncryption, int? retentionPeriod, string storageAccountUri, string storageContainerName, string storageAccessKey, string password, bool? backupSystemDbs, BackupScheduleType? backupScheduleType, FullBackupFrequencyType? fullBackupFrequency, IList daysOfWeek, int? fullBackupStartTime, int? fullBackupWindowHours, int? logBackupFrequency, IDictionary serializedAdditionalRawData) { - IsEnabled = isEnabled; - IsEncryptionEnabled = isEncryptionEnabled; - RetentionPeriodInDays = retentionPeriodInDays; + Enable = enable; + EnableEncryption = enableEncryption; + RetentionPeriod = retentionPeriod; StorageAccountUri = storageAccountUri; StorageContainerName = storageContainerName; StorageAccessKey = storageAccessKey; Password = password; - AreSystemDbsIncludedInBackup = areSystemDbsIncludedInBackup; + BackupSystemDbs = backupSystemDbs; BackupScheduleType = backupScheduleType; FullBackupFrequency = fullBackupFrequency; DaysOfWeek = daysOfWeek; - FullBackupStartHour = fullBackupStartHour; + FullBackupStartTime = fullBackupStartTime; FullBackupWindowHours = fullBackupWindowHours; LogBackupFrequency = logBackupFrequency; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Enable or disable autobackup on SQL virtual machine. - public bool? IsEnabled { get; set; } + public bool? Enable { get; set; } /// Enable or disable encryption for backup on SQL virtual machine. - public bool? IsEncryptionEnabled { get; set; } + public bool? EnableEncryption { get; set; } /// Retention period of backup: 1-90 days. - public int? RetentionPeriodInDays { get; set; } + public int? RetentionPeriod { get; set; } /// Storage account url where backup will be taken to. - public Uri StorageAccountUri { get; set; } + public string 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. @@ -101,15 +101,15 @@ internal SqlVmAutoBackupSettings(bool? isEnabled, bool? isEncryptionEnabled, int /// Password for encryption on backup. public string Password { get; set; } /// Include or exclude system databases from auto backup. - public bool? AreSystemDbsIncludedInBackup { get; set; } + public bool? BackupSystemDbs { get; set; } /// Backup schedule type. - public SqVmBackupScheduleType? BackupScheduleType { get; set; } + public BackupScheduleType? BackupScheduleType { get; set; } /// Frequency of full backups. In both cases, full backups begin during the next scheduled time window. - public SqlVmFullBackupFrequency? FullBackupFrequency { get; set; } + public FullBackupFrequencyType? FullBackupFrequency { get; set; } /// Days of the week for the backups when FullBackupFrequency is set to Weekly. - public IList DaysOfWeek { get; } + 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; } + public int? FullBackupStartTime { 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. diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoPatchingSettings.Serialization.cs similarity index 64% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoPatchingSettings.Serialization.cs index 0c730662f3bd..923b7945a745 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoPatchingSettings.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmAutoPatchingSettings : IUtf8JsonSerializable, IJsonModel + public partial class AutoPatchingSettings : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,16 +28,16 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(AutoPatchingSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) + if (Optional.IsDefined(Enable)) { writer.WritePropertyName("enable"u8); - writer.WriteBooleanValue(IsEnabled.Value); + writer.WriteBooleanValue(Enable.Value); } if (Optional.IsDefined(DayOfWeek)) { @@ -49,10 +49,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("maintenanceWindowStartingHour"u8); writer.WriteNumberValue(MaintenanceWindowStartingHour.Value); } - if (Optional.IsDefined(MaintenanceWindowDurationInMinutes)) + if (Optional.IsDefined(MaintenanceWindowDuration)) { writer.WritePropertyName("maintenanceWindowDuration"u8); - writer.WriteNumberValue(MaintenanceWindowDurationInMinutes.Value); + writer.WriteNumberValue(MaintenanceWindowDuration.Value); + } + if (Optional.IsDefined(AdditionalVmPatch)) + { + writer.WritePropertyName("additionalVmPatch"u8); + writer.WriteStringValue(AdditionalVmPatch.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -71,19 +76,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmAutoPatchingSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AutoPatchingSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(AutoPatchingSettings)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmAutoPatchingSettings(document.RootElement, options); + return DeserializeAutoPatchingSettings(document.RootElement, options); } - internal static SqlVmAutoPatchingSettings DeserializeSqlVmAutoPatchingSettings(JsonElement element, ModelReaderWriterOptions options = null) + internal static AutoPatchingSettings DeserializeAutoPatchingSettings(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -92,9 +97,10 @@ internal static SqlVmAutoPatchingSettings DeserializeSqlVmAutoPatchingSettings(J return null; } bool? enable = default; - SqlVmAutoPatchingDayOfWeek? dayOfWeek = default; + DayOfWeek? dayOfWeek = default; int? maintenanceWindowStartingHour = default; int? maintenanceWindowDuration = default; + AdditionalVmPatch? additionalVmPatch = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -114,7 +120,7 @@ internal static SqlVmAutoPatchingSettings DeserializeSqlVmAutoPatchingSettings(J { continue; } - dayOfWeek = property.Value.GetString().ToSqlVmAutoPatchingDayOfWeek(); + dayOfWeek = property.Value.GetString().ToDayOfWeek(); continue; } if (property.NameEquals("maintenanceWindowStartingHour"u8)) @@ -135,44 +141,59 @@ internal static SqlVmAutoPatchingSettings DeserializeSqlVmAutoPatchingSettings(J maintenanceWindowDuration = property.Value.GetInt32(); continue; } + if (property.NameEquals("additionalVmPatch"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalVmPatch = new AdditionalVmPatch(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmAutoPatchingSettings(enable, dayOfWeek, maintenanceWindowStartingHour, maintenanceWindowDuration, serializedAdditionalRawData); + return new AutoPatchingSettings( + enable, + dayOfWeek, + maintenanceWindowStartingHour, + maintenanceWindowDuration, + additionalVmPatch, + serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlVmAutoPatchingSettings)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AutoPatchingSettings)} does not support writing '{options.Format}' format."); } } - SqlVmAutoPatchingSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AutoPatchingSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmAutoPatchingSettings(document.RootElement, options); + return DeserializeAutoPatchingSettings(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmAutoPatchingSettings)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AutoPatchingSettings)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/AutoPatchingSettings.cs similarity index 67% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoPatchingSettings.cs index 14466cb4482f..cf803ed85775 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AutoPatchingSettings.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Set a patching window during which Windows and SQL patches will be applied. - public partial class SqlVmAutoPatchingSettings + public partial class AutoPatchingSettings { /// /// Keeps track of any properties unknown to the library. @@ -45,33 +45,37 @@ public partial class SqlVmAutoPatchingSettings /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlVmAutoPatchingSettings() + /// Initializes a new instance of . + public AutoPatchingSettings() { } - /// Initializes a new instance of . - /// Enable or disable autopatching on SQL virtual machine. + /// Initializes a new instance of . + /// Enable or disable autopatching on SQL virtual machine. /// Day of week to apply the patch on. /// Hour of the day when patching is initiated. Local VM time. - /// Duration of patching. + /// 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, IDictionary serializedAdditionalRawData) + internal AutoPatchingSettings(bool? enable, DayOfWeek? dayOfWeek, int? maintenanceWindowStartingHour, int? maintenanceWindowDuration, AdditionalVmPatch? additionalVmPatch, IDictionary serializedAdditionalRawData) { - IsEnabled = isEnabled; + Enable = enable; DayOfWeek = dayOfWeek; MaintenanceWindowStartingHour = maintenanceWindowStartingHour; - MaintenanceWindowDurationInMinutes = maintenanceWindowDurationInMinutes; + MaintenanceWindowDuration = maintenanceWindowDuration; + AdditionalVmPatch = additionalVmPatch; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Enable or disable autopatching on SQL virtual machine. - public bool? IsEnabled { get; set; } + public bool? Enable { get; set; } /// Day of week to apply the patch on. - public SqlVmAutoPatchingDayOfWeek? DayOfWeek { get; set; } + public DayOfWeek? 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; } + public int? MaintenanceWindowDuration { 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/AvailabilityGroupListenerListResult.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.Serialization.cs index b76cb42558f3..862190f1a7fe 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 @@ -34,7 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit 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(); @@ -47,7 +47,7 @@ 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) { @@ -87,17 +87,13 @@ internal static AvailabilityGroupListenerListResult DeserializeAvailabilityGroup return null; } IReadOnlyList value = default; - string nextLink = default; + Uri 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()) { @@ -108,7 +104,11 @@ internal static AvailabilityGroupListenerListResult DeserializeAvailabilityGroup } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +117,7 @@ internal static AvailabilityGroupListenerListResult DeserializeAvailabilityGroup } } serializedAdditionalRawData = rawDataDictionary; - return new AvailabilityGroupListenerListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new AvailabilityGroupListenerListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) 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..cc854f3eac0c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// A list of availability group listeners. + /// The response of a AvailabilityGroupListener list operation. internal partial class AvailabilityGroupListenerListResult { /// @@ -46,25 +47,31 @@ internal partial class AvailabilityGroupListenerListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AvailabilityGroupListenerListResult() + /// The AvailabilityGroupListener items on this page. + internal AvailabilityGroupListenerListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } /// Initializes a new instance of . - /// Array of results. - /// Link to retrieve next page of results. + /// 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, string nextLink, IDictionary serializedAdditionalRawData) + internal AvailabilityGroupListenerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Array of results. + /// Initializes a new instance of for deserialization. + internal AvailabilityGroupListenerListResult() + { + } + + /// 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/AvailabilityGroupReplicaCommitMode.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaCommitMode.cs deleted file mode 100644 index 6b9213ba64f1..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaCommitMode.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.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Replica commit mode in availability group. - public readonly partial struct AvailabilityGroupReplicaCommitMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AvailabilityGroupReplicaCommitMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SynchronousCommitValue = "SYNCHRONOUS_COMMIT"; - private const string AsynchronousCommitValue = "ASYNCHRONOUS_COMMIT"; - - /// SYNCHRONOUS_COMMIT. - public static AvailabilityGroupReplicaCommitMode SynchronousCommit { get; } = new AvailabilityGroupReplicaCommitMode(SynchronousCommitValue); - /// ASYNCHRONOUS_COMMIT. - public static AvailabilityGroupReplicaCommitMode AsynchronousCommit { get; } = new AvailabilityGroupReplicaCommitMode(AsynchronousCommitValue); - /// Determines if two values are the same. - public static bool operator ==(AvailabilityGroupReplicaCommitMode left, AvailabilityGroupReplicaCommitMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AvailabilityGroupReplicaCommitMode left, AvailabilityGroupReplicaCommitMode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AvailabilityGroupReplicaCommitMode(string value) => 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 deleted file mode 100644 index 0557b73bbca3..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaFailoverMode.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.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Replica failover mode in availability group. - public readonly partial struct AvailabilityGroupReplicaFailoverMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AvailabilityGroupReplicaFailoverMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AutomaticValue = "AUTOMATIC"; - private const string ManualValue = "MANUAL"; - - /// AUTOMATIC. - public static AvailabilityGroupReplicaFailoverMode Automatic { get; } = new AvailabilityGroupReplicaFailoverMode(AutomaticValue); - /// MANUAL. - public static AvailabilityGroupReplicaFailoverMode Manual { get; } = new AvailabilityGroupReplicaFailoverMode(ManualValue); - /// Determines if two values are the same. - public static bool operator ==(AvailabilityGroupReplicaFailoverMode left, AvailabilityGroupReplicaFailoverMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AvailabilityGroupReplicaFailoverMode left, AvailabilityGroupReplicaFailoverMode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AvailabilityGroupReplicaFailoverMode(string value) => 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 deleted file mode 100644 index 113a4795982a..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupReplicaRole.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.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Replica Role in availability group. - public readonly partial struct AvailabilityGroupReplicaRole : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AvailabilityGroupReplicaRole(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PrimaryValue = "PRIMARY"; - private const string SecondaryValue = "SECONDARY"; - - /// PRIMARY. - public static AvailabilityGroupReplicaRole Primary { get; } = new AvailabilityGroupReplicaRole(PrimaryValue); - /// SECONDARY. - public static AvailabilityGroupReplicaRole Secondary { get; } = new AvailabilityGroupReplicaRole(SecondaryValue); - /// Determines if two values are the same. - public static bool operator ==(AvailabilityGroupReplicaRole left, AvailabilityGroupReplicaRole right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AvailabilityGroupReplicaRole left, AvailabilityGroupReplicaRole right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AvailabilityGroupReplicaRole(string value) => 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/BackupScheduleType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/BackupScheduleType.cs new file mode 100644 index 000000000000..fd0afc179de5 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/BackupScheduleType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Backup schedule type. + public readonly partial struct BackupScheduleType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BackupScheduleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManualValue = "Manual"; + private const string AutomatedValue = "Automated"; + + /// Manual. + public static BackupScheduleType Manual { get; } = new BackupScheduleType(ManualValue); + /// Automated. + public static BackupScheduleType Automated { get; } = new BackupScheduleType(AutomatedValue); + /// Determines if two values are the same. + public static bool operator ==(BackupScheduleType left, BackupScheduleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BackupScheduleType left, BackupScheduleType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BackupScheduleType(string value) => new BackupScheduleType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BackupScheduleType other && Equals(other); + /// + public bool Equals(BackupScheduleType 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/ClusterConfiguration.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ClusterConfiguration.cs new file mode 100644 index 000000000000..2835186bccf0 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ClusterConfiguration.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Cluster type. + public readonly partial struct ClusterConfiguration : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClusterConfiguration(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DomainfulValue = "Domainful"; + + /// Domainful. + public static ClusterConfiguration Domainful { get; } = new ClusterConfiguration(DomainfulValue); + /// Determines if two values are the same. + public static bool operator ==(ClusterConfiguration left, ClusterConfiguration right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClusterConfiguration left, ClusterConfiguration right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ClusterConfiguration(string value) => new ClusterConfiguration(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClusterConfiguration other && Equals(other); + /// + public bool Equals(ClusterConfiguration 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/ClusterManagerType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ClusterManagerType.cs new file mode 100644 index 000000000000..8f0fc2170e5e --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ClusterManagerType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type. + public readonly partial struct ClusterManagerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClusterManagerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WSFCValue = "WSFC"; + + /// WSFC. + public static ClusterManagerType WSFC { get; } = new ClusterManagerType(WSFCValue); + /// Determines if two values are the same. + public static bool operator ==(ClusterManagerType left, ClusterManagerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClusterManagerType left, ClusterManagerType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ClusterManagerType(string value) => new ClusterManagerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClusterManagerType other && Equals(other); + /// + public bool Equals(ClusterManagerType 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/ClusterSubnetType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ClusterSubnetType.cs new file mode 100644 index 000000000000..68e6d063d151 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ClusterSubnetType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Cluster subnet type. + public readonly partial struct ClusterSubnetType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ClusterSubnetType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SingleSubnetValue = "SingleSubnet"; + private const string MultiSubnetValue = "MultiSubnet"; + + /// SingleSubnet. + public static ClusterSubnetType SingleSubnet { get; } = new ClusterSubnetType(SingleSubnetValue); + /// MultiSubnet. + public static ClusterSubnetType MultiSubnet { get; } = new ClusterSubnetType(MultiSubnetValue); + /// Determines if two values are the same. + public static bool operator ==(ClusterSubnetType left, ClusterSubnetType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ClusterSubnetType left, ClusterSubnetType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ClusterSubnetType(string value) => new ClusterSubnetType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ClusterSubnetType other && Equals(other); + /// + public bool Equals(ClusterSubnetType 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/Commit.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Commit.cs new file mode 100644 index 000000000000..0f8f3b2dcf42 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Commit.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Replica commit mode in availability group. + public readonly partial struct Commit : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Commit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SynchronousCommitValue = "Synchronous_Commit"; + private const string AsynchronousCommitValue = "Asynchronous_Commit"; + + /// Synchronous_Commit. + public static Commit SynchronousCommit { get; } = new Commit(SynchronousCommitValue); + /// Asynchronous_Commit. + public static Commit AsynchronousCommit { get; } = new Commit(AsynchronousCommitValue); + /// Determines if two values are the same. + public static bool operator ==(Commit left, Commit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Commit left, Commit right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Commit(string value) => new Commit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Commit other && Equals(other); + /// + public bool Equals(Commit 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/ConnectivityType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ConnectivityType.cs new file mode 100644 index 000000000000..ee67173afcf7 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ConnectivityType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// SQL Server connectivity option. + public readonly partial struct ConnectivityType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConnectivityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LOCALValue = "LOCAL"; + private const string PRIVATEValue = "PRIVATE"; + private const string PUBLICValue = "PUBLIC"; + + /// LOCAL. + public static ConnectivityType LOCAL { get; } = new ConnectivityType(LOCALValue); + /// PRIVATE. + public static ConnectivityType PRIVATE { get; } = new ConnectivityType(PRIVATEValue); + /// PUBLIC. + public static ConnectivityType PUBLIC { get; } = new ConnectivityType(PUBLICValue); + /// Determines if two values are the same. + public static bool operator ==(ConnectivityType left, ConnectivityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConnectivityType left, ConnectivityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ConnectivityType(string value) => new ConnectivityType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConnectivityType other && Equals(other); + /// + public bool Equals(ConnectivityType 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/DayOfWeek.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DayOfWeek.Serialization.cs new file mode 100644 index 000000000000..90459b117516 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DayOfWeek.Serialization.cs @@ -0,0 +1,40 @@ +// 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 DayOfWeekExtensions + { + public static string ToSerialString(this DayOfWeek value) => value switch + { + DayOfWeek.Everyday => "Everyday", + DayOfWeek.Monday => "Monday", + DayOfWeek.Tuesday => "Tuesday", + DayOfWeek.Wednesday => "Wednesday", + DayOfWeek.Thursday => "Thursday", + DayOfWeek.Friday => "Friday", + DayOfWeek.Saturday => "Saturday", + DayOfWeek.Sunday => "Sunday", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DayOfWeek value.") + }; + + public static DayOfWeek ToDayOfWeek(this string value) + { + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Everyday")) return DayOfWeek.Everyday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Monday")) return DayOfWeek.Monday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Tuesday")) return DayOfWeek.Tuesday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Wednesday")) return DayOfWeek.Wednesday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Thursday")) return DayOfWeek.Thursday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Friday")) return DayOfWeek.Friday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Saturday")) return DayOfWeek.Saturday; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Sunday")) return DayOfWeek.Sunday; + throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DayOfWeek value."); + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingDayOfWeek.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DayOfWeek.cs similarity index 94% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingDayOfWeek.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DayOfWeek.cs index 8f9dea5c1eae..e16c1f26ac03 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingDayOfWeek.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DayOfWeek.cs @@ -8,7 +8,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Day of week to apply the patch on. - public enum SqlVmAutoPatchingDayOfWeek + public enum DayOfWeek { /// Everyday. Everyday, diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigAssessmentContent.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigAssessmentContent.Serialization.cs new file mode 100644 index 000000000000..ccf13eddb4e1 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigAssessmentContent.Serialization.cs @@ -0,0 +1,133 @@ +// 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 +{ + public partial class DiskConfigAssessmentContent : 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(DiskConfigAssessmentContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RunDiskConfigRules)) + { + writer.WritePropertyName("runDiskConfigRules"u8); + writer.WriteBooleanValue(RunDiskConfigRules.Value); + } + 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 + } + } + } + + DiskConfigAssessmentContent 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(DiskConfigAssessmentContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiskConfigAssessmentContent(document.RootElement, options); + } + + internal static DiskConfigAssessmentContent DeserializeDiskConfigAssessmentContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? runDiskConfigRules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("runDiskConfigRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runDiskConfigRules = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiskConfigAssessmentContent(runDiskConfigRules, 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(DiskConfigAssessmentContent)} does not support writing '{options.Format}' format."); + } + } + + DiskConfigAssessmentContent 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 DeserializeDiskConfigAssessmentContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiskConfigAssessmentContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigAssessmentContent.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigAssessmentContent.cs new file mode 100644 index 000000000000..e249d281b658 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigAssessmentContent.cs @@ -0,0 +1,65 @@ +// 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 DiskConfigAssessmentContent + { + /// + /// 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 . + public DiskConfigAssessmentContent() + { + } + + /// 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 DiskConfigAssessmentContent(bool? runDiskConfigRules, IDictionary serializedAdditionalRawData) + { + RunDiskConfigRules = runDiskConfigRules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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/DiskConfigurationType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigurationType.cs new file mode 100644 index 000000000000..bb01c9c90a2d --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/DiskConfigurationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Disk configuration to apply to SQL Server. + public readonly partial struct DiskConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DiskConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NEWValue = "NEW"; + private const string EXTENDValue = "EXTEND"; + private const string ADDValue = "ADD"; + + /// NEW. + public static DiskConfigurationType NEW { get; } = new DiskConfigurationType(NEWValue); + /// EXTEND. + public static DiskConfigurationType EXTEND { get; } = new DiskConfigurationType(EXTENDValue); + /// ADD. + public static DiskConfigurationType ADD { get; } = new DiskConfigurationType(ADDValue); + /// Determines if two values are the same. + public static bool operator ==(DiskConfigurationType left, DiskConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiskConfigurationType left, DiskConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DiskConfigurationType(string value) => new DiskConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiskConfigurationType other && Equals(other); + /// + public bool Equals(DiskConfigurationType 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/Failover.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Failover.cs new file mode 100644 index 000000000000..5f2ac1470cc1 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Failover.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Replica failover mode in availability group. + public readonly partial struct Failover : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Failover(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "Automatic"; + private const string ManualValue = "Manual"; + + /// Automatic. + public static Failover Automatic { get; } = new Failover(AutomaticValue); + /// Manual. + public static Failover Manual { get; } = new Failover(ManualValue); + /// Determines if two values are the same. + public static bool operator ==(Failover left, Failover right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Failover left, Failover right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Failover(string value) => new Failover(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Failover other && Equals(other); + /// + public bool Equals(Failover 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/FullBackupFrequencyType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/FullBackupFrequencyType.cs new file mode 100644 index 000000000000..f21fce0151b3 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/FullBackupFrequencyType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Frequency of full backups. In both cases, full backups begin during the next scheduled time window. + public readonly partial struct FullBackupFrequencyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FullBackupFrequencyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DailyValue = "Daily"; + private const string WeeklyValue = "Weekly"; + + /// Daily. + public static FullBackupFrequencyType Daily { get; } = new FullBackupFrequencyType(DailyValue); + /// Weekly. + public static FullBackupFrequencyType Weekly { get; } = new FullBackupFrequencyType(WeeklyValue); + /// Determines if two values are the same. + public static bool operator ==(FullBackupFrequencyType left, FullBackupFrequencyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FullBackupFrequencyType left, FullBackupFrequencyType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FullBackupFrequencyType(string value) => new FullBackupFrequencyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FullBackupFrequencyType other && Equals(other); + /// + public bool Equals(FullBackupFrequencyType 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/Info.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs new file mode 100644 index 000000000000..279e4c07c875 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.Serialization.cs @@ -0,0 +1,185 @@ +// 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 +{ + public partial class Info : 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(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" && _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 + } + } + } + + Info 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(Info)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInfo(document.RootElement, options); + } + + internal static Info DeserializeInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + OperationDisplay display = default; + OperationOrigin? origin = default; + IReadOnlyDictionary properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("display"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + display = OperationDisplay.DeserializeOperationDisplay(property.Value, options); + continue; + } + if (property.NameEquals("origin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + origin = new OperationOrigin(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, OperationProperty.DeserializeOperationProperty(property0.Value, options)); + } + properties = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Info(name, display, origin, properties ?? new ChangeTrackingDictionary(), 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(Info)} does not support writing '{options.Format}' format."); + } + } + + Info 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 DeserializeInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Info)} does not support reading '{options.Format}' format."); + } + } + + 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..991f880164ac --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Info.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; + +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. + /// + /// 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 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 serializedAdditionalRawData) + { + Name = name; + Display = display; + Origin = origin; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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/SqlVmKeyVaultCredentialSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/KeyVaultCredentialSettings.Serialization.cs similarity index 68% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/KeyVaultCredentialSettings.Serialization.cs index f06ade0b759f..358ceec6161a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/KeyVaultCredentialSettings.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmKeyVaultCredentialSettings : IUtf8JsonSerializable, IJsonModel + public partial class KeyVaultCredentialSettings : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,16 +28,16 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(KeyVaultCredentialSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) + if (Optional.IsDefined(Enable)) { writer.WritePropertyName("enable"u8); - writer.WriteBooleanValue(IsEnabled.Value); + writer.WriteBooleanValue(Enable.Value); } if (Optional.IsDefined(CredentialName)) { @@ -47,7 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(AzureKeyVaultUri)) { writer.WritePropertyName("azureKeyVaultUrl"u8); - writer.WriteStringValue(AzureKeyVaultUri.AbsoluteUri); + writer.WriteStringValue(AzureKeyVaultUri); } if (Optional.IsDefined(ServicePrincipalName)) { @@ -76,19 +76,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmKeyVaultCredentialSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + KeyVaultCredentialSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(KeyVaultCredentialSettings)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmKeyVaultCredentialSettings(document.RootElement, options); + return DeserializeKeyVaultCredentialSettings(document.RootElement, options); } - internal static SqlVmKeyVaultCredentialSettings DeserializeSqlVmKeyVaultCredentialSettings(JsonElement element, ModelReaderWriterOptions options = null) + internal static KeyVaultCredentialSettings DeserializeKeyVaultCredentialSettings(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -98,7 +98,7 @@ internal static SqlVmKeyVaultCredentialSettings DeserializeSqlVmKeyVaultCredenti } bool? enable = default; string credentialName = default; - Uri azureKeyVaultUrl = default; + string azureKeyVaultUrl = default; string servicePrincipalName = default; string servicePrincipalSecret = default; IDictionary serializedAdditionalRawData = default; @@ -121,11 +121,7 @@ internal static SqlVmKeyVaultCredentialSettings DeserializeSqlVmKeyVaultCredenti } if (property.NameEquals("azureKeyVaultUrl"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureKeyVaultUrl = new Uri(property.Value.GetString()); + azureKeyVaultUrl = property.Value.GetString(); continue; } if (property.NameEquals("servicePrincipalName"u8)) @@ -144,7 +140,7 @@ internal static SqlVmKeyVaultCredentialSettings DeserializeSqlVmKeyVaultCredenti } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmKeyVaultCredentialSettings( + return new KeyVaultCredentialSettings( enable, credentialName, azureKeyVaultUrl, @@ -153,35 +149,35 @@ internal static SqlVmKeyVaultCredentialSettings DeserializeSqlVmKeyVaultCredenti serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlVmKeyVaultCredentialSettings)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(KeyVaultCredentialSettings)} does not support writing '{options.Format}' format."); } } - SqlVmKeyVaultCredentialSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + KeyVaultCredentialSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmKeyVaultCredentialSettings(document.RootElement, options); + return DeserializeKeyVaultCredentialSettings(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmKeyVaultCredentialSettings)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(KeyVaultCredentialSettings)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/KeyVaultCredentialSettings.cs similarity index 79% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/KeyVaultCredentialSettings.cs index 6d9cda22d543..05ec3bbcdb24 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmKeyVaultCredentialSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/KeyVaultCredentialSettings.cs @@ -11,7 +11,7 @@ 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 + public partial class KeyVaultCredentialSettings { /// /// Keeps track of any properties unknown to the library. @@ -45,21 +45,21 @@ public partial class SqlVmKeyVaultCredentialSettings /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlVmKeyVaultCredentialSettings() + /// Initializes a new instance of . + public KeyVaultCredentialSettings() { } - /// Initializes a new instance of . - /// Enable or disable key vault credential setting. + /// Initializes a new instance of . + /// Enable or disable key vault credential setting. /// Credential name. /// 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) + internal KeyVaultCredentialSettings(bool? enable, string credentialName, string azureKeyVaultUri, string servicePrincipalName, string servicePrincipalSecret, IDictionary serializedAdditionalRawData) { - IsEnabled = isEnabled; + Enable = enable; CredentialName = credentialName; AzureKeyVaultUri = azureKeyVaultUri; ServicePrincipalName = servicePrincipalName; @@ -68,11 +68,11 @@ internal SqlVmKeyVaultCredentialSettings(bool? isEnabled, string credentialName, } /// Enable or disable key vault credential setting. - public bool? IsEnabled { get; set; } + public bool? Enable { get; set; } /// Credential name. public string CredentialName { get; set; } /// Azure Key Vault url. - public Uri AzureKeyVaultUri { get; set; } + public string AzureKeyVaultUri { get; set; } /// Service principal name to access key vault. public string ServicePrincipalName { get; set; } /// Service principal name secret to access key vault. 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..a1355909d3ec --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LeastPrivilegeMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// SQL IaaS Agent least privilege mode. + public readonly partial struct LeastPrivilegeMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LeastPrivilegeMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string NotSetValue = "NotSet"; + + /// Enabled. + public static LeastPrivilegeMode Enabled { get; } = new LeastPrivilegeMode(EnabledValue); + /// NotSet. + public static LeastPrivilegeMode NotSet { get; } = new LeastPrivilegeMode(NotSetValue); + /// Determines if two values are the same. + public static bool operator ==(LeastPrivilegeMode left, LeastPrivilegeMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LeastPrivilegeMode left, LeastPrivilegeMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LeastPrivilegeMode(string value) => 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/AvailabilityGroupListenerLoadBalancerConfiguration.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LoadBalancerConfiguration.Serialization.cs similarity index 57% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LoadBalancerConfiguration.Serialization.cs index b1d6d4a5076b..46ec11c09573 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LoadBalancerConfiguration.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class AvailabilityGroupListenerLoadBalancerConfiguration : IUtf8JsonSerializable, IJsonModel + public partial class LoadBalancerConfiguration : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(LoadBalancerConfiguration)} does not support writing '{format}' format."); } if (Optional.IsDefined(PrivateIPAddress)) @@ -54,17 +54,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("probePort"u8); writer.WriteNumberValue(ProbePort.Value); } - if (Optional.IsCollectionDefined(SqlVmInstances)) + if (Optional.IsCollectionDefined(SqlVirtualMachineInstances)) { writer.WritePropertyName("sqlVirtualMachineInstances"u8); writer.WriteStartArray(); - foreach (var item in SqlVmInstances) + foreach (var item in SqlVirtualMachineInstances) { - if (item == null) - { - writer.WriteNullValue(); - continue; - } writer.WriteStringValue(item); } writer.WriteEndArray(); @@ -86,19 +81,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AvailabilityGroupListenerLoadBalancerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + LoadBalancerConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(LoadBalancerConfiguration)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAvailabilityGroupListenerLoadBalancerConfiguration(document.RootElement, options); + return DeserializeLoadBalancerConfiguration(document.RootElement, options); } - internal static AvailabilityGroupListenerLoadBalancerConfiguration DeserializeAvailabilityGroupListenerLoadBalancerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + internal static LoadBalancerConfiguration DeserializeLoadBalancerConfiguration(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -106,11 +101,11 @@ internal static AvailabilityGroupListenerLoadBalancerConfiguration DeserializeAv { return null; } - AvailabilityGroupListenerPrivateIPAddress privateIPAddress = default; - ResourceIdentifier publicIPAddressResourceId = default; - ResourceIdentifier loadBalancerResourceId = default; + PrivateIPAddress privateIPAddress = default; + string publicIPAddressResourceId = default; + string loadBalancerResourceId = default; int? probePort = default; - IList sqlVmInstances = default; + IList sqlVirtualMachineInstances = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -121,25 +116,17 @@ internal static AvailabilityGroupListenerLoadBalancerConfiguration DeserializeAv { continue; } - privateIPAddress = AvailabilityGroupListenerPrivateIPAddress.DeserializeAvailabilityGroupListenerPrivateIPAddress(property.Value, options); + privateIPAddress = PrivateIPAddress.DeserializePrivateIPAddress(property.Value, options); continue; } if (property.NameEquals("publicIpAddressResourceId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - publicIPAddressResourceId = new ResourceIdentifier(property.Value.GetString()); + publicIPAddressResourceId = property.Value.GetString(); continue; } if (property.NameEquals("loadBalancerResourceId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loadBalancerResourceId = new ResourceIdentifier(property.Value.GetString()); + loadBalancerResourceId = property.Value.GetString(); continue; } if (property.NameEquals("probePort"u8)) @@ -157,19 +144,12 @@ internal static AvailabilityGroupListenerLoadBalancerConfiguration DeserializeAv { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(new ResourceIdentifier(item.GetString())); - } + array.Add(item.GetString()); } - sqlVmInstances = array; + sqlVirtualMachineInstances = array; continue; } if (options.Format != "W") @@ -178,44 +158,44 @@ internal static AvailabilityGroupListenerLoadBalancerConfiguration DeserializeAv } } serializedAdditionalRawData = rawDataDictionary; - return new AvailabilityGroupListenerLoadBalancerConfiguration( + return new LoadBalancerConfiguration( privateIPAddress, publicIPAddressResourceId, loadBalancerResourceId, probePort, - sqlVmInstances ?? new ChangeTrackingList(), + sqlVirtualMachineInstances ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(AvailabilityGroupListenerLoadBalancerConfiguration)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(LoadBalancerConfiguration)} does not support writing '{options.Format}' format."); } } - AvailabilityGroupListenerLoadBalancerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + LoadBalancerConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAvailabilityGroupListenerLoadBalancerConfiguration(document.RootElement, options); + return DeserializeLoadBalancerConfiguration(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AvailabilityGroupListenerLoadBalancerConfiguration)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(LoadBalancerConfiguration)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/LoadBalancerConfiguration.cs similarity index 68% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LoadBalancerConfiguration.cs index 4762cc167a4a..9bda153cdd17 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerLoadBalancerConfiguration.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/LoadBalancerConfiguration.cs @@ -7,12 +7,11 @@ using System; using System.Collections.Generic; -using Azure.Core; namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// A load balancer configuration for an availability group listener. - public partial class AvailabilityGroupListenerLoadBalancerConfiguration + public partial class LoadBalancerConfiguration { /// /// Keeps track of any properties unknown to the library. @@ -46,38 +45,38 @@ public partial class AvailabilityGroupListenerLoadBalancerConfiguration /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public AvailabilityGroupListenerLoadBalancerConfiguration() + /// Initializes a new instance of . + public LoadBalancerConfiguration() { - SqlVmInstances = new ChangeTrackingList(); + SqlVirtualMachineInstances = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// 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. + /// 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) + internal LoadBalancerConfiguration(PrivateIPAddress privateIPAddress, string publicIPAddressResourceId, string loadBalancerResourceId, int? probePort, IList sqlVirtualMachineInstances, IDictionary serializedAdditionalRawData) { PrivateIPAddress = privateIPAddress; PublicIPAddressResourceId = publicIPAddressResourceId; LoadBalancerResourceId = loadBalancerResourceId; ProbePort = probePort; - SqlVmInstances = sqlVmInstances; + SqlVirtualMachineInstances = sqlVirtualMachineInstances; _serializedAdditionalRawData = serializedAdditionalRawData; } /// Private IP address. - public AvailabilityGroupListenerPrivateIPAddress PrivateIPAddress { get; set; } + public PrivateIPAddress PrivateIPAddress { get; set; } /// Resource id of the public IP. - public ResourceIdentifier PublicIPAddressResourceId { get; set; } + public string PublicIPAddressResourceId { get; set; } /// Resource id of the load balancer. - public ResourceIdentifier LoadBalancerResourceId { get; set; } + public string 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; } + public IList SqlVirtualMachineInstances { get; } } } 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..3cba066caf8e 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 @@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("privateIpAddress"u8); writer.WriteObjectValue(PrivateIPAddress, options); writer.WritePropertyName("sqlVirtualMachineInstance"u8); - writer.WriteStringValue(SqlVmInstance); + writer.WriteStringValue(SqlVirtualMachineInstance); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -75,20 +75,20 @@ internal static MultiSubnetIPConfiguration DeserializeMultiSubnetIPConfiguration { return null; } - AvailabilityGroupListenerPrivateIPAddress privateIPAddress = default; - string sqlVmInstance = default; + PrivateIPAddress privateIPAddress = default; + string sqlVirtualMachineInstance = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("privateIpAddress"u8)) { - privateIPAddress = AvailabilityGroupListenerPrivateIPAddress.DeserializeAvailabilityGroupListenerPrivateIPAddress(property.Value, options); + privateIPAddress = PrivateIPAddress.DeserializePrivateIPAddress(property.Value, options); continue; } if (property.NameEquals("sqlVirtualMachineInstance"u8)) { - sqlVmInstance = property.Value.GetString(); + sqlVirtualMachineInstance = property.Value.GetString(); continue; } if (options.Format != "W") @@ -97,7 +97,7 @@ internal static MultiSubnetIPConfiguration DeserializeMultiSubnetIPConfiguration } } serializedAdditionalRawData = rawDataDictionary; - return new MultiSubnetIPConfiguration(privateIPAddress, sqlVmInstance, serializedAdditionalRawData); + return new MultiSubnetIPConfiguration(privateIPAddress, sqlVirtualMachineInstance, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) 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..34c9e9b0bafa 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/MultiSubnetIPConfiguration.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/MultiSubnetIPConfiguration.cs @@ -47,25 +47,25 @@ public partial class MultiSubnetIPConfiguration /// Initializes a new instance of . /// Private IP address. - /// SQL virtual machine instance resource id that are enrolled into the availability group listener. - /// or is null. - public MultiSubnetIPConfiguration(AvailabilityGroupListenerPrivateIPAddress privateIPAddress, string sqlVmInstance) + /// SQL virtual machine instance resource id that are enrolled into the availability group listener. + /// or is null. + public MultiSubnetIPConfiguration(PrivateIPAddress privateIPAddress, string sqlVirtualMachineInstance) { Argument.AssertNotNull(privateIPAddress, nameof(privateIPAddress)); - Argument.AssertNotNull(sqlVmInstance, nameof(sqlVmInstance)); + Argument.AssertNotNull(sqlVirtualMachineInstance, nameof(sqlVirtualMachineInstance)); PrivateIPAddress = privateIPAddress; - SqlVmInstance = sqlVmInstance; + SqlVirtualMachineInstance = sqlVirtualMachineInstance; } /// Initializes a new instance of . /// Private IP address. - /// SQL virtual machine instance resource id that are enrolled into the availability group listener. + /// 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) + internal MultiSubnetIPConfiguration(PrivateIPAddress privateIPAddress, string sqlVirtualMachineInstance, IDictionary serializedAdditionalRawData) { PrivateIPAddress = privateIPAddress; - SqlVmInstance = sqlVmInstance; + SqlVirtualMachineInstance = sqlVirtualMachineInstance; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -75,8 +75,8 @@ internal MultiSubnetIPConfiguration() } /// Private IP address. - public AvailabilityGroupListenerPrivateIPAddress PrivateIPAddress { get; set; } + public PrivateIPAddress PrivateIPAddress { get; set; } /// SQL virtual machine instance resource id that are enrolled into the availability group listener. - public string SqlVmInstance { get; set; } + public string SqlVirtualMachineInstance { get; set; } } } 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..93dc7faab9cd --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OSType.Serialization.cs @@ -0,0 +1,28 @@ +// 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 + { + public static string ToSerialString(this OSType value) => value switch + { + OSType.Windows => "Windows", + OSType.Linux => "Linux", + _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown OSType value.") + }; + + 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..42a3ba819fbb --- /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/OperationDisplay.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.Serialization.cs new file mode 100644 index 000000000000..df921760a78a --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.Serialization.cs @@ -0,0 +1,162 @@ +// 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 +{ + public partial class OperationDisplay : 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(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" && _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 + } + } + } + + OperationDisplay 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(OperationDisplay)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationDisplay(document.RootElement, options); + } + + internal static OperationDisplay DeserializeOperationDisplay(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string provider = default; + string resource = default; + string operation = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provider"u8)) + { + provider = property.Value.GetString(); + continue; + } + if (property.NameEquals("resource"u8)) + { + resource = property.Value.GetString(); + continue; + } + if (property.NameEquals("operation"u8)) + { + operation = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OperationDisplay(provider, resource, operation, description, 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(OperationDisplay)} does not support writing '{options.Format}' format."); + } + } + + OperationDisplay 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 DeserializeOperationDisplay(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationDisplay)} does not support reading '{options.Format}' format."); + } + } + + 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..cef6c7c12fbb --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationDisplay.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; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Display metadata associated with the operation. + public partial class OperationDisplay + { + /// + /// 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 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 serializedAdditionalRawData) + { + Provider = provider; + Resource = resource; + Operation = operation; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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/SqlVmListResult.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs similarity index 65% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs index e967e8de05f9..dc95192b755f 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmListResult.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - internal partial class SqlVmListResult : IUtf8JsonSerializable, IJsonModel + internal partial class OperationListResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,13 +28,13 @@ 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; + 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."); + throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ 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) { @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + OperationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(OperationListResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmListResult(document.RootElement, options); + return DeserializeOperationListResult(document.RootElement, options); } - internal static SqlVmListResult DeserializeSqlVmListResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static OperationListResult DeserializeOperationListResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -86,29 +86,29 @@ internal static SqlVmListResult DeserializeSqlVmListResult(JsonElement element, { return null; } - IReadOnlyList value = default; - string nextLink = default; + IReadOnlyList value = default; + Uri 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(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(SqlVmData.DeserializeSqlVmData(item, options)); + array.Add(Info.DeserializeInfo(item, options)); } value = array; continue; } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,38 +117,38 @@ internal static SqlVmListResult DeserializeSqlVmListResult(JsonElement element, } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new OperationListResult(value, nextLink, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{options.Format}' format."); } } - SqlVmListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + OperationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeOperationListResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmListResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(OperationListResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } 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..0a75b5b2f342 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationListResult.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 System.Linq; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Virtual machine resource id for response. + internal partial class OperationListResult + { + /// + /// 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 . + /// The Operation items on this page. + internal OperationListResult(IEnumerable value) + { + Value = value.ToList(); + } + + /// 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 serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OperationListResult() + { + } + + /// 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..6fcaa5219b56 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationOrigin.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// The intended executor of the operation. + public readonly partial struct OperationOrigin : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public OperationOrigin(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UserValue = "user"; + private const string SystemValue = "system"; + + /// user. + public static OperationOrigin User { get; } = new OperationOrigin(UserValue); + /// system. + public static OperationOrigin System { get; } = new OperationOrigin(SystemValue); + /// Determines if two values are the same. + public static bool operator ==(OperationOrigin left, OperationOrigin right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(OperationOrigin left, OperationOrigin right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator OperationOrigin(string value) => 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..cda5bb5b7e0f --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.Serialization.cs @@ -0,0 +1,118 @@ +// 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 +{ + public partial class OperationProperty : 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(OperationProperty)} does not support writing '{format}' format."); + } + + 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 + } + } + } + + OperationProperty 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(OperationProperty)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationProperty(document.RootElement, options); + } + + internal static OperationProperty DeserializeOperationProperty(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OperationProperty(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(OperationProperty)} does not support writing '{options.Format}' format."); + } + } + + OperationProperty 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 DeserializeOperationProperty(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationProperty)} does not support reading '{options.Format}' format."); + } + } + + 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..ec4286b0e22a --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/OperationProperty.cs @@ -0,0 +1,60 @@ +// 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. + /// + /// 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 OperationProperty() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal OperationProperty(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/PrivateIPAddress.Serialization.cs similarity index 55% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/PrivateIPAddress.Serialization.cs index e0a84db0f54c..50b1ff128378 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/PrivateIPAddress.Serialization.cs @@ -8,17 +8,16 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.Net; using System.Text.Json; using Azure.Core; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class AvailabilityGroupListenerPrivateIPAddress : IUtf8JsonSerializable, IJsonModel + public partial class PrivateIPAddress : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -29,16 +28,16 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(PrivateIPAddress)} does not support writing '{format}' format."); } if (Optional.IsDefined(IPAddress)) { writer.WritePropertyName("ipAddress"u8); - writer.WriteStringValue(IPAddress.ToString()); + writer.WriteStringValue(IPAddress); } if (Optional.IsDefined(SubnetResourceId)) { @@ -62,19 +61,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AvailabilityGroupListenerPrivateIPAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + PrivateIPAddress IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(PrivateIPAddress)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAvailabilityGroupListenerPrivateIPAddress(document.RootElement, options); + return DeserializePrivateIPAddress(document.RootElement, options); } - internal static AvailabilityGroupListenerPrivateIPAddress DeserializeAvailabilityGroupListenerPrivateIPAddress(JsonElement element, ModelReaderWriterOptions options = null) + internal static PrivateIPAddress DeserializePrivateIPAddress(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -82,28 +81,20 @@ internal static AvailabilityGroupListenerPrivateIPAddress DeserializeAvailabilit { return null; } - IPAddress ipAddress = default; - ResourceIdentifier subnetResourceId = default; + string ipAddress = default; + string subnetResourceId = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("ipAddress"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - ipAddress = IPAddress.Parse(property.Value.GetString()); + ipAddress = property.Value.GetString(); continue; } if (property.NameEquals("subnetResourceId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - subnetResourceId = new ResourceIdentifier(property.Value.GetString()); + subnetResourceId = property.Value.GetString(); continue; } if (options.Format != "W") @@ -112,38 +103,38 @@ internal static AvailabilityGroupListenerPrivateIPAddress DeserializeAvailabilit } } serializedAdditionalRawData = rawDataDictionary; - return new AvailabilityGroupListenerPrivateIPAddress(ipAddress, subnetResourceId, serializedAdditionalRawData); + return new PrivateIPAddress(ipAddress, subnetResourceId, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(AvailabilityGroupListenerPrivateIPAddress)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(PrivateIPAddress)} does not support writing '{options.Format}' format."); } } - AvailabilityGroupListenerPrivateIPAddress IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + PrivateIPAddress IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAvailabilityGroupListenerPrivateIPAddress(document.RootElement, options); + return DeserializePrivateIPAddress(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AvailabilityGroupListenerPrivateIPAddress)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(PrivateIPAddress)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/PrivateIPAddress.cs similarity index 77% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/PrivateIPAddress.cs index 260a426835c8..e99ec2726759 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/AvailabilityGroupListenerPrivateIPAddress.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/PrivateIPAddress.cs @@ -7,13 +7,11 @@ using System; using System.Collections.Generic; -using System.Net; -using Azure.Core; namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// A private IP address bound to the availability group listener. - public partial class AvailabilityGroupListenerPrivateIPAddress + public partial class PrivateIPAddress { /// /// Keeps track of any properties unknown to the library. @@ -47,16 +45,16 @@ public partial class AvailabilityGroupListenerPrivateIPAddress /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public AvailabilityGroupListenerPrivateIPAddress() + /// Initializes a new instance of . + public PrivateIPAddress() { } - /// Initializes a new instance of . + /// 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) + internal PrivateIPAddress(string ipAddress, string subnetResourceId, IDictionary serializedAdditionalRawData) { IPAddress = ipAddress; SubnetResourceId = subnetResourceId; @@ -64,8 +62,8 @@ internal AvailabilityGroupListenerPrivateIPAddress(IPAddress ipAddress, Resource } /// Private IP address bound to the availability group listener. - public IPAddress IPAddress { get; set; } + public string IPAddress { get; set; } /// Subnet used to include private IP. - public ResourceIdentifier SubnetResourceId { get; set; } + public string SubnetResourceId { get; set; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondary.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondary.cs new file mode 100644 index 000000000000..7663ec7d41ed --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondary.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Replica readable secondary mode in availability group. + public readonly partial struct ReadableSecondary : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ReadableSecondary(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoValue = "No"; + private const string AllValue = "All"; + private const string ReadOnlyValue = "Read_Only"; + + /// No. + public static ReadableSecondary No { get; } = new ReadableSecondary(NoValue); + /// All. + public static ReadableSecondary All { get; } = new ReadableSecondary(AllValue); + /// Read_Only. + public static ReadableSecondary ReadOnly { get; } = new ReadableSecondary(ReadOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(ReadableSecondary left, ReadableSecondary right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ReadableSecondary left, ReadableSecondary right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ReadableSecondary(string value) => new ReadableSecondary(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ReadableSecondary other && Equals(other); + /// + public bool Equals(ReadableSecondary 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/ReadableSecondaryMode.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondaryMode.cs deleted file mode 100644 index 0306844f6155..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ReadableSecondaryMode.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Replica readable secondary mode in availability group. - public readonly partial struct ReadableSecondaryMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ReadableSecondaryMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoValue = "NO"; - private const string AllValue = "ALL"; - private const string ReadOnlyValue = "READ_ONLY"; - - /// NO. - public static ReadableSecondaryMode No { get; } = new ReadableSecondaryMode(NoValue); - /// ALL. - public static ReadableSecondaryMode All { get; } = new ReadableSecondaryMode(AllValue); - /// READ_ONLY. - public static ReadableSecondaryMode ReadOnly { get; } = new ReadableSecondaryMode(ReadOnlyValue); - /// Determines if two values are the same. - public static bool operator ==(ReadableSecondaryMode left, ReadableSecondaryMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ReadableSecondaryMode left, ReadableSecondaryMode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ReadableSecondaryMode(string value) => 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/Role.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Role.cs new file mode 100644 index 000000000000..3a75e9aa858d --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Role.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Replica Role in availability group. + public readonly partial struct Role : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Role(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + + /// Primary. + public static Role Primary { get; } = new Role(PrimaryValue); + /// Secondary. + public static Role Secondary { get; } = new Role(SecondaryValue); + /// Determines if two values are the same. + public static bool operator ==(Role left, Role right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Role left, Role right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Role(string value) => new Role(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Role other && Equals(other); + /// + public bool Equals(Role 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 similarity index 83% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SQLInstanceSettings.Serialization.cs index 0f2253f0d22f..a0c82d34b87a 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 @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlInstanceSettings : IUtf8JsonSerializable, IJsonModel + public partial class SQLInstanceSettings : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(SQLInstanceSettings)} does not support writing '{format}' format."); } if (Optional.IsDefined(Collation)) @@ -49,15 +49,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("isOptimizeForAdHocWorkloadsEnabled"u8); writer.WriteBooleanValue(IsOptimizeForAdHocWorkloadsEnabled.Value); } - if (Optional.IsDefined(MinServerMemoryInMB)) + if (Optional.IsDefined(MinServerMemoryMB)) { writer.WritePropertyName("minServerMemoryMB"u8); - writer.WriteNumberValue(MinServerMemoryInMB.Value); + writer.WriteNumberValue(MinServerMemoryMB.Value); } - if (Optional.IsDefined(MaxServerMemoryInMB)) + if (Optional.IsDefined(MaxServerMemoryMB)) { writer.WritePropertyName("maxServerMemoryMB"u8); - writer.WriteNumberValue(MaxServerMemoryInMB.Value); + writer.WriteNumberValue(MaxServerMemoryMB.Value); } if (Optional.IsDefined(IsLpimEnabled)) { @@ -86,19 +86,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlInstanceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SQLInstanceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + 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); + return DeserializeSQLInstanceSettings(document.RootElement, options); } - internal static SqlInstanceSettings DeserializeSqlInstanceSettings(JsonElement element, ModelReaderWriterOptions options = null) + internal static SQLInstanceSettings DeserializeSQLInstanceSettings(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -182,7 +182,7 @@ internal static SqlInstanceSettings DeserializeSqlInstanceSettings(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new SqlInstanceSettings( + return new SQLInstanceSettings( collation, maxDop, isOptimizeForAdHocWorkloadsEnabled, @@ -193,35 +193,35 @@ internal static SqlInstanceSettings DeserializeSqlInstanceSettings(JsonElement e serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlInstanceSettings)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SQLInstanceSettings)} does not support writing '{options.Format}' format."); } } - SqlInstanceSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SQLInstanceSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlInstanceSettings(document.RootElement, options); + return DeserializeSQLInstanceSettings(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlInstanceSettings)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SQLInstanceSettings)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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 similarity index 82% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SQLInstanceSettings.cs index d41863727159..8a0531645eef 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlInstanceSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SQLInstanceSettings.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Set the server/instance-level settings for SQL Server. - public partial class SqlInstanceSettings + public partial class SQLInstanceSettings { /// /// Keeps track of any properties unknown to the library. @@ -45,27 +45,27 @@ public partial class SqlInstanceSettings /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlInstanceSettings() + /// Initializes a new instance of . + public SQLInstanceSettings() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// SQL Server Collation. /// SQL Server MAXDOP. /// SQL Server Optimize for Adhoc workloads. - /// SQL Server minimum memory. - /// SQL Server maximum memory. + /// SQL Server minimum memory. + /// 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) + internal SQLInstanceSettings(string collation, int? maxDop, bool? isOptimizeForAdHocWorkloadsEnabled, int? minServerMemoryMB, int? maxServerMemoryMB, bool? isLpimEnabled, bool? isIfiEnabled, IDictionary serializedAdditionalRawData) { Collation = collation; MaxDop = maxDop; IsOptimizeForAdHocWorkloadsEnabled = isOptimizeForAdHocWorkloadsEnabled; - MinServerMemoryInMB = minServerMemoryInMB; - MaxServerMemoryInMB = maxServerMemoryInMB; + MinServerMemoryMB = minServerMemoryMB; + MaxServerMemoryMB = maxServerMemoryMB; IsLpimEnabled = isLpimEnabled; IsIfiEnabled = isIfiEnabled; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -78,9 +78,9 @@ internal SqlInstanceSettings(string collation, int? maxDop, bool? isOptimizeForA /// SQL Server Optimize for Adhoc workloads. public bool? IsOptimizeForAdHocWorkloadsEnabled { get; set; } /// SQL Server minimum memory. - public int? MinServerMemoryInMB { get; set; } + public int? MinServerMemoryMB { get; set; } /// SQL Server maximum memory. - public int? MaxServerMemoryInMB { get; set; } + public int? MaxServerMemoryMB { get; set; } /// SQL Server LPIM. public bool? IsLpimEnabled { get; set; } /// SQL Server IFI. 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 similarity index 71% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SQLStorageSettings.Serialization.cs index 3c977a790fb3..e1ea940cb7e3 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 @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlStorageSettings : IUtf8JsonSerializable, IJsonModel + public partial class SQLStorageSettings : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(SQLStorageSettings)} does not support writing '{format}' format."); } if (Optional.IsCollectionDefined(Luns)) @@ -49,6 +49,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("defaultFilePath"u8); writer.WriteStringValue(DefaultFilePath); } + if (Optional.IsDefined(UseStoragePool)) + { + writer.WritePropertyName("useStoragePool"u8); + writer.WriteBooleanValue(UseStoragePool.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -66,19 +71,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlStorageSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SQLStorageSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + 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); + return DeserializeSQLStorageSettings(document.RootElement, options); } - internal static SqlStorageSettings DeserializeSqlStorageSettings(JsonElement element, ModelReaderWriterOptions options = null) + internal static SQLStorageSettings DeserializeSQLStorageSettings(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -88,6 +93,7 @@ internal static SqlStorageSettings DeserializeSqlStorageSettings(JsonElement ele } IList luns = default; string defaultFilePath = default; + bool? useStoragePool = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -111,44 +117,53 @@ internal static SqlStorageSettings DeserializeSqlStorageSettings(JsonElement ele defaultFilePath = property.Value.GetString(); continue; } + if (property.NameEquals("useStoragePool"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useStoragePool = property.Value.GetBoolean(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new SqlStorageSettings(luns ?? new ChangeTrackingList(), defaultFilePath, serializedAdditionalRawData); + return new SQLStorageSettings(luns ?? new ChangeTrackingList(), defaultFilePath, useStoragePool, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlStorageSettings)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SQLStorageSettings)} does not support writing '{options.Format}' format."); } } - SqlStorageSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SQLStorageSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlStorageSettings(document.RootElement, options); + return DeserializeSQLStorageSettings(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlStorageSettings)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SQLStorageSettings)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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 similarity index 80% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SQLStorageSettings.cs index 5be7ee361ce0..6092262e59d8 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SQLStorageSettings.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Set disk storage settings for SQL Server. - public partial class SqlStorageSettings + public partial class SQLStorageSettings { /// /// Keeps track of any properties unknown to the library. @@ -45,20 +45,22 @@ public partial class SqlStorageSettings /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlStorageSettings() + /// Initializes a new instance of . + public SQLStorageSettings() { Luns = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Logical Unit Numbers for the disks. /// SQL Server default file path. + /// 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, IDictionary serializedAdditionalRawData) + internal SQLStorageSettings(IList luns, string defaultFilePath, bool? useStoragePool, IDictionary serializedAdditionalRawData) { Luns = luns; DefaultFilePath = defaultFilePath; + UseStoragePool = useStoragePool; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -66,5 +68,7 @@ internal SqlStorageSettings(IList luns, string defaultFilePath, IDictionary 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/SqlTempDBSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SQLTempDbSettings.Serialization.cs similarity index 81% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SQLTempDbSettings.Serialization.cs index e3b17b5eeaa5..d815068ba9cb 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 @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlTempDBSettings : IUtf8JsonSerializable, IJsonModel + public partial class SQLTempDbSettings : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(SQLTempDbSettings)} does not support writing '{format}' format."); } if (Optional.IsDefined(DataFileSize)) @@ -69,11 +69,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("persistFolderPath"u8); writer.WriteStringValue(PersistFolderPath); } - if (Optional.IsCollectionDefined(LogicalUnitNumbers)) + if (Optional.IsCollectionDefined(Luns)) { writer.WritePropertyName("luns"u8); writer.WriteStartArray(); - foreach (var item in LogicalUnitNumbers) + foreach (var item in Luns) { writer.WriteNumberValue(item); } @@ -84,6 +84,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("defaultFilePath"u8); writer.WriteStringValue(DefaultFilePath); } + if (Optional.IsDefined(UseStoragePool)) + { + writer.WritePropertyName("useStoragePool"u8); + writer.WriteBooleanValue(UseStoragePool.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -101,19 +106,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlTempDBSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SQLTempDbSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + 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); + return DeserializeSQLTempDbSettings(document.RootElement, options); } - internal static SqlTempDBSettings DeserializeSqlTempDBSettings(JsonElement element, ModelReaderWriterOptions options = null) + internal static SQLTempDbSettings DeserializeSQLTempDbSettings(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -130,6 +135,7 @@ internal static SqlTempDBSettings DeserializeSqlTempDBSettings(JsonElement eleme string persistFolderPath = default; IList luns = default; string defaultFilePath = default; + bool? useStoragePool = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -212,13 +218,22 @@ internal static SqlTempDBSettings DeserializeSqlTempDBSettings(JsonElement eleme defaultFilePath = property.Value.GetString(); continue; } + if (property.NameEquals("useStoragePool"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useStoragePool = property.Value.GetBoolean(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new SqlTempDBSettings( + return new SQLTempDbSettings( dataFileSize, dataGrowth, logFileSize, @@ -228,38 +243,39 @@ internal static SqlTempDBSettings DeserializeSqlTempDBSettings(JsonElement eleme persistFolderPath, luns ?? new ChangeTrackingList(), defaultFilePath, + useStoragePool, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlTempDBSettings)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SQLTempDbSettings)} does not support writing '{options.Format}' format."); } } - SqlTempDBSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SQLTempDbSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlTempDBSettings(document.RootElement, options); + return DeserializeSQLTempDbSettings(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlTempDBSettings)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SQLTempDbSettings)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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 similarity index 81% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SQLTempDbSettings.cs index 3c52b53db33a..68c8e7303c62 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlTempDBSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SQLTempDbSettings.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// The SqlTempDBSettings. - public partial class SqlTempDBSettings + /// Set tempDb storage settings for SQL Server. + public partial class SQLTempDbSettings { /// /// Keeps track of any properties unknown to the library. @@ -45,13 +45,13 @@ public partial class SqlTempDBSettings /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlTempDBSettings() + /// Initializes a new instance of . + public SQLTempDbSettings() { - LogicalUnitNumbers = new ChangeTrackingList(); + Luns = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// SQL Server tempdb data file size. /// SQL Server tempdb data file autoGrowth size. /// SQL Server tempdb log file size. @@ -59,10 +59,11 @@ public SqlTempDBSettings() /// SQL Server tempdb data file count. /// SQL Server tempdb persist folder choice. /// SQL Server tempdb persist folder location. - /// Logical Unit Numbers for the disks. + /// Logical Unit Numbers for the disks. /// SQL Server default file path. + /// 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, IDictionary serializedAdditionalRawData) + internal SQLTempDbSettings(int? dataFileSize, int? dataGrowth, int? logFileSize, int? logGrowth, int? dataFileCount, bool? persistFolder, string persistFolderPath, IList luns, string defaultFilePath, bool? useStoragePool, IDictionary serializedAdditionalRawData) { DataFileSize = dataFileSize; DataGrowth = dataGrowth; @@ -71,8 +72,9 @@ internal SqlTempDBSettings(int? dataFileSize, int? dataGrowth, int? logFileSize, DataFileCount = dataFileCount; PersistFolder = persistFolder; PersistFolderPath = persistFolderPath; - LogicalUnitNumbers = logicalUnitNumbers; + Luns = luns; DefaultFilePath = defaultFilePath; + UseStoragePool = useStoragePool; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -91,8 +93,10 @@ internal SqlTempDBSettings(int? dataFileSize, int? dataGrowth, int? logFileSize, /// SQL Server tempdb persist folder location. public string PersistFolderPath { get; set; } /// Logical Unit Numbers for the disks. - public IList LogicalUnitNumbers { get; } + 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/SqlVmGroupScaleType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ScaleType.cs similarity index 51% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupScaleType.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ScaleType.cs index f4ac937b0b98..2f7c6257f44e 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupScaleType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ScaleType.cs @@ -11,13 +11,13 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Scale type. - public readonly partial struct SqlVmGroupScaleType : IEquatable + public readonly partial struct ScaleType : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public SqlVmGroupScaleType(string value) + public ScaleType(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -25,19 +25,19 @@ public SqlVmGroupScaleType(string value) private const string HAValue = "HA"; /// HA. - public static SqlVmGroupScaleType HA { get; } = new SqlVmGroupScaleType(HAValue); - /// Determines if two values are the same. - public static bool operator ==(SqlVmGroupScaleType left, SqlVmGroupScaleType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlVmGroupScaleType left, SqlVmGroupScaleType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SqlVmGroupScaleType(string value) => new SqlVmGroupScaleType(value); + public static ScaleType HA { get; } = new ScaleType(HAValue); + /// Determines if two values are the same. + public static bool operator ==(ScaleType left, ScaleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ScaleType left, ScaleType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ScaleType(string value) => new ScaleType(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SqlVmGroupScaleType other && Equals(other); + public override bool Equals(object obj) => obj is ScaleType other && Equals(other); /// - public bool Equals(SqlVmGroupScaleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(ScaleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Schedule.Serialization.cs similarity index 73% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Schedule.Serialization.cs index 9b9a7b257f34..fb73b9e93c89 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Schedule.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmAssessmentSchedule : IUtf8JsonSerializable, IJsonModel + public partial class Schedule : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,16 +28,16 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(Schedule)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsEnabled)) + if (Optional.IsDefined(Enable)) { writer.WritePropertyName("enable"u8); - writer.WriteBooleanValue(IsEnabled.Value); + writer.WriteBooleanValue(Enable.Value); } if (Optional.IsDefined(WeeklyInterval)) { @@ -76,19 +76,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmAssessmentSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + Schedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(Schedule)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmAssessmentSchedule(document.RootElement, options); + return DeserializeSchedule(document.RootElement, options); } - internal static SqlVmAssessmentSchedule DeserializeSqlVmAssessmentSchedule(JsonElement element, ModelReaderWriterOptions options = null) + internal static Schedule DeserializeSchedule(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -99,7 +99,7 @@ internal static SqlVmAssessmentSchedule DeserializeSqlVmAssessmentSchedule(JsonE bool? enable = default; int? weeklyInterval = default; int? monthlyOccurrence = default; - SqlVmAssessmentDayOfWeek? dayOfWeek = default; + AssessmentDayOfWeek? dayOfWeek = default; string startTime = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -138,7 +138,7 @@ internal static SqlVmAssessmentSchedule DeserializeSqlVmAssessmentSchedule(JsonE { continue; } - dayOfWeek = property.Value.GetString().ToSqlVmAssessmentDayOfWeek(); + dayOfWeek = property.Value.GetString().ToAssessmentDayOfWeek(); continue; } if (property.NameEquals("startTime"u8)) @@ -152,7 +152,7 @@ internal static SqlVmAssessmentSchedule DeserializeSqlVmAssessmentSchedule(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmAssessmentSchedule( + return new Schedule( enable, weeklyInterval, monthlyOccurrence, @@ -161,35 +161,35 @@ internal static SqlVmAssessmentSchedule DeserializeSqlVmAssessmentSchedule(JsonE serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlVmAssessmentSchedule)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(Schedule)} does not support writing '{options.Format}' format."); } } - SqlVmAssessmentSchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + Schedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmAssessmentSchedule(document.RootElement, options); + return DeserializeSchedule(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmAssessmentSchedule)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(Schedule)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/Schedule.cs similarity index 82% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Schedule.cs index a6b066b5c3e4..b1eff3762d27 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentSchedule.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/Schedule.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// The SqlVmAssessmentSchedule. - public partial class SqlVmAssessmentSchedule + /// Set assessment schedule for SQL Server. + public partial class Schedule { /// /// Keeps track of any properties unknown to the library. @@ -45,21 +45,21 @@ public partial class SqlVmAssessmentSchedule /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlVmAssessmentSchedule() + /// Initializes a new instance of . + public Schedule() { } - /// Initializes a new instance of . - /// Enable or disable assessment schedule on SQL virtual machine. + /// Initializes a new instance of . + /// Enable or disable assessment schedule on SQL virtual machine. /// Number of weeks to schedule between 2 assessment runs. Takes value from 1-6. /// 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) + internal Schedule(bool? enable, int? weeklyInterval, int? monthlyOccurrence, AssessmentDayOfWeek? dayOfWeek, string startTime, IDictionary serializedAdditionalRawData) { - IsEnabled = isEnabled; + Enable = enable; WeeklyInterval = weeklyInterval; MonthlyOccurrence = monthlyOccurrence; DayOfWeek = dayOfWeek; @@ -68,13 +68,13 @@ internal SqlVmAssessmentSchedule(bool? isEnabled, int? weeklyInterval, int? mont } /// Enable or disable assessment schedule on SQL virtual machine. - public bool? IsEnabled { get; set; } + public bool? Enable { 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; } + public AssessmentDayOfWeek? 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/SqlServerConfigurationsManagementSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ServerConfigurationsManagementSettings.Serialization.cs similarity index 68% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ServerConfigurationsManagementSettings.Serialization.cs index 32ba7ff9cae4..e261edda07f3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ServerConfigurationsManagementSettings.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlServerConfigurationsManagementSettings : IUtf8JsonSerializable, IJsonModel + public partial class ServerConfigurationsManagementSettings : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(ServerConfigurationsManagementSettings)} does not support writing '{format}' format."); } if (Optional.IsDefined(SqlConnectivityUpdateSettings)) @@ -59,6 +59,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("sqlInstanceSettings"u8); writer.WriteObjectValue(SqlInstanceSettings, options); } + if (Optional.IsDefined(AzureAdAuthenticationSettings)) + { + writer.WritePropertyName("azureAdAuthenticationSettings"u8); + writer.WriteObjectValue(AzureAdAuthenticationSettings, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -76,19 +81,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlServerConfigurationsManagementSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + ServerConfigurationsManagementSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(ServerConfigurationsManagementSettings)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlServerConfigurationsManagementSettings(document.RootElement, options); + return DeserializeServerConfigurationsManagementSettings(document.RootElement, options); } - internal static SqlServerConfigurationsManagementSettings DeserializeSqlServerConfigurationsManagementSettings(JsonElement element, ModelReaderWriterOptions options = null) + internal static ServerConfigurationsManagementSettings DeserializeServerConfigurationsManagementSettings(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -100,7 +105,8 @@ internal static SqlServerConfigurationsManagementSettings DeserializeSqlServerCo SqlWorkloadTypeUpdateSettings sqlWorkloadTypeUpdateSettings = default; SqlStorageUpdateSettings sqlStorageUpdateSettings = default; AdditionalFeaturesServerConfigurations additionalFeaturesServerConfigurations = default; - SqlInstanceSettings sqlInstanceSettings = default; + SQLInstanceSettings sqlInstanceSettings = default; + AADAuthenticationSettings azureAdAuthenticationSettings = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -147,7 +153,16 @@ internal static SqlServerConfigurationsManagementSettings DeserializeSqlServerCo { continue; } - sqlInstanceSettings = SqlInstanceSettings.DeserializeSqlInstanceSettings(property.Value, options); + sqlInstanceSettings = SQLInstanceSettings.DeserializeSQLInstanceSettings(property.Value, options); + continue; + } + if (property.NameEquals("azureAdAuthenticationSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + azureAdAuthenticationSettings = AADAuthenticationSettings.DeserializeAADAuthenticationSettings(property.Value, options); continue; } if (options.Format != "W") @@ -156,44 +171,45 @@ internal static SqlServerConfigurationsManagementSettings DeserializeSqlServerCo } } serializedAdditionalRawData = rawDataDictionary; - return new SqlServerConfigurationsManagementSettings( + return new ServerConfigurationsManagementSettings( sqlConnectivityUpdateSettings, sqlWorkloadTypeUpdateSettings, sqlStorageUpdateSettings, additionalFeaturesServerConfigurations, sqlInstanceSettings, + azureAdAuthenticationSettings, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlServerConfigurationsManagementSettings)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(ServerConfigurationsManagementSettings)} does not support writing '{options.Format}' format."); } } - SqlServerConfigurationsManagementSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + ServerConfigurationsManagementSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlServerConfigurationsManagementSettings(document.RootElement, options); + return DeserializeServerConfigurationsManagementSettings(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlServerConfigurationsManagementSettings)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(ServerConfigurationsManagementSettings)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/ServerConfigurationsManagementSettings.cs similarity index 73% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ServerConfigurationsManagementSettings.cs index 280c5c5395d0..be36eb74cfe4 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConfigurationsManagementSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/ServerConfigurationsManagementSettings.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Set the connectivity, storage and workload settings. - public partial class SqlServerConfigurationsManagementSettings + public partial class ServerConfigurationsManagementSettings { /// /// Keeps track of any properties unknown to the library. @@ -45,25 +45,27 @@ public partial class SqlServerConfigurationsManagementSettings /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlServerConfigurationsManagementSettings() + /// Initializes a new instance of . + public ServerConfigurationsManagementSettings() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// SQL connectivity type settings. /// SQL workload type settings. /// SQL storage update settings. /// Additional SQL feature settings. /// SQL Instance settings. + /// 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, IDictionary serializedAdditionalRawData) + internal ServerConfigurationsManagementSettings(SqlConnectivityUpdateSettings sqlConnectivityUpdateSettings, SqlWorkloadTypeUpdateSettings sqlWorkloadTypeUpdateSettings, SqlStorageUpdateSettings sqlStorageUpdateSettings, AdditionalFeaturesServerConfigurations additionalFeaturesServerConfigurations, SQLInstanceSettings sqlInstanceSettings, AADAuthenticationSettings azureAdAuthenticationSettings, IDictionary serializedAdditionalRawData) { SqlConnectivityUpdateSettings = sqlConnectivityUpdateSettings; SqlWorkloadTypeUpdateSettings = sqlWorkloadTypeUpdateSettings; SqlStorageUpdateSettings = sqlStorageUpdateSettings; AdditionalFeaturesServerConfigurations = additionalFeaturesServerConfigurations; SqlInstanceSettings = sqlInstanceSettings; + AzureAdAuthenticationSettings = azureAdAuthenticationSettings; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -100,6 +102,19 @@ public bool? IsRServicesEnabled } /// SQL Instance settings. - public SqlInstanceSettings SqlInstanceSettings { get; set; } + public SQLInstanceSettings SqlInstanceSettings { get; set; } + /// Azure AD authentication Settings. + internal AADAuthenticationSettings AzureAdAuthenticationSettings { 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 => 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/SqVmBackupScheduleType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqVmBackupScheduleType.cs deleted file mode 100644 index 2b5044469514..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqVmBackupScheduleType.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.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Backup schedule type. - public readonly partial struct SqVmBackupScheduleType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqVmBackupScheduleType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ManualValue = "Manual"; - private const string AutomatedValue = "Automated"; - - /// Manual. - public static SqVmBackupScheduleType Manual { get; } = new SqVmBackupScheduleType(ManualValue); - /// Automated. - public static SqVmBackupScheduleType Automated { get; } = new SqVmBackupScheduleType(AutomatedValue); - /// Determines if two values are the same. - public static bool operator ==(SqVmBackupScheduleType left, SqVmBackupScheduleType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqVmBackupScheduleType left, SqVmBackupScheduleType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SqVmBackupScheduleType(string value) => 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..7ba5b7b21ec5 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 @@ -91,7 +91,7 @@ internal static SqlConnectivityUpdateSettings DeserializeSqlConnectivityUpdateSe { return null; } - SqlServerConnectivityType? connectivityType = default; + ConnectivityType? connectivityType = default; int? port = default; string sqlAuthUpdateUserName = default; string sqlAuthUpdatePassword = default; @@ -105,7 +105,7 @@ internal static SqlConnectivityUpdateSettings DeserializeSqlConnectivityUpdateSe { continue; } - connectivityType = new SqlServerConnectivityType(property.Value.GetString()); + connectivityType = new ConnectivityType(property.Value.GetString()); continue; } if (property.NameEquals("port"u8)) 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..d681271a8b51 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlConnectivityUpdateSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlConnectivityUpdateSettings.cs @@ -56,7 +56,7 @@ public SqlConnectivityUpdateSettings() /// 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) + internal SqlConnectivityUpdateSettings(ConnectivityType? connectivityType, int? port, string sqlAuthUpdateUserName, string sqlAuthUpdatePassword, IDictionary serializedAdditionalRawData) { ConnectivityType = connectivityType; Port = port; @@ -66,7 +66,7 @@ internal SqlConnectivityUpdateSettings(SqlServerConnectivityType? connectivityTy } /// SQL Server connectivity option. - public SqlServerConnectivityType? ConnectivityType { get; set; } + public ConnectivityType? ConnectivityType { get; set; } /// SQL Server port. public int? Port { get; set; } /// SQL Server sysadmin login to create. 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..97b3486c2530 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlManagementMode.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlManagementMode.cs @@ -10,7 +10,7 @@ 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; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConnectivityType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConnectivityType.cs deleted file mode 100644 index bbd0e139bd73..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerConnectivityType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// SQL Server connectivity option. - public readonly partial struct SqlServerConnectivityType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqlServerConnectivityType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string LocalValue = "LOCAL"; - private const string PrivateValue = "PRIVATE"; - private const string PublicValue = "PUBLIC"; - - /// LOCAL. - public static SqlServerConnectivityType Local { get; } = new SqlServerConnectivityType(LocalValue); - /// PRIVATE. - public static SqlServerConnectivityType Private { get; } = new SqlServerConnectivityType(PrivateValue); - /// PUBLIC. - public static SqlServerConnectivityType Public { get; } = new SqlServerConnectivityType(PublicValue); - /// Determines if two values are the same. - public static bool operator ==(SqlServerConnectivityType left, SqlServerConnectivityType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlServerConnectivityType left, SqlServerConnectivityType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SqlServerConnectivityType(string value) => 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..469788c59c9a 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerLicenseType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlServerLicenseType.cs @@ -22,14 +22,14 @@ public SqlServerLicenseType(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string PaygValue = "PAYG"; - private const string AhubValue = "AHUB"; + private const string PAYGValue = "PAYG"; + private const string AHUBValue = "AHUB"; private const string DRValue = "DR"; /// PAYG. - public static SqlServerLicenseType Payg { get; } = new SqlServerLicenseType(PaygValue); + public static SqlServerLicenseType PAYG { get; } = new SqlServerLicenseType(PAYGValue); /// AHUB. - public static SqlServerLicenseType Ahub { get; } = new SqlServerLicenseType(AhubValue); + public static SqlServerLicenseType AHUB { get; } = new SqlServerLicenseType(AHUBValue); /// DR. public static SqlServerLicenseType DR { get; } = new SqlServerLicenseType(DRValue); /// Determines if two values are the same. 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..6153a9894d15 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 @@ -88,7 +88,7 @@ internal static SqlStorageUpdateSettings DeserializeSqlStorageUpdateSettings(Jso } int? diskCount = default; int? startingDeviceId = default; - SqlVmDiskConfigurationType? diskConfigurationType = default; + DiskConfigurationType? diskConfigurationType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -117,7 +117,7 @@ internal static SqlStorageUpdateSettings DeserializeSqlStorageUpdateSettings(Jso { continue; } - diskConfigurationType = new SqlVmDiskConfigurationType(property.Value.GetString()); + diskConfigurationType = new DiskConfigurationType(property.Value.GetString()); continue; } if (options.Format != "W") 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..d7e34e89e712 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageUpdateSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlStorageUpdateSettings.cs @@ -55,7 +55,7 @@ public SqlStorageUpdateSettings() /// 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) + internal SqlStorageUpdateSettings(int? diskCount, int? startingDeviceId, DiskConfigurationType? diskConfigurationType, IDictionary serializedAdditionalRawData) { DiskCount = diskCount; StartingDeviceId = startingDeviceId; @@ -68,6 +68,6 @@ internal SqlStorageUpdateSettings(int? diskCount, int? startingDeviceId, SqlVmDi /// 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; } + public DiskConfigurationType? DiskConfigurationType { 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..7c05383c0763 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupListResult.Serialization.cs @@ -0,0 +1,154 @@ +// 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 SqlVirtualMachineGroupListResult : 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(SqlVirtualMachineGroupListResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + 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.AbsoluteUri); + } + 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 + } + } + } + + SqlVirtualMachineGroupListResult 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(SqlVirtualMachineGroupListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlVirtualMachineGroupListResult(document.RootElement, options); + } + + internal static SqlVirtualMachineGroupListResult DeserializeSqlVirtualMachineGroupListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SqlVirtualMachineGroupData.DeserializeSqlVirtualMachineGroupData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SqlVirtualMachineGroupListResult(value, 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(SqlVirtualMachineGroupListResult)} does not support writing '{options.Format}' format."); + } + } + + SqlVirtualMachineGroupListResult 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 DeserializeSqlVirtualMachineGroupListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} 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..c910d089e724 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupListResult.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 System.Linq; + +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. + /// + /// 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 . + /// The SqlVirtualMachineGroup items on this page. + internal SqlVirtualMachineGroupListResult(IEnumerable value) + { + Value = value.ToList(); + } + + /// 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 serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SqlVirtualMachineGroupListResult() + { + } + + /// 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/SqlVmGroupPatch.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupPatch.Serialization.cs similarity index 69% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupPatch.Serialization.cs index 6b636c8b8a7a..be4cb1cb73bc 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupPatch.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmGroupPatch : IUtf8JsonSerializable, IJsonModel + public partial class SqlVirtualMachineGroupPatch : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupPatch)} does not support writing '{format}' format."); } if (Optional.IsCollectionDefined(Tags)) @@ -62,19 +62,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmGroupPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SqlVirtualMachineGroupPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupPatch)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmGroupPatch(document.RootElement, options); + return DeserializeSqlVirtualMachineGroupPatch(document.RootElement, options); } - internal static SqlVmGroupPatch DeserializeSqlVmGroupPatch(JsonElement element, ModelReaderWriterOptions options = null) + internal static SqlVirtualMachineGroupPatch DeserializeSqlVirtualMachineGroupPatch(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -107,38 +107,38 @@ internal static SqlVmGroupPatch DeserializeSqlVmGroupPatch(JsonElement element, } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmGroupPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new SqlVirtualMachineGroupPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlVmGroupPatch)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupPatch)} does not support writing '{options.Format}' format."); } } - SqlVmGroupPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SqlVirtualMachineGroupPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmGroupPatch(document.RootElement, options); + return DeserializeSqlVirtualMachineGroupPatch(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmGroupPatch)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupPatch)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupPatch.cs similarity index 87% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupPatch.cs index a53a14d66294..4757de8a769c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupPatch.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineGroupPatch.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// An update to a SQL virtual machine group. - public partial class SqlVmGroupPatch + public partial class SqlVirtualMachineGroupPatch { /// /// Keeps track of any properties unknown to the library. @@ -45,16 +45,16 @@ public partial class SqlVmGroupPatch /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlVmGroupPatch() + /// Initializes a new instance of . + public SqlVirtualMachineGroupPatch() { Tags = new ChangeTrackingDictionary(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Resource tags. /// Keeps track of any properties unknown to the library. - internal SqlVmGroupPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + internal SqlVirtualMachineGroupPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { Tags = tags; _serializedAdditionalRawData = serializedAdditionalRawData; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.Serialization.cs similarity index 64% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.Serialization.cs index 2f21ad1ade8e..a01a07d08bed 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - internal partial class SqlVmGroupListResult : IUtf8JsonSerializable, IJsonModel + internal partial class SqlVirtualMachineListResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,13 +28,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr /// 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; + 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachineListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + if (options.Format != "W") { writer.WritePropertyName("value"u8); writer.WriteStartArray(); @@ -47,7 +47,7 @@ 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) { @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmGroupListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SqlVirtualMachineListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachineListResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmGroupListResult(document.RootElement, options); + return DeserializeSqlVirtualMachineListResult(document.RootElement, options); } - internal static SqlVmGroupListResult DeserializeSqlVmGroupListResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static SqlVirtualMachineListResult DeserializeSqlVirtualMachineListResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -86,29 +86,29 @@ internal static SqlVmGroupListResult DeserializeSqlVmGroupListResult(JsonElement { return null; } - IReadOnlyList value = default; - string nextLink = default; + IReadOnlyList value = default; + Uri 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(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(SqlVmGroupData.DeserializeSqlVmGroupData(item, options)); + array.Add(SqlVirtualMachineData.DeserializeSqlVirtualMachineData(item, options)); } value = array; continue; } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,38 +117,38 @@ internal static SqlVmGroupListResult DeserializeSqlVmGroupListResult(JsonElement } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmGroupListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new SqlVirtualMachineListResult(value, nextLink, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachineListResult)} does not support writing '{options.Format}' format."); } } - SqlVmGroupListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SqlVirtualMachineListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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); + return DeserializeSqlVirtualMachineListResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmGroupListResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVirtualMachineListResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/SqlVirtualMachineListResult.cs similarity index 62% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.cs index 4cb52bf333d9..1237a2e940fe 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmGroupListResult.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachineListResult.cs @@ -7,11 +7,12 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.SqlVirtualMachine.Models { - /// A list of SQL virtual machine groups. - internal partial class SqlVmGroupListResult + /// The response of a SqlVirtualMachine list operation. + internal partial class SqlVirtualMachineListResult { /// /// Keeps track of any properties unknown to the library. @@ -45,26 +46,32 @@ internal partial class SqlVmGroupListResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal SqlVmGroupListResult() + /// Initializes a new instance of . + /// The SqlVirtualMachine items on this page. + internal SqlVirtualMachineListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Value = value.ToList(); } - /// Initializes a new instance of . - /// Array of results. - /// Link to retrieve next page of results. + /// 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 SqlVmGroupListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal SqlVirtualMachineListResult(IReadOnlyList value, Uri 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; } + /// Initializes a new instance of for deserialization. + internal SqlVirtualMachineListResult() + { + } + + /// 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/SqlVmPatch.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachinePatch.Serialization.cs similarity index 70% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachinePatch.Serialization.cs index 080c2702aa9d..1cd05d8f3298 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachinePatch.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmPatch : IUtf8JsonSerializable, IJsonModel + public partial class SqlVirtualMachinePatch : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachinePatch)} does not support writing '{format}' format."); } if (Optional.IsCollectionDefined(Tags)) @@ -62,19 +62,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SqlVirtualMachinePatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachinePatch)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmPatch(document.RootElement, options); + return DeserializeSqlVirtualMachinePatch(document.RootElement, options); } - internal static SqlVmPatch DeserializeSqlVmPatch(JsonElement element, ModelReaderWriterOptions options = null) + internal static SqlVirtualMachinePatch DeserializeSqlVirtualMachinePatch(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -107,38 +107,38 @@ internal static SqlVmPatch DeserializeSqlVmPatch(JsonElement element, ModelReade } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmPatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new SqlVirtualMachinePatch(tags ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlVmPatch)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVirtualMachinePatch)} does not support writing '{options.Format}' format."); } } - SqlVmPatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SqlVirtualMachinePatch IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmPatch(document.RootElement, options); + return DeserializeSqlVirtualMachinePatch(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmPatch)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVirtualMachinePatch)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachinePatch.cs similarity index 88% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachinePatch.cs index 8f5cc1c2a9bc..350099497da7 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmPatch.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVirtualMachinePatch.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// An update to a SQL virtual machine. - public partial class SqlVmPatch + public partial class SqlVirtualMachinePatch { /// /// Keeps track of any properties unknown to the library. @@ -45,16 +45,16 @@ public partial class SqlVmPatch /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlVmPatch() + /// Initializes a new instance of . + public SqlVirtualMachinePatch() { Tags = new ChangeTrackingDictionary(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Resource tags. /// Keeps track of any properties unknown to the library. - internal SqlVmPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + internal SqlVirtualMachinePatch(IDictionary tags, IDictionary serializedAdditionalRawData) { Tags = tags; _serializedAdditionalRawData = serializedAdditionalRawData; 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 deleted file mode 100644 index f9e11a138da6..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAssessmentDayOfWeek.Serialization.cs +++ /dev/null @@ -1,38 +0,0 @@ -// 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 SqlVmAssessmentDayOfWeekExtensions - { - public static string ToSerialString(this SqlVmAssessmentDayOfWeek value) => value switch - { - SqlVmAssessmentDayOfWeek.Monday => "Monday", - SqlVmAssessmentDayOfWeek.Tuesday => "Tuesday", - SqlVmAssessmentDayOfWeek.Wednesday => "Wednesday", - SqlVmAssessmentDayOfWeek.Thursday => "Thursday", - SqlVmAssessmentDayOfWeek.Friday => "Friday", - SqlVmAssessmentDayOfWeek.Saturday => "Saturday", - SqlVmAssessmentDayOfWeek.Sunday => "Sunday", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SqlVmAssessmentDayOfWeek value.") - }; - - 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; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SqlVmAssessmentDayOfWeek value."); - } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupDayOfWeek.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupDayOfWeek.cs deleted file mode 100644 index 9e8cdfec1ea3..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoBackupDayOfWeek.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -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"; - private const string ThursdayValue = "Thursday"; - private const string FridayValue = "Friday"; - private const string SaturdayValue = "Saturday"; - private const string SundayValue = "Sunday"; - - /// Monday. - public static SqlVmAutoBackupDayOfWeek Monday { get; } = new SqlVmAutoBackupDayOfWeek(MondayValue); - /// Tuesday. - public static SqlVmAutoBackupDayOfWeek Tuesday { get; } = new SqlVmAutoBackupDayOfWeek(TuesdayValue); - /// Wednesday. - public static SqlVmAutoBackupDayOfWeek Wednesday { get; } = new SqlVmAutoBackupDayOfWeek(WednesdayValue); - /// Thursday. - public static SqlVmAutoBackupDayOfWeek Thursday { get; } = new SqlVmAutoBackupDayOfWeek(ThursdayValue); - /// Friday. - public static SqlVmAutoBackupDayOfWeek Friday { get; } = new SqlVmAutoBackupDayOfWeek(FridayValue); - /// Saturday. - public static SqlVmAutoBackupDayOfWeek Saturday { get; } = new SqlVmAutoBackupDayOfWeek(SaturdayValue); - /// Sunday. - public static SqlVmAutoBackupDayOfWeek Sunday { get; } = new SqlVmAutoBackupDayOfWeek(SundayValue); - /// Determines if two values are the same. - public static bool operator ==(SqlVmAutoBackupDayOfWeek left, SqlVmAutoBackupDayOfWeek right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlVmAutoBackupDayOfWeek left, SqlVmAutoBackupDayOfWeek right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SqlVmAutoBackupDayOfWeek(string value) => 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/SqlVmAutoPatchingDayOfWeek.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingDayOfWeek.Serialization.cs deleted file mode 100644 index 82ab61fa1c09..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmAutoPatchingDayOfWeek.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// 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 SqlVmAutoPatchingDayOfWeekExtensions - { - public static string ToSerialString(this SqlVmAutoPatchingDayOfWeek value) => value switch - { - SqlVmAutoPatchingDayOfWeek.Everyday => "Everyday", - SqlVmAutoPatchingDayOfWeek.Monday => "Monday", - SqlVmAutoPatchingDayOfWeek.Tuesday => "Tuesday", - SqlVmAutoPatchingDayOfWeek.Wednesday => "Wednesday", - SqlVmAutoPatchingDayOfWeek.Thursday => "Thursday", - SqlVmAutoPatchingDayOfWeek.Friday => "Friday", - SqlVmAutoPatchingDayOfWeek.Saturday => "Saturday", - SqlVmAutoPatchingDayOfWeek.Sunday => "Sunday", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SqlVmAutoPatchingDayOfWeek value.") - }; - - 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; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown SqlVmAutoPatchingDayOfWeek value."); - } - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterConfiguration.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterConfiguration.cs deleted file mode 100644 index e237a64341d1..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterConfiguration.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Cluster type. - public readonly partial struct SqlVmClusterConfiguration : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqlVmClusterConfiguration(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DomainfulValue = "Domainful"; - - /// Domainful. - public static SqlVmClusterConfiguration Domainful { get; } = new SqlVmClusterConfiguration(DomainfulValue); - /// Determines if two values are the same. - public static bool operator ==(SqlVmClusterConfiguration left, SqlVmClusterConfiguration right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlVmClusterConfiguration left, SqlVmClusterConfiguration right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SqlVmClusterConfiguration(string value) => 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 deleted file mode 100644 index 880abe035271..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterManagerType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Type of cluster manager: Windows Server Failover Cluster (WSFC), implied by the scale type of the group and the OS type. - public readonly partial struct SqlVmClusterManagerType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqlVmClusterManagerType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string WindowsServerFailoverClusterValue = "WSFC"; - - /// WSFC. - public static SqlVmClusterManagerType WindowsServerFailoverCluster { get; } = new SqlVmClusterManagerType(WindowsServerFailoverClusterValue); - /// Determines if two values are the same. - public static bool operator ==(SqlVmClusterManagerType left, SqlVmClusterManagerType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlVmClusterManagerType left, SqlVmClusterManagerType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SqlVmClusterManagerType(string value) => 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 deleted file mode 100644 index 716439a2d484..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmClusterSubnetType.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.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Cluster subnet type. - public readonly partial struct SqlVmClusterSubnetType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqlVmClusterSubnetType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SingleSubnetValue = "SingleSubnet"; - private const string MultiSubnetValue = "MultiSubnet"; - - /// SingleSubnet. - public static SqlVmClusterSubnetType SingleSubnet { get; } = new SqlVmClusterSubnetType(SingleSubnetValue); - /// MultiSubnet. - public static SqlVmClusterSubnetType MultiSubnet { get; } = new SqlVmClusterSubnetType(MultiSubnetValue); - /// Determines if two values are the same. - public static bool operator ==(SqlVmClusterSubnetType left, SqlVmClusterSubnetType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlVmClusterSubnetType left, SqlVmClusterSubnetType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SqlVmClusterSubnetType(string value) => 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/SqlVmDiskConfigurationType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigurationType.cs deleted file mode 100644 index 44b149c85582..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmDiskConfigurationType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Disk configuration to apply to SQL Server. - public readonly partial struct SqlVmDiskConfigurationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqlVmDiskConfigurationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NewValue = "NEW"; - private const string ExtendValue = "EXTEND"; - private const string AddValue = "ADD"; - - /// NEW. - public static SqlVmDiskConfigurationType New { get; } = new SqlVmDiskConfigurationType(NewValue); - /// EXTEND. - public static SqlVmDiskConfigurationType Extend { get; } = new SqlVmDiskConfigurationType(ExtendValue); - /// ADD. - public static SqlVmDiskConfigurationType Add { get; } = new SqlVmDiskConfigurationType(AddValue); - /// Determines if two values are the same. - public static bool operator ==(SqlVmDiskConfigurationType left, SqlVmDiskConfigurationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlVmDiskConfigurationType left, SqlVmDiskConfigurationType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SqlVmDiskConfigurationType(string value) => 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 deleted file mode 100644 index 8652d94ab061..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmFullBackupFrequency.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.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Frequency of full backups. In both cases, full backups begin during the next scheduled time window. - public readonly partial struct SqlVmFullBackupFrequency : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqlVmFullBackupFrequency(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DailyValue = "Daily"; - private const string WeeklyValue = "Weekly"; - - /// Daily. - public static SqlVmFullBackupFrequency Daily { get; } = new SqlVmFullBackupFrequency(DailyValue); - /// Weekly. - public static SqlVmFullBackupFrequency Weekly { get; } = new SqlVmFullBackupFrequency(WeeklyValue); - /// Determines if two values are the same. - public static bool operator ==(SqlVmFullBackupFrequency left, SqlVmFullBackupFrequency right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlVmFullBackupFrequency left, SqlVmFullBackupFrequency right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SqlVmFullBackupFrequency(string value) => 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/SqlVmStorageWorkloadType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageWorkloadType.cs deleted file mode 100644 index c086cd71669b..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageWorkloadType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.SqlVirtualMachine.Models -{ - /// Storage workload type. - public readonly partial struct SqlVmStorageWorkloadType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SqlVmStorageWorkloadType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string GeneralValue = "GENERAL"; - private const string OltpValue = "OLTP"; - private const string DWValue = "DW"; - - /// GENERAL. - public static SqlVmStorageWorkloadType General { get; } = new SqlVmStorageWorkloadType(GeneralValue); - /// OLTP. - public static SqlVmStorageWorkloadType Oltp { get; } = new SqlVmStorageWorkloadType(OltpValue); - /// DW. - public static SqlVmStorageWorkloadType DW { get; } = new SqlVmStorageWorkloadType(DWValue); - /// Determines if two values are the same. - public static bool operator ==(SqlVmStorageWorkloadType left, SqlVmStorageWorkloadType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SqlVmStorageWorkloadType left, SqlVmStorageWorkloadType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator SqlVmStorageWorkloadType(string value) => 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..15457309aa62 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.Serialization.cs @@ -0,0 +1,195 @@ +// 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 +{ + public partial class SqlVmTroubleshooting : 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(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" && _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 + } + } + } + + SqlVmTroubleshooting 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(SqlVmTroubleshooting)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlVmTroubleshooting(document.RootElement, options); + } + + internal static SqlVmTroubleshooting DeserializeSqlVmTroubleshooting(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? startTimeUtc = default; + DateTimeOffset? endTimeUtc = default; + TroubleshootingScenario? troubleshootingScenario = default; + TroubleshootingAdditionalProperties properties = default; + string virtualMachineResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startTimeUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTimeUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("troubleshootingScenario"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + troubleshootingScenario = new TroubleshootingScenario(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = TroubleshootingAdditionalProperties.DeserializeTroubleshootingAdditionalProperties(property.Value, options); + continue; + } + if (property.NameEquals("virtualMachineResourceId"u8)) + { + virtualMachineResourceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SqlVmTroubleshooting( + startTimeUtc, + endTimeUtc, + troubleshootingScenario, + properties, + virtualMachineResourceId, + 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(SqlVmTroubleshooting)} does not support writing '{options.Format}' format."); + } + } + + SqlVmTroubleshooting 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 DeserializeSqlVmTroubleshooting(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlVmTroubleshooting)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} 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..708133c95f11 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmTroubleshooting.cs @@ -0,0 +1,93 @@ +// 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. + /// + /// 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 . + 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 serializedAdditionalRawData) + { + StartTimeUtc = startTimeUtc; + EndTimeUtc = endTimeUtc; + TroubleshootingScenario = troubleshootingScenario; + Properties = properties; + VirtualMachineResourceId = virtualMachineResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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; } + /// The name of the availability group. + public string UnhealthyReplicaInfoAvailabilityGroupName + { + get => Properties is null ? default : Properties.UnhealthyReplicaInfoAvailabilityGroupName; + set + { + if (Properties is null) + Properties = new TroubleshootingAdditionalProperties(); + Properties.UnhealthyReplicaInfoAvailabilityGroupName = value; + } + } + + /// Virtual machine resource id for response. + public string VirtualMachineResourceId { get; } + } +} 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..c20e3c7ba7cd 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadType.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlWorkloadType.cs @@ -22,14 +22,14 @@ public SqlWorkloadType(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string GeneralValue = "GENERAL"; - private const string OltpValue = "OLTP"; + private const string GENERALValue = "GENERAL"; + private const string OLTPValue = "OLTP"; private const string DWValue = "DW"; /// GENERAL. - public static SqlWorkloadType General { get; } = new SqlWorkloadType(GeneralValue); + public static SqlWorkloadType GENERAL { get; } = new SqlWorkloadType(GENERALValue); /// OLTP. - public static SqlWorkloadType Oltp { get; } = new SqlWorkloadType(OltpValue); + public static SqlWorkloadType OLTP { get; } = new SqlWorkloadType(OLTPValue); /// DW. public static SqlWorkloadType DW { get; } = new SqlWorkloadType(DWValue); /// Determines if two values are the same. diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/StorageConfigurationSettings.Serialization.cs similarity index 60% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/StorageConfigurationSettings.Serialization.cs index 6deaff2bf9dd..d54fd0194e95 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/StorageConfigurationSettings.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class SqlVmStorageConfigurationSettings : IUtf8JsonSerializable, IJsonModel + public partial class StorageConfigurationSettings : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(StorageConfigurationSettings)} does not support writing '{format}' format."); } if (Optional.IsDefined(SqlDataSettings)) @@ -44,15 +44,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("sqlLogSettings"u8); writer.WriteObjectValue(SqlLogSettings, options); } - if (Optional.IsDefined(SqlTempDBSettings)) + if (Optional.IsDefined(SqlTempDbSettings)) { writer.WritePropertyName("sqlTempDbSettings"u8); - writer.WriteObjectValue(SqlTempDBSettings, options); + writer.WriteObjectValue(SqlTempDbSettings, options); } - if (Optional.IsDefined(IsSqlSystemDBOnDataDisk)) + if (Optional.IsDefined(SqlSystemDbOnDataDisk)) { writer.WritePropertyName("sqlSystemDbOnDataDisk"u8); - writer.WriteBooleanValue(IsSqlSystemDBOnDataDisk.Value); + writer.WriteBooleanValue(SqlSystemDbOnDataDisk.Value); } if (Optional.IsDefined(DiskConfigurationType)) { @@ -64,6 +64,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("storageWorkloadType"u8); writer.WriteStringValue(StorageWorkloadType.Value.ToString()); } + if (Optional.IsDefined(EnableStorageConfigBlade)) + { + writer.WritePropertyName("enableStorageConfigBlade"u8); + writer.WriteBooleanValue(EnableStorageConfigBlade.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -81,19 +86,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - SqlVmStorageConfigurationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + StorageConfigurationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(StorageConfigurationSettings)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmStorageConfigurationSettings(document.RootElement, options); + return DeserializeStorageConfigurationSettings(document.RootElement, options); } - internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigurationSettings(JsonElement element, ModelReaderWriterOptions options = null) + internal static StorageConfigurationSettings DeserializeStorageConfigurationSettings(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -101,12 +106,13 @@ internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigu { return null; } - SqlStorageSettings sqlDataSettings = default; - SqlStorageSettings sqlLogSettings = default; - SqlTempDBSettings sqlTempDBSettings = default; - bool? sqlSystemDBOnDataDisk = default; - SqlVmDiskConfigurationType? diskConfigurationType = default; - SqlVmStorageWorkloadType? storageWorkloadType = default; + SQLStorageSettings sqlDataSettings = default; + SQLStorageSettings sqlLogSettings = default; + SQLTempDbSettings sqlTempDbSettings = default; + bool? sqlSystemDbOnDataDisk = default; + DiskConfigurationType? diskConfigurationType = default; + StorageWorkloadType? storageWorkloadType = default; + bool? enableStorageConfigBlade = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -117,7 +123,7 @@ internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigu { continue; } - sqlDataSettings = SqlStorageSettings.DeserializeSqlStorageSettings(property.Value, options); + sqlDataSettings = SQLStorageSettings.DeserializeSQLStorageSettings(property.Value, options); continue; } if (property.NameEquals("sqlLogSettings"u8)) @@ -126,7 +132,7 @@ internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigu { continue; } - sqlLogSettings = SqlStorageSettings.DeserializeSqlStorageSettings(property.Value, options); + sqlLogSettings = SQLStorageSettings.DeserializeSQLStorageSettings(property.Value, options); continue; } if (property.NameEquals("sqlTempDbSettings"u8)) @@ -135,7 +141,7 @@ internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigu { continue; } - sqlTempDBSettings = SqlTempDBSettings.DeserializeSqlTempDBSettings(property.Value, options); + sqlTempDbSettings = SQLTempDbSettings.DeserializeSQLTempDbSettings(property.Value, options); continue; } if (property.NameEquals("sqlSystemDbOnDataDisk"u8)) @@ -144,7 +150,7 @@ internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigu { continue; } - sqlSystemDBOnDataDisk = property.Value.GetBoolean(); + sqlSystemDbOnDataDisk = property.Value.GetBoolean(); continue; } if (property.NameEquals("diskConfigurationType"u8)) @@ -153,7 +159,7 @@ internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigu { continue; } - diskConfigurationType = new SqlVmDiskConfigurationType(property.Value.GetString()); + diskConfigurationType = new DiskConfigurationType(property.Value.GetString()); continue; } if (property.NameEquals("storageWorkloadType"u8)) @@ -162,7 +168,16 @@ internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigu { continue; } - storageWorkloadType = new SqlVmStorageWorkloadType(property.Value.GetString()); + storageWorkloadType = new StorageWorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("enableStorageConfigBlade"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableStorageConfigBlade = property.Value.GetBoolean(); continue; } if (options.Format != "W") @@ -171,45 +186,46 @@ internal static SqlVmStorageConfigurationSettings DeserializeSqlVmStorageConfigu } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmStorageConfigurationSettings( + return new StorageConfigurationSettings( sqlDataSettings, sqlLogSettings, - sqlTempDBSettings, - sqlSystemDBOnDataDisk, + sqlTempDbSettings, + sqlSystemDbOnDataDisk, diskConfigurationType, storageWorkloadType, + enableStorageConfigBlade, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlVmStorageConfigurationSettings)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(StorageConfigurationSettings)} does not support writing '{options.Format}' format."); } } - SqlVmStorageConfigurationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + StorageConfigurationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmStorageConfigurationSettings(document.RootElement, options); + return DeserializeStorageConfigurationSettings(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmStorageConfigurationSettings)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(StorageConfigurationSettings)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/StorageConfigurationSettings.cs similarity index 66% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/StorageConfigurationSettings.cs index 4fc099461cb4..64149815747d 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/SqlVmStorageConfigurationSettings.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/StorageConfigurationSettings.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Storage Configurations for SQL Data, Log and TempDb. - public partial class SqlVmStorageConfigurationSettings + public partial class StorageConfigurationSettings { /// /// Keeps track of any properties unknown to the library. @@ -45,41 +45,45 @@ public partial class SqlVmStorageConfigurationSettings /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public SqlVmStorageConfigurationSettings() + /// Initializes a new instance of . + public StorageConfigurationSettings() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// SQL Server Data Storage Settings. /// SQL Server Log Storage Settings. - /// SQL Server TempDb Storage Settings. - /// SQL Server SystemDb Storage on DataPool if true. + /// SQL Server TempDb Storage Settings. + /// SQL Server SystemDb Storage on DataPool if true. /// Disk configuration to apply to SQL Server. /// Storage workload type. + /// 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, IDictionary serializedAdditionalRawData) + internal StorageConfigurationSettings(SQLStorageSettings sqlDataSettings, SQLStorageSettings sqlLogSettings, SQLTempDbSettings sqlTempDbSettings, bool? sqlSystemDbOnDataDisk, DiskConfigurationType? diskConfigurationType, StorageWorkloadType? storageWorkloadType, bool? enableStorageConfigBlade, IDictionary serializedAdditionalRawData) { SqlDataSettings = sqlDataSettings; SqlLogSettings = sqlLogSettings; - SqlTempDBSettings = sqlTempDBSettings; - IsSqlSystemDBOnDataDisk = isSqlSystemDBOnDataDisk; + SqlTempDbSettings = sqlTempDbSettings; + SqlSystemDbOnDataDisk = sqlSystemDbOnDataDisk; DiskConfigurationType = diskConfigurationType; StorageWorkloadType = storageWorkloadType; + EnableStorageConfigBlade = enableStorageConfigBlade; _serializedAdditionalRawData = serializedAdditionalRawData; } /// SQL Server Data Storage Settings. - public SqlStorageSettings SqlDataSettings { get; set; } + public SQLStorageSettings SqlDataSettings { get; set; } /// SQL Server Log Storage Settings. - public SqlStorageSettings SqlLogSettings { get; set; } + public SQLStorageSettings SqlLogSettings { get; set; } /// SQL Server TempDb Storage Settings. - public SqlTempDBSettings SqlTempDBSettings { get; set; } + public SQLTempDbSettings SqlTempDbSettings { get; set; } /// SQL Server SystemDb Storage on DataPool if true. - public bool? IsSqlSystemDBOnDataDisk { get; set; } + public bool? SqlSystemDbOnDataDisk { get; set; } /// Disk configuration to apply to SQL Server. - public SqlVmDiskConfigurationType? DiskConfigurationType { get; set; } + public DiskConfigurationType? DiskConfigurationType { get; set; } /// Storage workload type. - public SqlVmStorageWorkloadType? StorageWorkloadType { get; set; } + public StorageWorkloadType? 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/StorageWorkloadType.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/StorageWorkloadType.cs new file mode 100644 index 000000000000..cc482b9c974e --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/StorageWorkloadType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// Storage workload type. + public readonly partial struct StorageWorkloadType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public StorageWorkloadType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string GENERALValue = "GENERAL"; + private const string OLTPValue = "OLTP"; + private const string DWValue = "DW"; + + /// GENERAL. + public static StorageWorkloadType GENERAL { get; } = new StorageWorkloadType(GENERALValue); + /// OLTP. + public static StorageWorkloadType OLTP { get; } = new StorageWorkloadType(OLTPValue); + /// DW. + public static StorageWorkloadType DW { get; } = new StorageWorkloadType(DWValue); + /// Determines if two values are the same. + public static bool operator ==(StorageWorkloadType left, StorageWorkloadType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(StorageWorkloadType left, StorageWorkloadType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator StorageWorkloadType(string value) => new StorageWorkloadType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is StorageWorkloadType other && Equals(other); + /// + public bool Equals(StorageWorkloadType 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/TroubleshootingAdditionalProperties.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.Serialization.cs new file mode 100644 index 000000000000..df9a4527d1ad --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.Serialization.cs @@ -0,0 +1,133 @@ +// 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 TroubleshootingAdditionalProperties : 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(TroubleshootingAdditionalProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(UnhealthyReplicaInfo)) + { + writer.WritePropertyName("unhealthyReplicaInfo"u8); + writer.WriteObjectValue(UnhealthyReplicaInfo, options); + } + 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 + } + } + } + + TroubleshootingAdditionalProperties 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(TroubleshootingAdditionalProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTroubleshootingAdditionalProperties(document.RootElement, options); + } + + internal static TroubleshootingAdditionalProperties DeserializeTroubleshootingAdditionalProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + UnhealthyReplicaInfo unhealthyReplicaInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("unhealthyReplicaInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + unhealthyReplicaInfo = UnhealthyReplicaInfo.DeserializeUnhealthyReplicaInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TroubleshootingAdditionalProperties(unhealthyReplicaInfo, 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(TroubleshootingAdditionalProperties)} does not support writing '{options.Format}' format."); + } + } + + TroubleshootingAdditionalProperties 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 DeserializeTroubleshootingAdditionalProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TroubleshootingAdditionalProperties)} does not support reading '{options.Format}' format."); + } + } + + 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..0bbe8d173ae8 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingAdditionalProperties.cs @@ -0,0 +1,76 @@ +// 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. + /// + /// 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 . + 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 serializedAdditionalRawData) + { + UnhealthyReplicaInfo = unhealthyReplicaInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The unhealthy replica information. + internal UnhealthyReplicaInfo UnhealthyReplicaInfo { get; set; } + /// The name of the availability group. + public string UnhealthyReplicaInfoAvailabilityGroupName + { + get => 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..21bfe490b461 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingScenario.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.SqlVirtualMachine.Models +{ + /// SQL VM troubleshooting scenario. + public readonly partial struct TroubleshootingScenario : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public TroubleshootingScenario(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnhealthyReplicaValue = "UnhealthyReplica"; + + /// UnhealthyReplica. + public static TroubleshootingScenario UnhealthyReplica { get; } = new TroubleshootingScenario(UnhealthyReplicaValue); + /// Determines if two values are the same. + public static bool operator ==(TroubleshootingScenario left, TroubleshootingScenario right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(TroubleshootingScenario left, TroubleshootingScenario right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator TroubleshootingScenario(string value) => 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..8c3bea03f906 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.Serialization.cs @@ -0,0 +1,211 @@ +// 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 +{ + public partial class TroubleshootingStatus : 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(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" && _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 + } + } + } + + TroubleshootingStatus 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(TroubleshootingStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTroubleshootingStatus(document.RootElement, options); + } + + internal static TroubleshootingStatus DeserializeTroubleshootingStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + 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 serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rootCause"u8)) + { + rootCause = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastTriggerTimeUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastTriggerTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("startTimeUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTimeUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTimeUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("troubleshootingScenario"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + troubleshootingScenario = new TroubleshootingScenario(property.Value.GetString()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = TroubleshootingAdditionalProperties.DeserializeTroubleshootingAdditionalProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new TroubleshootingStatus( + rootCause, + lastTriggerTimeUtc, + startTimeUtc, + endTimeUtc, + troubleshootingScenario, + properties, + 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(TroubleshootingStatus)} does not support writing '{options.Format}' format."); + } + } + + TroubleshootingStatus 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 DeserializeTroubleshootingStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TroubleshootingStatus)} does not support reading '{options.Format}' format."); + } + } + + 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..b29a9b96e4e7 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/TroubleshootingStatus.cs @@ -0,0 +1,90 @@ +// 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. + /// + /// 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 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 serializedAdditionalRawData) + { + RootCause = rootCause; + LastTriggerTimeUtc = lastTriggerTimeUtc; + StartTimeUtc = startTimeUtc; + EndTimeUtc = endTimeUtc; + TroubleshootingScenario = troubleshootingScenario; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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 UnhealthyReplicaInfoAvailabilityGroupName + { + get => 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..991712249e9e --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/UnhealthyReplicaInfo.Serialization.cs @@ -0,0 +1,129 @@ +// 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 UnhealthyReplicaInfo : 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(UnhealthyReplicaInfo)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AvailabilityGroupName)) + { + writer.WritePropertyName("availabilityGroupName"u8); + writer.WriteStringValue(AvailabilityGroupName); + } + 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 + } + } + } + + UnhealthyReplicaInfo 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(UnhealthyReplicaInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUnhealthyReplicaInfo(document.RootElement, options); + } + + internal static UnhealthyReplicaInfo DeserializeUnhealthyReplicaInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string availabilityGroupName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("availabilityGroupName"u8)) + { + availabilityGroupName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnhealthyReplicaInfo(availabilityGroupName, 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(UnhealthyReplicaInfo)} does not support writing '{options.Format}' format."); + } + } + + UnhealthyReplicaInfo 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 DeserializeUnhealthyReplicaInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UnhealthyReplicaInfo)} does not support reading '{options.Format}' format."); + } + } + + 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..e5a044cccff7 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/UnhealthyReplicaInfo.cs @@ -0,0 +1,65 @@ +// 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. + /// + /// 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 . + 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 serializedAdditionalRawData) + { + AvailabilityGroupName = availabilityGroupName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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..cc571f4c4f5a --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.Serialization.cs @@ -0,0 +1,148 @@ +// 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 +{ + public partial class VirtualMachineIdentity : 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(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" && _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 + } + } + } + + VirtualMachineIdentity 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(VirtualMachineIdentity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVirtualMachineIdentity(document.RootElement, options); + } + + internal static VirtualMachineIdentity DeserializeVirtualMachineIdentity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + VmIdentityType? type = default; + ResourceIdentifier resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new VmIdentityType(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VirtualMachineIdentity(type, resourceId, 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(VirtualMachineIdentity)} does not support writing '{options.Format}' format."); + } + } + + VirtualMachineIdentity 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 DeserializeVirtualMachineIdentity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VirtualMachineIdentity)} does not support reading '{options.Format}' format."); + } + } + + 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..e239dfcede3e --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VirtualMachineIdentity.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; +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. + /// + /// 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 . + 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 serializedAdditionalRawData) + { + Type = type; + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 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..b15f54c77e17 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/VmIdentityType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +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; + + /// Initializes a new instance of . + /// is null. + public VmIdentityType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string SystemAssignedValue = "SystemAssigned"; + private const string UserAssignedValue = "UserAssigned"; + + /// None. + public static VmIdentityType None { get; } = new VmIdentityType(NoneValue); + /// SystemAssigned. + public static VmIdentityType SystemAssigned { get; } = new VmIdentityType(SystemAssignedValue); + /// UserAssigned. + public static VmIdentityType UserAssigned { get; } = new VmIdentityType(UserAssignedValue); + /// Determines if two values are the same. + public static bool operator ==(VmIdentityType left, VmIdentityType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(VmIdentityType left, VmIdentityType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator VmIdentityType(string value) => 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/WsfcDomainCredentials.Serialization.cs similarity index 65% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WsfcDomainCredentials.Serialization.cs index 0a65e8708912..99bd3125fcdc 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WsfcDomainCredentials.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class WindowsServerFailoverClusterDomainCredentials : IUtf8JsonSerializable, IJsonModel + public partial class WsfcDomainCredentials : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(WsfcDomainCredentials)} does not support writing '{format}' format."); } if (Optional.IsDefined(ClusterBootstrapAccountPassword)) @@ -66,19 +66,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - WindowsServerFailoverClusterDomainCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + WsfcDomainCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(WsfcDomainCredentials)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeWindowsServerFailoverClusterDomainCredentials(document.RootElement, options); + return DeserializeWsfcDomainCredentials(document.RootElement, options); } - internal static WindowsServerFailoverClusterDomainCredentials DeserializeWindowsServerFailoverClusterDomainCredentials(JsonElement element, ModelReaderWriterOptions options = null) + internal static WsfcDomainCredentials DeserializeWsfcDomainCredentials(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -114,38 +114,38 @@ internal static WindowsServerFailoverClusterDomainCredentials DeserializeWindows } } serializedAdditionalRawData = rawDataDictionary; - return new WindowsServerFailoverClusterDomainCredentials(clusterBootstrapAccountPassword, clusterOperatorAccountPassword, sqlServiceAccountPassword, serializedAdditionalRawData); + return new WsfcDomainCredentials(clusterBootstrapAccountPassword, clusterOperatorAccountPassword, sqlServiceAccountPassword, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(WindowsServerFailoverClusterDomainCredentials)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(WsfcDomainCredentials)} does not support writing '{options.Format}' format."); } } - WindowsServerFailoverClusterDomainCredentials IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + WsfcDomainCredentials IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeWindowsServerFailoverClusterDomainCredentials(document.RootElement, options); + return DeserializeWsfcDomainCredentials(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(WindowsServerFailoverClusterDomainCredentials)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(WsfcDomainCredentials)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/WsfcDomainCredentials.cs similarity index 86% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WsfcDomainCredentials.cs index f1036060bd29..a159471a080c 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainCredentials.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WsfcDomainCredentials.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. - public partial class WindowsServerFailoverClusterDomainCredentials + public partial class WsfcDomainCredentials { /// /// Keeps track of any properties unknown to the library. @@ -45,17 +45,17 @@ public partial class WindowsServerFailoverClusterDomainCredentials /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public WindowsServerFailoverClusterDomainCredentials() + /// Initializes a new instance of . + public WsfcDomainCredentials() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// 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) + internal WsfcDomainCredentials(string clusterBootstrapAccountPassword, string clusterOperatorAccountPassword, string sqlServiceAccountPassword, IDictionary serializedAdditionalRawData) { ClusterBootstrapAccountPassword = clusterBootstrapAccountPassword; ClusterOperatorAccountPassword = clusterOperatorAccountPassword; diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WsfcDomainProfile.Serialization.cs similarity index 72% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WsfcDomainProfile.Serialization.cs index 30dd82e012a7..b01aecd6fefc 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WsfcDomainProfile.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { - public partial class WindowsServerFailoverClusterDomainProfile : IUtf8JsonSerializable, IJsonModel + public partial class WsfcDomainProfile : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(WsfcDomainProfile)} does not support writing '{format}' format."); } if (Optional.IsDefined(DomainFqdn)) @@ -39,10 +39,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("domainFqdn"u8); writer.WriteStringValue(DomainFqdn); } - if (Optional.IsDefined(OrganizationalUnitPath)) + if (Optional.IsDefined(OuPath)) { writer.WritePropertyName("ouPath"u8); - writer.WriteStringValue(OrganizationalUnitPath); + writer.WriteStringValue(OuPath); } if (Optional.IsDefined(ClusterBootstrapAccount)) { @@ -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); @@ -67,7 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(StorageAccountUri)) { writer.WritePropertyName("storageAccountUrl"u8); - writer.WriteStringValue(StorageAccountUri.AbsoluteUri); + writer.WriteStringValue(StorageAccountUri); } if (Optional.IsDefined(StorageAccountPrimaryKey)) { @@ -96,19 +101,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - WindowsServerFailoverClusterDomainProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + WsfcDomainProfile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(WsfcDomainProfile)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeWindowsServerFailoverClusterDomainProfile(document.RootElement, options); + return DeserializeWsfcDomainProfile(document.RootElement, options); } - internal static WindowsServerFailoverClusterDomainProfile DeserializeWindowsServerFailoverClusterDomainProfile(JsonElement element, ModelReaderWriterOptions options = null) + internal static WsfcDomainProfile DeserializeWsfcDomainProfile(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -121,10 +126,11 @@ internal static WindowsServerFailoverClusterDomainProfile DeserializeWindowsServ string clusterBootstrapAccount = default; string clusterOperatorAccount = default; string sqlServiceAccount = default; + bool? isSqlServiceAccountGmsa = default; string fileShareWitnessPath = default; - Uri storageAccountUrl = default; + string storageAccountUrl = default; string storageAccountPrimaryKey = default; - SqlVmClusterSubnetType? clusterSubnetType = default; + ClusterSubnetType? clusterSubnetType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -154,6 +160,15 @@ internal static WindowsServerFailoverClusterDomainProfile DeserializeWindowsServ sqlServiceAccount = property.Value.GetString(); continue; } + if (property.NameEquals("isSqlServiceAccountGmsa"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSqlServiceAccountGmsa = property.Value.GetBoolean(); + continue; + } if (property.NameEquals("fileShareWitnessPath"u8)) { fileShareWitnessPath = property.Value.GetString(); @@ -161,11 +176,7 @@ internal static WindowsServerFailoverClusterDomainProfile DeserializeWindowsServ } if (property.NameEquals("storageAccountUrl"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - storageAccountUrl = new Uri(property.Value.GetString()); + storageAccountUrl = property.Value.GetString(); continue; } if (property.NameEquals("storageAccountPrimaryKey"u8)) @@ -179,7 +190,7 @@ internal static WindowsServerFailoverClusterDomainProfile DeserializeWindowsServ { continue; } - clusterSubnetType = new SqlVmClusterSubnetType(property.Value.GetString()); + clusterSubnetType = new ClusterSubnetType(property.Value.GetString()); continue; } if (options.Format != "W") @@ -188,12 +199,13 @@ internal static WindowsServerFailoverClusterDomainProfile DeserializeWindowsServ } } serializedAdditionalRawData = rawDataDictionary; - return new WindowsServerFailoverClusterDomainProfile( + return new WsfcDomainProfile( domainFqdn, ouPath, clusterBootstrapAccount, clusterOperatorAccount, sqlServiceAccount, + isSqlServiceAccountGmsa, fileShareWitnessPath, storageAccountUrl, storageAccountPrimaryKey, @@ -201,35 +213,35 @@ internal static WindowsServerFailoverClusterDomainProfile DeserializeWindowsServ serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(WindowsServerFailoverClusterDomainProfile)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(WsfcDomainProfile)} does not support writing '{options.Format}' format."); } } - WindowsServerFailoverClusterDomainProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + WsfcDomainProfile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeWindowsServerFailoverClusterDomainProfile(document.RootElement, options); + return DeserializeWsfcDomainProfile(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(WindowsServerFailoverClusterDomainProfile)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(WsfcDomainProfile)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + 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/WsfcDomainProfile.cs similarity index 80% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WsfcDomainProfile.cs index 521146dc1174..662841b91798 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WindowsServerFailoverClusterDomainProfile.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/Models/WsfcDomainProfile.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.SqlVirtualMachine.Models { /// Active Directory account details to operate Windows Server Failover Cluster. - public partial class WindowsServerFailoverClusterDomainProfile + public partial class WsfcDomainProfile { /// /// Keeps track of any properties unknown to the library. @@ -45,29 +45,31 @@ public partial class WindowsServerFailoverClusterDomainProfile /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public WindowsServerFailoverClusterDomainProfile() + /// Initializes a new instance of . + public WsfcDomainProfile() { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Fully qualified name of the domain. - /// Organizational Unit path in which the nodes and cluster will be present. + /// Organizational Unit path in which the nodes and cluster will be present. /// 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) + internal WsfcDomainProfile(string domainFqdn, string ouPath, string clusterBootstrapAccount, string clusterOperatorAccount, string sqlServiceAccount, bool? isSqlServiceAccountGmsa, string fileShareWitnessPath, string storageAccountUri, string storageAccountPrimaryKey, ClusterSubnetType? clusterSubnetType, IDictionary serializedAdditionalRawData) { DomainFqdn = domainFqdn; - OrganizationalUnitPath = organizationalUnitPath; + OuPath = ouPath; ClusterBootstrapAccount = clusterBootstrapAccount; ClusterOperatorAccount = clusterOperatorAccount; SqlServiceAccount = sqlServiceAccount; + IsSqlServiceAccountGmsa = isSqlServiceAccountGmsa; FileShareWitnessPath = fileShareWitnessPath; StorageAccountUri = storageAccountUri; StorageAccountPrimaryKey = storageAccountPrimaryKey; @@ -78,20 +80,22 @@ internal WindowsServerFailoverClusterDomainProfile(string domainFqdn, string org /// 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; } + public string OuPath { 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; } + public string StorageAccountUri { get; set; } /// Primary key of the witness storage account. public string StorageAccountPrimaryKey { get; set; } /// Cluster subnet type. - public SqlVmClusterSubnetType? ClusterSubnetType { get; set; } + public ClusterSubnetType? ClusterSubnetType { get; set; } } } 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..33d5935d99d3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/AvailabilityGroupListenersRestOperations.cs @@ -25,18 +25,18 @@ internal partial class AvailabilityGroupListenersRestOperations /// 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. + /// Service host. + /// The API version to use for this operation. /// or is null. public AvailabilityGroupListenersRestOperations(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"; + _apiVersion = apiVersion ?? "2023-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, string expand) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, string expand) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -45,18 +45,18 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res 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); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, string expand) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, string expand) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -68,14 +68,14 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou 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); request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -83,22 +83,22 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// 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. + /// 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 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) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, 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(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName, expand); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -117,22 +117,22 @@ public async Task> GetAsync(string subsc } /// 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. + /// 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 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) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, 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(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName, expand); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, expand); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -150,7 +150,7 @@ public Response Get(string subscriptionId, string } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, AvailabilityGroupListenerData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, AvailabilityGroupListenerData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -159,14 +159,14 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, 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); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName, AvailabilityGroupListenerData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, AvailabilityGroupListenerData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -178,7 +178,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(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendPath("/availabilityGroupListeners/", false); uri.AppendPath(availabilityGroupListenerName, true); uri.AppendQuery("api-version", _apiVersion, true); @@ -193,23 +193,23 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// 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. + /// 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 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) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, AvailabilityGroupListenerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -222,23 +222,23 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// 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. + /// 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 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) + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, AvailabilityGroupListenerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -250,7 +250,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -259,14 +259,14 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string 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); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, string availabilityGroupListenerName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -278,31 +278,32 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG 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); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); 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. + /// 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 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) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -316,21 +317,21 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// 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. + /// 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 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) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, string availabilityGroupListenerName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); Argument.AssertNotNullOrEmpty(availabilityGroupListenerName, nameof(availabilityGroupListenerName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmGroupName, availabilityGroupListenerName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, availabilityGroupListenerName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -343,7 +344,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s } } - internal RequestUriBuilder CreateListByGroupRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal RequestUriBuilder CreateListByGroupRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -352,13 +353,13 @@ internal RequestUriBuilder CreateListByGroupRequestUri(string subscriptionId, st 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); return uri; } - internal HttpMessage CreateListByGroupRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal HttpMessage CreateListByGroupRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -370,7 +371,7 @@ internal HttpMessage CreateListByGroupRequest(string subscriptionId, string reso 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); request.Uri = uri; @@ -380,19 +381,19 @@ internal HttpMessage CreateListByGroupRequest(string subscriptionId, string reso } /// 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 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 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByGroupAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var message = CreateListByGroupRequest(subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateListByGroupRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -409,19 +410,19 @@ public async Task> ListByGroupAsyn } /// 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 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 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByGroup(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var message = CreateListByGroupRequest(subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateListByGroupRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -437,7 +438,7 @@ public Response ListByGroup(string subscrip } } - internal RequestUriBuilder CreateListByGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal RequestUriBuilder CreateListByGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -445,7 +446,7 @@ internal RequestUriBuilder CreateListByGroupNextPageRequestUri(string nextLink, return uri; } - internal HttpMessage CreateListByGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal HttpMessage CreateListByGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -461,20 +462,20 @@ internal HttpMessage CreateListByGroupNextPageRequest(string nextLink, string su /// 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 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 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) + /// , , 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 sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var message = CreateListByGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateListByGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -492,20 +493,20 @@ public async Task> ListByGroupNext /// 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 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 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) + /// , , 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 sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var message = CreateListByGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateListByGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { 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..7ebe1c6d4d89 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/OperationsRestOperations.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.SqlVirtualMachine.Models; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + internal partial class OperationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OperationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public OperationsRestOperations(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 ?? "2023-10-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri() + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/operations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/operations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all of the available SQL Virtual Machine Rest API operations. + /// The cancellation token to use. + public async Task> ListAsync(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all of the available SQL Virtual Machine Rest API operations. + /// The cancellation token to use. + public Response List(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink) + { + 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); + return message; + } + + /// Lists all of the available SQL Virtual Machine Rest API operations. + /// The URL to the next page of results. + /// The cancellation token to use. + /// is null. + public async Task> ListNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + + using var message = CreateListNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all of the available SQL Virtual Machine Rest API operations. + /// The URL to the next page of results. + /// The cancellation token to use. + /// is null. + public Response ListNextPage(string nextLink, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + + using var message = CreateListNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OperationListResult.DeserializeOperationListResult(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/SqlVirtualMachineGroupsRestOperations.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs index cb13b94d9c41..fe268b128e74 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachineGroupsRestOperations.cs @@ -25,18 +25,18 @@ internal partial class SqlVirtualMachineGroupsRestOperations /// 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. + /// Service host. + /// The API version to use for this operation. /// or is null. public SqlVirtualMachineGroupsRestOperations(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"; + _apiVersion = apiVersion ?? "2023-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -45,12 +45,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res 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; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -62,7 +62,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(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -71,68 +71,68 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// 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 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 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - SqlVmGroupData value = default; + SqlVirtualMachineGroupData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmGroupData.DeserializeSqlVmGroupData(document.RootElement); + value = SqlVirtualMachineGroupData.DeserializeSqlVirtualMachineGroupData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((SqlVmGroupData)null, message.Response); + return Response.FromValue((SqlVirtualMachineGroupData)null, message.Response); default: throw new RequestFailedException(message.Response); } } /// 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 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 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - SqlVmGroupData value = default; + SqlVirtualMachineGroupData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmGroupData.DeserializeSqlVmGroupData(document.RootElement); + value = SqlVirtualMachineGroupData.DeserializeSqlVirtualMachineGroupData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((SqlVmGroupData)null, message.Response); + return Response.FromValue((SqlVirtualMachineGroupData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupData data) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, SqlVirtualMachineGroupData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -141,12 +141,12 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, 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; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, SqlVirtualMachineGroupData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -158,7 +158,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(sqlVmGroupName, true); + uri.AppendPath(sqlVirtualMachineGroupName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -171,21 +171,21 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// 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 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 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, SqlVirtualMachineGroupData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -198,21 +198,21 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// 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 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 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, SqlVirtualMachineGroupData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, data); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -224,7 +224,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, SqlVirtualMachineGroupPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -233,16 +233,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string 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; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, SqlVirtualMachineGroupPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -250,66 +250,71 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG 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); 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); 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. + /// Updates SQL virtual machine group tags. + /// 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 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, SqlVirtualMachineGroupPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, patch); 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. + /// Updates SQL virtual machine group tags. + /// 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 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, SqlVirtualMachineGroupPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName, patch); _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) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -318,16 +323,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string 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; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName, SqlVmGroupPatch patch) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -335,64 +340,60 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG 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); 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); 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. + /// Deletes a SQL virtual machine group. + /// 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 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); 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); } } - /// 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. + /// Deletes a SQL virtual machine group. + /// 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 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVmGroupName, patch); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -432,12 +433,12 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// 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 ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// 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) + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -448,9 +449,9 @@ public async Task> ListByResourceGroupAsync(strin { case 200: { - SqlVmGroupListResult value = default; + SqlVirtualMachineGroupListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); + value = SqlVirtualMachineGroupListResult.DeserializeSqlVirtualMachineGroupListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -459,12 +460,12 @@ public async Task> ListByResourceGroupAsync(strin } /// 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 ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// 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) + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -475,9 +476,9 @@ public Response ListByResourceGroup(string subscriptionId, { case 200: { - SqlVmGroupListResult value = default; + SqlVirtualMachineGroupListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); + value = SqlVirtualMachineGroupListResult.DeserializeSqlVirtualMachineGroupListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -514,11 +515,11 @@ internal HttpMessage CreateListRequest(string subscriptionId) } /// Gets all SQL virtual machine groups in a subscription. - /// Subscription ID that identifies an Azure subscription. + /// The ID of the target subscription. The value must be an UUID. /// 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) + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -528,9 +529,9 @@ public async Task> ListAsync(string subscriptionI { case 200: { - SqlVmGroupListResult value = default; + SqlVirtualMachineGroupListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); + value = SqlVirtualMachineGroupListResult.DeserializeSqlVirtualMachineGroupListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -539,11 +540,11 @@ public async Task> ListAsync(string subscriptionI } /// Gets all SQL virtual machine groups in a subscription. - /// Subscription ID that identifies an Azure subscription. + /// The ID of the target subscription. The value must be an UUID. /// 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) + public Response List(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -553,9 +554,103 @@ public Response List(string subscriptionId, CancellationTo { case 200: { - SqlVmGroupListResult value = default; + SqlVirtualMachineGroupListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); + value = SqlVirtualMachineGroupListResult.DeserializeSqlVirtualMachineGroupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySqlVmGroupRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) + { + 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(sqlVirtualMachineGroupName, true); + uri.AppendPath("/sqlVirtualMachines", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySqlVmGroupRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) + { + 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(sqlVirtualMachineGroupName, 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. + /// 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 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 sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + + using var message = CreateListBySqlVmGroupRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SqlVirtualMachineListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(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 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 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 sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + + using var message = CreateListBySqlVmGroupRequest(subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SqlVirtualMachineListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -587,12 +682,12 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// 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 ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// 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) + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -604,9 +699,9 @@ public async Task> ListByResourceGroupNextPageAsy { case 200: { - SqlVmGroupListResult value = default; + SqlVirtualMachineGroupListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); + value = SqlVirtualMachineGroupListResult.DeserializeSqlVirtualMachineGroupListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -616,12 +711,12 @@ public async Task> ListByResourceGroupNextPageAsy /// 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 ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// 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) + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -633,9 +728,9 @@ public Response ListByResourceGroupNextPage(string nextLin { case 200: { - SqlVmGroupListResult value = default; + SqlVirtualMachineGroupListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); + value = SqlVirtualMachineGroupListResult.DeserializeSqlVirtualMachineGroupListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -667,11 +762,11 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 ID of the target subscription. The value must be an UUID. /// 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) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -682,9 +777,9 @@ public async Task> ListNextPageAsync(string nextL { case 200: { - SqlVmGroupListResult value = default; + SqlVirtualMachineGroupListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); + value = SqlVirtualMachineGroupListResult.DeserializeSqlVirtualMachineGroupListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -694,11 +789,11 @@ public async Task> ListNextPageAsync(string nextL /// 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 ID of the target subscription. The value must be an UUID. /// 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) + public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -709,9 +804,93 @@ public Response ListNextPage(string nextLink, string subsc { case 200: { - SqlVmGroupListResult value = default; + SqlVirtualMachineGroupListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SqlVirtualMachineGroupListResult.DeserializeSqlVirtualMachineGroupListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySqlVmGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySqlVmGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) + { + 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); + return message; + } + + /// Gets the list of sql virtual machines in a SQL virtual machine group. + /// The URL to the next page of results. + /// 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 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 sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + + using var message = CreateListBySqlVmGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SqlVirtualMachineListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(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. + /// 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 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 sqlVirtualMachineGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineGroupName, nameof(sqlVirtualMachineGroupName)); + + using var message = CreateListBySqlVmGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVirtualMachineGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SqlVirtualMachineListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmGroupListResult.DeserializeSqlVmGroupListResult(document.RootElement); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: 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..86fbf4447afe 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/RestOperations/SqlVirtualMachinesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class SqlVirtualMachinesRestOperations /// 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. + /// Service host. + /// The API version to use for this operation. /// 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"; + _apiVersion = apiVersion ?? "2023-10-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListBySqlVmGroupRequestUri(string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, string expand) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,14 +44,17 @@ internal RequestUriBuilder CreateListBySqlVmGroupRequestUri(string subscriptionI 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.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); + uri.AppendPath(sqlVirtualMachineName, true); uri.AppendQuery("api-version", _apiVersion, true); + if (expand != null) + { + uri.AppendQuery("$expand", expand, true); + } return uri; } - internal HttpMessage CreateListBySqlVmGroupRequest(string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, string expand) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -62,153 +65,176 @@ internal HttpMessage CreateListBySqlVmGroupRequest(string subscriptionId, string 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.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); + uri.AppendPath(sqlVirtualMachineName, true); uri.AppendQuery("api-version", _apiVersion, true); + if (expand != null) + { + uri.AppendQuery("$expand", expand, 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. + /// Gets a SQL virtual machine. + /// 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. + /// 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> ListBySqlVmGroupAsync(string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var message = CreateListBySqlVmGroupRequest(subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName, expand); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - SqlVmListResult value = default; + SqlVirtualMachineData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); + value = SqlVirtualMachineData.DeserializeSqlVirtualMachineData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((SqlVirtualMachineData)null, 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. + /// Gets a SQL virtual machine. + /// 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. + /// 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 ListBySqlVmGroup(string subscriptionId, string resourceGroupName, string sqlVmGroupName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var message = CreateListBySqlVmGroupRequest(subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName, expand); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - SqlVmListResult value = default; + SqlVirtualMachineData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); + value = SqlVirtualMachineData.DeserializeSqlVirtualMachineData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((SqlVirtualMachineData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); + uri.AppendPath(sqlVirtualMachineName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); + uri.AppendPath(sqlVirtualMachineName, true); uri.AppendQuery("api-version", _apiVersion, true); 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.Content = content; _userAgent.Apply(message); return message; } - /// Gets all SQL virtual machines in a subscription. - /// Subscription ID that identifies an Azure subscription. + /// Creates or updates a SQL virtual machine. + /// 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. + /// The SQL virtual machine. /// 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName, data); 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); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets all SQL virtual machines in a subscription. - /// Subscription ID that identifies an Azure subscription. + /// Creates or updates a SQL virtual machine. + /// 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. + /// The SQL virtual machine. /// 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachineData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName, data); _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); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName, string expand) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachinePatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -217,20 +243,16 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res 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) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachinePatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -238,83 +260,71 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou 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); 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); 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. + /// Updates SQL virtual machine tags. + /// 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. + /// 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> GetAsync(string subscriptionId, string resourceGroupName, string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachinePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmName, expand); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName, patch); 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); + return 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. + /// Updates SQL virtual machine tags. + /// 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. + /// 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 Get(string subscriptionId, string resourceGroupName, string sqlVmName, string expand = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVirtualMachinePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, sqlVmName, expand); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName, patch); _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); + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmData data) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -323,16 +333,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, 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; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmData data) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -340,73 +350,67 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r 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); 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.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. + /// Deletes a SQL virtual machine. + /// 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. /// 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: 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. + /// Deletes a SQL virtual machine. + /// 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. /// 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, sqlVmName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName) + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -414,174 +418,163 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string 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); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string sqlVmName) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + 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); + 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; } - /// 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. + /// Gets all SQL virtual machines in a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// 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) + /// 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)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + SqlVirtualMachineListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(document.RootElement); + return Response.FromValue(value, 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. + /// Gets all SQL virtual machines in a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// 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) + /// 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)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, sqlVmName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + SqlVirtualMachineListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmPatch patch) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId) { 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("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string sqlVmName, SqlVmPatch patch) + internal HttpMessage CreateListRequest(string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + 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); + uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", false); uri.AppendQuery("api-version", _apiVersion, true); 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); 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. + /// Gets all SQL virtual machines in a subscription. + /// The ID of the target subscription. The value must be an UUID. /// 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) + /// 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)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVmName, patch); + using var message = CreateListRequest(subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - return message.Response; + { + SqlVirtualMachineListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(document.RootElement); + return Response.FromValue(value, 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. + /// Gets all SQL virtual machines in a subscription. + /// The ID of the target subscription. The value must be an UUID. /// 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) + /// 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)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, sqlVmName, patch); + using var message = CreateListRequest(subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - return message.Response; + { + SqlVirtualMachineListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateStartAssessmentRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -589,23 +582,27 @@ internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscripti uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines", false); + uri.AppendPath("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); + uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath("/startAssessment", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateStartAssessmentRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; 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("/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/", false); + uri.AppendPath(sqlVirtualMachineName, true); + uri.AppendPath("/startAssessment", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -613,61 +610,55 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str 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. + /// Starts SQL best practices Assessment on SQL virtual machine. + /// 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. /// 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StartAssessmentAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateStartAssessmentRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName); 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); - } + case 202: + return 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. + /// Starts SQL best practices Assessment on SQL virtual machine. + /// 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. /// 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response StartAssessment(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateStartAssessmentRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName); _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); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRedeployRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName) + internal RequestUriBuilder CreateFetchDCAssessmentRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, DiskConfigAssessmentContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -676,13 +667,13 @@ internal RequestUriBuilder CreateRedeployRequestUri(string subscriptionId, strin 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); return uri; } - internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourceGroupName, string sqlVmName) + internal HttpMessage CreateFetchDCAssessmentRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, DiskConfigAssessmentContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -694,32 +685,38 @@ internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourc 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); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); 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. + /// Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine. + /// 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. + /// Disk Config Assessment property. /// 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task FetchDCAssessmentAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, DiskConfigAssessmentContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, sqlVmName); + using var message = CreateFetchDCAssessmentRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -727,24 +724,25 @@ public async Task RedeployAsync(string subscriptionId, string resource } } - /// 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. + /// Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine. + /// 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. + /// Disk Config Assessment property. /// 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response FetchDCAssessment(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, DiskConfigAssessmentContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, sqlVmName); + using var message = CreateFetchDCAssessmentRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -752,7 +750,7 @@ public Response Redeploy(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateStartAssessmentRequestUri(string subscriptionId, string resourceGroupName, string sqlVmName) + internal RequestUriBuilder CreateRedeployRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -761,13 +759,13 @@ internal RequestUriBuilder CreateStartAssessmentRequestUri(string subscriptionId 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; } - internal HttpMessage CreateStartAssessmentRequest(string subscriptionId, string resourceGroupName, string sqlVmName) + internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -779,32 +777,32 @@ internal HttpMessage CreateStartAssessmentRequest(string subscriptionId, string 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); request.Uri = uri; + request.Headers.Add("Accept", "application/json"); _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. + /// Uninstalls and reinstalls the SQL IaaS Extension. + /// 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. /// 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RedeployAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var message = CreateStartAssessmentRequest(subscriptionId, resourceGroupName, sqlVmName); + using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -812,24 +810,23 @@ public async Task StartAssessmentAsync(string subscriptionId, string r } } - /// 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. + /// Uninstalls and reinstalls the SQL IaaS Extension. + /// 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. /// 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) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Redeploy(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var message = CreateStartAssessmentRequest(subscriptionId, resourceGroupName, sqlVmName); + using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -837,91 +834,101 @@ public Response StartAssessment(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateListBySqlVmGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal RequestUriBuilder CreateTroubleshootRequestUri(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVmTroubleshooting sqlVmTroubleshooting) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + 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); return uri; } - internal HttpMessage CreateListBySqlVmGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sqlVmGroupName) + internal HttpMessage CreateTroubleshootRequest(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVmTroubleshooting sqlVmTroubleshooting) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); + 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); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(sqlVmTroubleshooting, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); 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. + /// Starts SQL virtual machine troubleshooting. + /// 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. + /// The SQL virtual machine troubleshooting entity. /// 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task TroubleshootAsync(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVmTroubleshooting sqlVmTroubleshooting, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNull(sqlVmTroubleshooting, nameof(sqlVmTroubleshooting)); - using var message = CreateListBySqlVmGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateTroubleshootRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName, sqlVmTroubleshooting); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 202: 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); - } + return 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. + /// Starts SQL virtual machine troubleshooting. + /// 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. + /// The SQL virtual machine troubleshooting entity. /// 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) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Troubleshoot(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName, SqlVmTroubleshooting sqlVmTroubleshooting, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(sqlVmGroupName, nameof(sqlVmGroupName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); + Argument.AssertNotNull(sqlVmTroubleshooting, nameof(sqlVmTroubleshooting)); - using var message = CreateListBySqlVmGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, sqlVmGroupName); + using var message = CreateTroubleshootRequest(subscriptionId, resourceGroupName, sqlVirtualMachineName, sqlVmTroubleshooting); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 202: 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); - } + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -929,7 +936,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -943,26 +950,28 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// Gets all SQL virtual machines in a subscription. + /// Gets all SQL virtual machines in a resource group. /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// 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) + /// , 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 = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - SqlVmListResult value = default; + SqlVirtualMachineListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -970,26 +979,28 @@ public async Task> ListNextPageAsync(string nextLink, } } - /// Gets all SQL virtual machines in a subscription. + /// Gets all SQL virtual machines in a resource group. /// The URL to the next page of results. - /// Subscription ID that identifies an Azure subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// 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) + /// , 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 = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - SqlVmListResult value = default; + SqlVirtualMachineListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -997,7 +1008,7 @@ public Response ListNextPage(string nextLink, string subscripti } } - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1005,7 +1016,7 @@ internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1019,28 +1030,26 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// Gets all SQL virtual machines in a resource group. + /// Gets all SQL virtual machines in a subscription. /// 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 ID of the target subscription. The value must be an UUID. /// 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) + /// 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)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - SqlVmListResult value = default; + SqlVirtualMachineListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1048,28 +1057,26 @@ public async Task> ListByResourceGroupNextPageAsync(st } } - /// Gets all SQL virtual machines in a resource group. + /// Gets all SQL virtual machines in a subscription. /// 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 ID of the target subscription. The value must be an UUID. /// 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) + /// 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)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - SqlVmListResult value = default; + SqlVirtualMachineListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = SqlVmListResult.DeserializeSqlVmListResult(document.RootElement); + value = SqlVirtualMachineListResult.DeserializeSqlVirtualMachineListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineCollection.cs similarity index 53% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineCollection.cs index 848b0e2394d3..4c0267a74665 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmCollection.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineCollection.cs @@ -19,28 +19,28 @@ 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 a instance call the GetSqlVms method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSqlVirtualMachines method from an instance of . /// - public partial class SqlVmCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class SqlVirtualMachineCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _sqlVmSqlVirtualMachinesClientDiagnostics; - private readonly SqlVirtualMachinesRestOperations _sqlVmSqlVirtualMachinesRestClient; + private readonly ClientDiagnostics _sqlVirtualMachineClientDiagnostics; + private readonly SqlVirtualMachinesRestOperations _sqlVirtualMachineRestClient; - /// Initializes a new instance of the class for mocking. - protected SqlVmCollection() + /// Initializes a new instance of the class for mocking. + protected SqlVirtualMachineCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal SqlVmCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal SqlVirtualMachineCollection(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); + _sqlVirtualMachineClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVirtualMachineResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SqlVirtualMachineResource.ResourceType, out string sqlVirtualMachineApiVersion); + _sqlVirtualMachineRestClient = new SqlVirtualMachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlVirtualMachineApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -61,35 +61,35 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// SqlVirtualMachines_CreateOrUpdate + /// SqlVirtualMachine_CreateOrUpdate /// /// /// Default Api Version - /// 2022-02-01 + /// 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. - /// 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) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sqlVirtualMachineName, SqlVirtualMachineData 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 var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineCollection.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); + var response = await _sqlVirtualMachineRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, data, cancellationToken).ConfigureAwait(false); + var operation = new SqlVirtualMachineArmOperation(new SqlVirtualMachineOperationSource(Client), _sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -110,35 +110,35 @@ public virtual async Task> CreateOrUpdateAsync(WaitU /// /// /// Operation Id - /// SqlVirtualMachines_CreateOrUpdate + /// SqlVirtualMachine_CreateOrUpdate /// /// /// Default Api Version - /// 2022-02-01 + /// 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. - /// 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) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sqlVirtualMachineName, SqlVirtualMachineData 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 var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineCollection.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); + var response = _sqlVirtualMachineRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, data, cancellationToken); + var operation = new SqlVirtualMachineArmOperation(new SqlVirtualMachineOperationSource(Client), _sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -159,35 +159,35 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, s /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Get"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineCollection.Get"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken).ConfigureAwait(false); + var response = await _sqlVirtualMachineRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -205,35 +205,35 @@ public virtual async Task> GetAsync(string sqlVmName, st /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Get"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineCollection.Get"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken); + var response = _sqlVirtualMachineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -251,25 +251,25 @@ public virtual Response Get(string sqlVmName, string expand = nul /// /// /// Operation Id - /// SqlVirtualMachines_ListByResourceGroup + /// SqlVirtualMachine_ListByResourceGroup /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVirtualMachineRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVirtualMachineRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlVirtualMachineResource(Client, SqlVirtualMachineData.DeserializeSqlVirtualMachineData(e)), _sqlVirtualMachineClientDiagnostics, Pipeline, "SqlVirtualMachineCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -281,25 +281,25 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cancel /// /// /// Operation Id - /// SqlVirtualMachines_ListByResourceGroup + /// SqlVirtualMachine_ListByResourceGroup /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVirtualMachineRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVirtualMachineRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlVirtualMachineResource(Client, SqlVirtualMachineData.DeserializeSqlVirtualMachineData(e)), _sqlVirtualMachineClientDiagnostics, Pipeline, "SqlVirtualMachineCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -311,32 +311,32 @@ public virtual Pageable GetAll(CancellationToken cancellationToke /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Exists"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineCollection.Exists"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _sqlVirtualMachineRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -355,32 +355,32 @@ public virtual async Task> ExistsAsync(string sqlVmName, string e /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.Exists"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineCollection.Exists"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken: cancellationToken); + var response = _sqlVirtualMachineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -399,35 +399,35 @@ public virtual Response Exists(string sqlVmName, string expand = null, Can /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.GetIfExists"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineCollection.GetIfExists"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _sqlVirtualMachineRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -445,35 +445,35 @@ public virtual async Task> GetIfExistsAsync(stri /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string sqlVirtualMachineName, string expand = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(sqlVmName, nameof(sqlVmName)); + Argument.AssertNotNullOrEmpty(sqlVirtualMachineName, nameof(sqlVirtualMachineName)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmCollection.GetIfExists"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineCollection.GetIfExists"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmName, expand, cancellationToken: cancellationToken); + var response = _sqlVirtualMachineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineName, expand, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -482,7 +482,7 @@ public virtual NullableResponse GetIfExists(string sqlVmName, str } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -492,7 +492,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + 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/SqlVirtualMachineData.Serialization.cs similarity index 64% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineData.Serialization.cs index 8e146563eccc..68cfbf688db2 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineData.Serialization.cs @@ -8,7 +8,6 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; -using System.Net; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -16,11 +15,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - public partial class SqlVmData : IUtf8JsonSerializable, IJsonModel + public partial class SqlVirtualMachineData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -31,17 +30,18 @@ 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; + var 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachineData)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Identity)) { writer.WritePropertyName("identity"u8); - JsonSerializer.Serialize(writer, Identity); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); @@ -70,25 +70,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri 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)) + if (Optional.IsDefined(SqlVirtualMachineGroupResourceId)) { writer.WritePropertyName("sqlVirtualMachineGroupResourceId"u8); - writer.WriteStringValue(SqlVmGroupResourceId); + writer.WriteStringValue(SqlVirtualMachineGroupResourceId); } - if (Optional.IsDefined(WindowsServerFailoverClusterDomainCredentials)) + if (Optional.IsDefined(WsfcDomainCredentials)) { writer.WritePropertyName("wsfcDomainCredentials"u8); - writer.WriteObjectValue(WindowsServerFailoverClusterDomainCredentials, options); + writer.WriteObjectValue(WsfcDomainCredentials, options); } - if (Optional.IsDefined(WindowsServerFailoverClusterStaticIP)) + if (Optional.IsDefined(WsfcStaticIP)) { writer.WritePropertyName("wsfcStaticIp"u8); - writer.WriteStringValue(WindowsServerFailoverClusterStaticIP.ToString()); + writer.WriteStringValue(WsfcStaticIP); } if (Optional.IsDefined(AutoPatchingSettings)) { @@ -115,27 +120,52 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri 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()); + } writer.WriteEndObject(); } - SqlVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SqlVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachineData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmData(document.RootElement, options); + return DeserializeSqlVirtualMachineData(document.RootElement, options); } - internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderWriterOptions options = null) + internal static SqlVirtualMachineData DeserializeSqlVirtualMachineData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -150,21 +180,27 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW string name = default; ResourceType type = default; SystemData systemData = default; - ResourceIdentifier virtualMachineResourceId = default; + string 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; - SqlVmAssessmentSettings assessmentSettings = default; + string sqlVirtualMachineGroupResourceId = default; + WsfcDomainCredentials wsfcDomainCredentials = default; + string wsfcStaticIP = default; + AutoPatchingSettings autoPatchingSettings = default; + AutoBackupSettings autoBackupSettings = default; + KeyVaultCredentialSettings keyVaultCredentialSettings = default; + ServerConfigurationsManagementSettings serverConfigurationsManagementSettings = default; + StorageConfigurationSettings storageConfigurationSettings = default; + TroubleshootingStatus troubleshootingStatus = default; + AssessmentSettings assessmentSettings = default; + bool? enableAutomaticUpgrade = default; + AdditionalOSPatch? additionalVmPatch = default; + VirtualMachineIdentity virtualMachineIdentitySettings = default; + OSType? osType = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -175,7 +211,8 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW { continue; } - identity = JsonSerializer.Deserialize(property.Value.GetRawText()); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); continue; } if (property.NameEquals("tags"u8)) @@ -232,11 +269,7 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW { if (property0.NameEquals("virtualMachineResourceId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - virtualMachineResourceId = new ResourceIdentifier(property0.Value.GetString()); + virtualMachineResourceId = property0.Value.GetString(); continue; } if (property0.NameEquals("provisioningState"u8)) @@ -267,22 +300,27 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW sqlManagement = new SqlManagementMode(property0.Value.GetString()); continue; } - if (property0.NameEquals("sqlImageSku"u8)) + if (property0.NameEquals("leastPrivilegeMode"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlImageSku = new SqlImageSku(property0.Value.GetString()); + leastPrivilegeMode = new LeastPrivilegeMode(property0.Value.GetString()); continue; } - if (property0.NameEquals("sqlVirtualMachineGroupResourceId"u8)) + if (property0.NameEquals("sqlImageSku"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } - sqlVmGroupResourceId = new ResourceIdentifier(property0.Value.GetString()); + sqlImageSku = new SqlImageSku(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("sqlVirtualMachineGroupResourceId"u8)) + { + sqlVirtualMachineGroupResourceId = property0.Value.GetString(); continue; } if (property0.NameEquals("wsfcDomainCredentials"u8)) @@ -291,16 +329,12 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW { continue; } - windowsServerFailoverClusterDomainCredentials = WindowsServerFailoverClusterDomainCredentials.DeserializeWindowsServerFailoverClusterDomainCredentials(property0.Value, options); + wsfcDomainCredentials = WsfcDomainCredentials.DeserializeWsfcDomainCredentials(property0.Value, options); continue; } if (property0.NameEquals("wsfcStaticIp"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - windowsServerFailoverClusterStaticIP = IPAddress.Parse(property0.Value.GetString()); + wsfcStaticIP = property0.Value.GetString(); continue; } if (property0.NameEquals("autoPatchingSettings"u8)) @@ -309,7 +343,7 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW { continue; } - autoPatchingSettings = SqlVmAutoPatchingSettings.DeserializeSqlVmAutoPatchingSettings(property0.Value, options); + autoPatchingSettings = AutoPatchingSettings.DeserializeAutoPatchingSettings(property0.Value, options); continue; } if (property0.NameEquals("autoBackupSettings"u8)) @@ -318,7 +352,7 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW { continue; } - autoBackupSettings = SqlVmAutoBackupSettings.DeserializeSqlVmAutoBackupSettings(property0.Value, options); + autoBackupSettings = AutoBackupSettings.DeserializeAutoBackupSettings(property0.Value, options); continue; } if (property0.NameEquals("keyVaultCredentialSettings"u8)) @@ -327,7 +361,7 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW { continue; } - keyVaultCredentialSettings = SqlVmKeyVaultCredentialSettings.DeserializeSqlVmKeyVaultCredentialSettings(property0.Value, options); + keyVaultCredentialSettings = KeyVaultCredentialSettings.DeserializeKeyVaultCredentialSettings(property0.Value, options); continue; } if (property0.NameEquals("serverConfigurationsManagementSettings"u8)) @@ -336,7 +370,7 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW { continue; } - serverConfigurationsManagementSettings = SqlServerConfigurationsManagementSettings.DeserializeSqlServerConfigurationsManagementSettings(property0.Value, options); + serverConfigurationsManagementSettings = ServerConfigurationsManagementSettings.DeserializeServerConfigurationsManagementSettings(property0.Value, options); continue; } if (property0.NameEquals("storageConfigurationSettings"u8)) @@ -345,7 +379,16 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW { continue; } - storageConfigurationSettings = SqlVmStorageConfigurationSettings.DeserializeSqlVmStorageConfigurationSettings(property0.Value, options); + storageConfigurationSettings = StorageConfigurationSettings.DeserializeStorageConfigurationSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("troubleshootingStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + troubleshootingStatus = TroubleshootingStatus.DeserializeTroubleshootingStatus(property0.Value, options); continue; } if (property0.NameEquals("assessmentSettings"u8)) @@ -354,7 +397,43 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW { continue; } - assessmentSettings = SqlVmAssessmentSettings.DeserializeSqlVmAssessmentSettings(property0.Value, options); + assessmentSettings = AssessmentSettings.DeserializeAssessmentSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("enableAutomaticUpgrade"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enableAutomaticUpgrade = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("additionalVmPatch"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalVmPatch = new AdditionalOSPatch(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("virtualMachineIdentitySettings"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualMachineIdentitySettings = VirtualMachineIdentity.DeserializeVirtualMachineIdentity(property0.Value, options); + continue; + } + if (property0.NameEquals("osType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + osType = property0.Value.GetString().ToOSType(); continue; } } @@ -366,7 +445,7 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmData( + return new SqlVirtualMachineData( id, name, type, @@ -379,48 +458,54 @@ internal static SqlVmData DeserializeSqlVmData(JsonElement element, ModelReaderW sqlImageOffer, sqlServerLicenseType, sqlManagement, + leastPrivilegeMode, sqlImageSku, - sqlVmGroupResourceId, - windowsServerFailoverClusterDomainCredentials, - windowsServerFailoverClusterStaticIP, + sqlVirtualMachineGroupResourceId, + wsfcDomainCredentials, + wsfcStaticIP, autoPatchingSettings, autoBackupSettings, keyVaultCredentialSettings, serverConfigurationsManagementSettings, storageConfigurationSettings, + troubleshootingStatus, assessmentSettings, + enableAutomaticUpgrade, + additionalVmPatch, + virtualMachineIdentitySettings, + osType, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlVmData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVirtualMachineData)} does not support writing '{options.Format}' format."); } } - SqlVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SqlVirtualMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmData(document.RootElement, options); + return DeserializeSqlVirtualMachineData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVirtualMachineData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineData.cs similarity index 53% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineData.cs index 1f874cdf34d5..260f48acffc3 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmData.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Net; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.SqlVirtualMachine.Models; @@ -15,10 +14,10 @@ namespace Azure.ResourceManager.SqlVirtualMachine { /// - /// A class representing the SqlVm data model. + /// A class representing the SqlVirtualMachine data model. /// A SQL virtual machine. /// - public partial class SqlVmData : TrackedResourceData + public partial class SqlVirtualMachineData : TrackedResourceData { /// /// Keeps track of any properties unknown to the library. @@ -52,37 +51,43 @@ public partial class SqlVmData : TrackedResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The location. - public SqlVmData(AzureLocation location) : base(location) + public SqlVirtualMachineData(AzureLocation location) : base(location) { } - /// Initializes a new instance of . + /// 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. + /// DO NOT USE. This value will be deprecated. Azure Active Directory identity of the server. /// 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 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. + /// 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. + /// 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 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) + internal SqlVirtualMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string virtualMachineResourceId, string provisioningState, string sqlImageOffer, SqlServerLicenseType? sqlServerLicenseType, SqlManagementMode? sqlManagement, LeastPrivilegeMode? leastPrivilegeMode, SqlImageSku? sqlImageSku, string sqlVirtualMachineGroupResourceId, WsfcDomainCredentials wsfcDomainCredentials, string wsfcStaticIP, AutoPatchingSettings autoPatchingSettings, AutoBackupSettings autoBackupSettings, KeyVaultCredentialSettings keyVaultCredentialSettings, ServerConfigurationsManagementSettings serverConfigurationsManagementSettings, StorageConfigurationSettings storageConfigurationSettings, TroubleshootingStatus troubleshootingStatus, AssessmentSettings assessmentSettings, bool? enableAutomaticUpgrade, AdditionalOSPatch? additionalVmPatch, VirtualMachineIdentity virtualMachineIdentitySettings, OSType? osType, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; VirtualMachineResourceId = virtualMachineResourceId; @@ -90,55 +95,73 @@ internal SqlVmData(ResourceIdentifier id, string name, ResourceType resourceType SqlImageOffer = sqlImageOffer; SqlServerLicenseType = sqlServerLicenseType; SqlManagement = sqlManagement; + LeastPrivilegeMode = leastPrivilegeMode; SqlImageSku = sqlImageSku; - SqlVmGroupResourceId = sqlVmGroupResourceId; - WindowsServerFailoverClusterDomainCredentials = windowsServerFailoverClusterDomainCredentials; - WindowsServerFailoverClusterStaticIP = windowsServerFailoverClusterStaticIP; + SqlVirtualMachineGroupResourceId = sqlVirtualMachineGroupResourceId; + WsfcDomainCredentials = wsfcDomainCredentials; + WsfcStaticIP = wsfcStaticIP; AutoPatchingSettings = autoPatchingSettings; AutoBackupSettings = autoBackupSettings; KeyVaultCredentialSettings = keyVaultCredentialSettings; ServerConfigurationsManagementSettings = serverConfigurationsManagementSettings; StorageConfigurationSettings = storageConfigurationSettings; + TroubleshootingStatus = troubleshootingStatus; AssessmentSettings = assessmentSettings; + EnableAutomaticUpgrade = enableAutomaticUpgrade; + AdditionalVmPatch = additionalVmPatch; + VirtualMachineIdentitySettings = virtualMachineIdentitySettings; + OSType = osType; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SqlVmData() + /// Initializes a new instance of for deserialization. + internal SqlVirtualMachineData() { } - /// Azure Active Directory identity of the server. Current supported identity types: None, SystemAssigned. + /// 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 string 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. + /// 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; } + public string SqlVirtualMachineGroupResourceId { get; set; } /// Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. - public WindowsServerFailoverClusterDomainCredentials WindowsServerFailoverClusterDomainCredentials { get; set; } + public WsfcDomainCredentials WsfcDomainCredentials { get; set; } /// Domain credentials for setting up Windows Server Failover Cluster for SQL availability group. - public IPAddress WindowsServerFailoverClusterStaticIP { get; set; } + public string WsfcStaticIP { get; set; } /// Auto patching settings for applying critical security updates to SQL virtual machine. - public SqlVmAutoPatchingSettings AutoPatchingSettings { get; set; } + public AutoPatchingSettings AutoPatchingSettings { get; set; } /// Auto backup settings for SQL Server. - public SqlVmAutoBackupSettings AutoBackupSettings { get; set; } + public AutoBackupSettings AutoBackupSettings { get; set; } /// Key vault credential settings. - public SqlVmKeyVaultCredentialSettings KeyVaultCredentialSettings { get; set; } + public KeyVaultCredentialSettings KeyVaultCredentialSettings { get; set; } /// SQL Server configuration management settings. - public SqlServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get; set; } + public ServerConfigurationsManagementSettings ServerConfigurationsManagementSettings { get; set; } /// Storage Configuration Settings. - public SqlVmStorageConfigurationSettings StorageConfigurationSettings { get; set; } - /// Assessment Settings. - public SqlVmAssessmentSettings AssessmentSettings { get; set; } + public StorageConfigurationSettings StorageConfigurationSettings { get; set; } + /// Troubleshooting status. + public TroubleshootingStatus TroubleshootingStatus { get; } + /// SQL best practices Assessment Settings. + public AssessmentSettings 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/SqlVmGroupCollection.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupCollection.cs similarity index 51% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupCollection.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupCollection.cs index e5a33c4d0266..a08cb557a4a1 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupCollection.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupCollection.cs @@ -19,28 +19,28 @@ 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 a instance call the GetSqlVmGroups method from an instance of . + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetSqlVirtualMachineGroups method from an instance of . /// - public partial class SqlVmGroupCollection : ArmCollection, IEnumerable, IAsyncEnumerable + public partial class SqlVirtualMachineGroupCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _sqlVmGroupSqlVmGroupsClientDiagnostics; - private readonly SqlVirtualMachineGroupsRestOperations _sqlVmGroupSqlVmGroupsRestClient; + private readonly ClientDiagnostics _sqlVirtualMachineGroupClientDiagnostics; + private readonly SqlVirtualMachineGroupsRestOperations _sqlVirtualMachineGroupRestClient; - /// Initializes a new instance of the class for mocking. - protected SqlVmGroupCollection() + /// Initializes a new instance of the class for mocking. + protected SqlVirtualMachineGroupCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The identifier of the parent resource that is the target of operations. - internal SqlVmGroupCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + internal SqlVirtualMachineGroupCollection(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); + _sqlVirtualMachineGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", SqlVirtualMachineGroupResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SqlVirtualMachineGroupResource.ResourceType, out string sqlVirtualMachineGroupApiVersion); + _sqlVirtualMachineGroupRestClient = new SqlVirtualMachineGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlVirtualMachineGroupApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -61,35 +61,35 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// SqlVirtualMachineGroups_CreateOrUpdate + /// SqlVirtualMachineGroup_CreateOrUpdate /// /// /// Default Api Version - /// 2022-02-01 + /// 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. - /// 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) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string sqlVirtualMachineGroupName, SqlVirtualMachineGroupData 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 var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupCollection.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); + var response = await _sqlVirtualMachineGroupRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, data, cancellationToken).ConfigureAwait(false); + var operation = new SqlVirtualMachineArmOperation(new SqlVirtualMachineGroupOperationSource(Client), _sqlVirtualMachineGroupClientDiagnostics, Pipeline, _sqlVirtualMachineGroupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -110,35 +110,35 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Operation Id - /// SqlVirtualMachineGroups_CreateOrUpdate + /// SqlVirtualMachineGroup_CreateOrUpdate /// /// /// Default Api Version - /// 2022-02-01 + /// 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. - /// 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) + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string sqlVirtualMachineGroupName, SqlVirtualMachineGroupData 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 var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupCollection.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); + var response = _sqlVirtualMachineGroupRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, data, cancellationToken); + var operation = new SqlVirtualMachineArmOperation(new SqlVirtualMachineGroupOperationSource(Client), _sqlVirtualMachineGroupClientDiagnostics, Pipeline, _sqlVirtualMachineGroupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -159,34 +159,34 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + 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 var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupCollection.Get"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken).ConfigureAwait(false); + var response = await _sqlVirtualMachineGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -204,34 +204,34 @@ public virtual async Task> GetAsync(string sqlVmGro /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + 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 var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupCollection.Get"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken); + var response = _sqlVirtualMachineGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -249,25 +249,25 @@ public virtual Response Get(string sqlVmGroupName, Cancellat /// /// /// Operation Id - /// SqlVirtualMachineGroups_ListByResourceGroup + /// SqlVirtualMachineGroup_ListByResourceGroup /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVirtualMachineGroupRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVirtualMachineGroupRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlVirtualMachineGroupResource(Client, SqlVirtualMachineGroupData.DeserializeSqlVirtualMachineGroupData(e)), _sqlVirtualMachineGroupClientDiagnostics, Pipeline, "SqlVirtualMachineGroupCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -279,25 +279,25 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Operation Id - /// SqlVirtualMachineGroups_ListByResourceGroup + /// SqlVirtualMachineGroup_ListByResourceGroup /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// 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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVirtualMachineGroupRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVirtualMachineGroupRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlVirtualMachineGroupResource(Client, SqlVirtualMachineGroupData.DeserializeSqlVirtualMachineGroupData(e)), _sqlVirtualMachineGroupClientDiagnostics, Pipeline, "SqlVirtualMachineGroupCollection.GetAll", "value", "nextLink", cancellationToken); } /// @@ -309,31 +309,31 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + 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 var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupCollection.Exists"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _sqlVirtualMachineGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -352,31 +352,31 @@ public virtual async Task> ExistsAsync(string sqlVmGroupName, Can /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + 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 var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupCollection.Exists"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken: cancellationToken); + var response = _sqlVirtualMachineGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -395,34 +395,34 @@ public virtual Response Exists(string sqlVmGroupName, CancellationToken ca /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + 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 var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupCollection.GetIfExists"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _sqlVirtualMachineGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -440,34 +440,34 @@ public virtual async Task> GetIfExistsAsync /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// - /// 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 an empty string, and was expected to be non-empty. + /// is null. + 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 var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupCollection.GetIfExists"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVmGroupName, cancellationToken: cancellationToken); + var response = _sqlVirtualMachineGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, sqlVirtualMachineGroupName, cancellationToken: cancellationToken); if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -476,7 +476,7 @@ public virtual NullableResponse GetIfExists(string sqlVmGrou } } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -486,7 +486,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + 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/SqlVirtualMachineGroupData.Serialization.cs similarity index 78% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.Serialization.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupData.Serialization.cs index 9d9add570b4a..02941ad93d62 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupData.Serialization.cs @@ -15,11 +15,11 @@ namespace Azure.ResourceManager.SqlVirtualMachine { - public partial class SqlVmGroupData : IUtf8JsonSerializable, IJsonModel + public partial class SqlVirtualMachineGroupData : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - 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, 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; + var 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupData)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); @@ -69,27 +69,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("clusterConfiguration"u8); writer.WriteStringValue(ClusterConfiguration.Value.ToString()); } - if (Optional.IsDefined(WindowsServerFailoverClusterDomainProfile)) + if (Optional.IsDefined(WsfcDomainProfile)) { writer.WritePropertyName("wsfcDomainProfile"u8); - writer.WriteObjectValue(WindowsServerFailoverClusterDomainProfile, options); + writer.WriteObjectValue(WsfcDomainProfile, options); } writer.WriteEndObject(); } - SqlVmGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + SqlVirtualMachineGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var 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."); + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupData)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSqlVmGroupData(document.RootElement, options); + return DeserializeSqlVirtualMachineGroupData(document.RootElement, options); } - internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, ModelReaderWriterOptions options = null) + internal static SqlVirtualMachineGroupData DeserializeSqlVirtualMachineGroupData(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -106,10 +106,10 @@ internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, Mo string provisioningState = default; string sqlImageOffer = default; SqlVmGroupImageSku? sqlImageSku = default; - SqlVmGroupScaleType? scaleType = default; - SqlVmClusterManagerType? clusterManagerType = default; - SqlVmClusterConfiguration? clusterConfiguration = default; - WindowsServerFailoverClusterDomainProfile windowsServerFailoverClusterDomainProfile = default; + ScaleType? scaleType = default; + ClusterManagerType? clusterManagerType = default; + ClusterConfiguration? clusterConfiguration = default; + WsfcDomainProfile wsfcDomainProfile = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -191,7 +191,7 @@ internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, Mo { continue; } - scaleType = new SqlVmGroupScaleType(property0.Value.GetString()); + scaleType = new ScaleType(property0.Value.GetString()); continue; } if (property0.NameEquals("clusterManagerType"u8)) @@ -200,7 +200,7 @@ internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, Mo { continue; } - clusterManagerType = new SqlVmClusterManagerType(property0.Value.GetString()); + clusterManagerType = new ClusterManagerType(property0.Value.GetString()); continue; } if (property0.NameEquals("clusterConfiguration"u8)) @@ -209,7 +209,7 @@ internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, Mo { continue; } - clusterConfiguration = new SqlVmClusterConfiguration(property0.Value.GetString()); + clusterConfiguration = new ClusterConfiguration(property0.Value.GetString()); continue; } if (property0.NameEquals("wsfcDomainProfile"u8)) @@ -218,7 +218,7 @@ internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, Mo { continue; } - windowsServerFailoverClusterDomainProfile = WindowsServerFailoverClusterDomainProfile.DeserializeWindowsServerFailoverClusterDomainProfile(property0.Value, options); + wsfcDomainProfile = WsfcDomainProfile.DeserializeWsfcDomainProfile(property0.Value, options); continue; } } @@ -230,7 +230,7 @@ internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, Mo } } serializedAdditionalRawData = rawDataDictionary; - return new SqlVmGroupData( + return new SqlVirtualMachineGroupData( id, name, type, @@ -243,39 +243,39 @@ internal static SqlVmGroupData DeserializeSqlVmGroupData(JsonElement element, Mo scaleType, clusterManagerType, clusterConfiguration, - windowsServerFailoverClusterDomainProfile, + wsfcDomainProfile, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + 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(SqlVmGroupData)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupData)} does not support writing '{options.Format}' format."); } } - SqlVmGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + SqlVirtualMachineGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSqlVmGroupData(document.RootElement, options); + return DeserializeSqlVirtualMachineGroupData(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(SqlVmGroupData)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(SqlVirtualMachineGroupData)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupData.cs similarity index 74% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupData.cs index 8c7e18368dd0..479629a75b7e 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupData.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupData.cs @@ -14,10 +14,10 @@ namespace Azure.ResourceManager.SqlVirtualMachine { /// - /// A class representing the SqlVmGroup data model. + /// A class representing the SqlVirtualMachineGroup data model. /// A SQL virtual machine group. /// - public partial class SqlVmGroupData : TrackedResourceData + public partial class SqlVirtualMachineGroupData : TrackedResourceData { /// /// Keeps track of any properties unknown to the library. @@ -51,13 +51,13 @@ public partial class SqlVmGroupData : TrackedResourceData /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// The location. - public SqlVmGroupData(AzureLocation location) : base(location) + public SqlVirtualMachineGroupData(AzureLocation location) : base(location) { } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -70,9 +70,9 @@ public SqlVmGroupData(AzureLocation location) : base(location) /// 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. + /// 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) + internal SqlVirtualMachineGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string provisioningState, string sqlImageOffer, SqlVmGroupImageSku? sqlImageSku, ScaleType? scaleType, ClusterManagerType? clusterManagerType, ClusterConfiguration? clusterConfiguration, WsfcDomainProfile wsfcDomainProfile, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { ProvisioningState = provisioningState; SqlImageOffer = sqlImageOffer; @@ -80,12 +80,12 @@ internal SqlVmGroupData(ResourceIdentifier id, string name, ResourceType resourc ScaleType = scaleType; ClusterManagerType = clusterManagerType; ClusterConfiguration = clusterConfiguration; - WindowsServerFailoverClusterDomainProfile = windowsServerFailoverClusterDomainProfile; + WsfcDomainProfile = wsfcDomainProfile; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SqlVmGroupData() + /// Initializes a new instance of for deserialization. + internal SqlVirtualMachineGroupData() { } @@ -96,12 +96,12 @@ internal SqlVmGroupData() /// SQL image sku. public SqlVmGroupImageSku? SqlImageSku { get; set; } /// Scale type. - public SqlVmGroupScaleType? ScaleType { get; } + public ScaleType? 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; } + public ClusterManagerType? ClusterManagerType { get; } /// Cluster type. - public SqlVmClusterConfiguration? ClusterConfiguration { get; } + public ClusterConfiguration? ClusterConfiguration { get; } /// Cluster Active Directory domain profile. - public WindowsServerFailoverClusterDomainProfile WindowsServerFailoverClusterDomainProfile { get; set; } + public WsfcDomainProfile WsfcDomainProfile { get; set; } } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupResource.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupResource.Serialization.cs new file mode 100644 index 000000000000..4b7779fb1baf --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + public partial class SqlVirtualMachineGroupResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SqlVirtualMachineGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlVirtualMachineContext.Default); + + SqlVirtualMachineGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlVirtualMachineContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupResource.cs similarity index 69% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupResource.cs index e5dfc8efed83..03b5a8ad556d 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineGroupResource.cs @@ -19,57 +19,52 @@ 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 SqlVirtualMachineGroup 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 GetSqlVirtualMachineGroupResource method. + /// Otherwise you can get one from its parent resource using the GetSqlVirtualMachineGroup method. /// - public partial class SqlVmGroupResource : ArmResource + public partial class SqlVirtualMachineGroupResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. - /// The sqlVmGroupName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmGroupName) + /// The sqlVirtualMachineGroupName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineGroupName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVmGroupName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _sqlVmGroupSqlVmGroupsClientDiagnostics; - private readonly SqlVirtualMachineGroupsRestOperations _sqlVmGroupSqlVmGroupsRestClient; - private readonly ClientDiagnostics _sqlVmSqlVirtualMachinesClientDiagnostics; - private readonly SqlVirtualMachinesRestOperations _sqlVmSqlVirtualMachinesRestClient; - private readonly SqlVmGroupData _data; + private readonly ClientDiagnostics _sqlVirtualMachineGroupClientDiagnostics; + private readonly SqlVirtualMachineGroupsRestOperations _sqlVirtualMachineGroupRestClient; + private readonly SqlVirtualMachineGroupData _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. - protected SqlVmGroupResource() + /// Initializes a new instance of the class for mocking. + protected SqlVirtualMachineGroupResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the 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) + internal SqlVirtualMachineGroupResource(ArmClient client, SqlVirtualMachineGroupData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the 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) + internal SqlVirtualMachineGroupResource(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); + _sqlVirtualMachineGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sqlVirtualMachineGroupApiVersion); + _sqlVirtualMachineGroupRestClient = new SqlVirtualMachineGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlVirtualMachineGroupApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -80,7 +75,7 @@ internal SqlVmGroupResource(ArmClient client, ResourceIdentifier id) : base(clie /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual SqlVmGroupData Data + public virtual SqlVirtualMachineGroupData Data { get { @@ -96,7 +91,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) 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. + /// Gets a collection of AvailabilityGroupListenerResources in the SqlVirtualMachineGroup. /// An object representing collection of AvailabilityGroupListenerResources and their operations over a AvailabilityGroupListenerResource. public virtual AvailabilityGroupListenerCollection GetAvailabilityGroupListeners() { @@ -112,11 +107,11 @@ public virtual AvailabilityGroupListenerCollection GetAvailabilityGroupListeners /// /// /// Operation Id - /// AvailabilityGroupListeners_Get + /// AvailabilityGroupListener_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -144,11 +139,11 @@ public virtual async Task> GetAvaila /// /// /// Operation Id - /// AvailabilityGroupListeners_Get + /// AvailabilityGroupListener_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource @@ -176,29 +171,29 @@ public virtual Response GetAvailabilityGroupL /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Get"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.Get"); scope.Start(); try { - var response = await _sqlVmGroupSqlVmGroupsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _sqlVirtualMachineGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -216,29 +211,29 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Get"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.Get"); scope.Start(); try { - var response = _sqlVmGroupSqlVmGroupsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _sqlVirtualMachineGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SqlVmGroupResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -256,15 +251,15 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Operation Id - /// SqlVirtualMachineGroups_Delete + /// SqlVirtualMachineGroup_Delete /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -272,12 +267,12 @@ public virtual Response Get(CancellationToken cancellationTo /// The cancellation token to use. public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Delete"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.Delete"); 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); + var response = await _sqlVirtualMachineGroupRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineGroupClientDiagnostics, Pipeline, _sqlVirtualMachineGroupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -298,15 +293,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// SqlVirtualMachineGroups_Delete + /// SqlVirtualMachineGroup_Delete /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -314,12 +309,12 @@ 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 = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Delete"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.Delete"); 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); + var response = _sqlVirtualMachineGroupRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineGroupClientDiagnostics, Pipeline, _sqlVirtualMachineGroupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -340,15 +335,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// SqlVirtualMachineGroups_Update + /// SqlVirtualMachineGroup_Update /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -356,16 +351,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// 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> UpdateAsync(WaitUntil waitUntil, SqlVirtualMachineGroupPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Update"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.Update"); 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); + var response = await _sqlVirtualMachineGroupRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new SqlVirtualMachineArmOperation(new SqlVirtualMachineGroupOperationSource(Client), _sqlVirtualMachineGroupClientDiagnostics, Pipeline, _sqlVirtualMachineGroupRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -386,15 +381,15 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Operation Id - /// SqlVirtualMachineGroups_Update + /// SqlVirtualMachineGroup_Update /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -402,16 +397,16 @@ public virtual async Task> UpdateAsync(WaitUnti /// 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 Update(WaitUntil waitUntil, SqlVirtualMachineGroupPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.Update"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.Update"); 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); + var response = _sqlVirtualMachineGroupRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new SqlVirtualMachineArmOperation(new SqlVirtualMachineGroupOperationSource(Client), _sqlVirtualMachineGroupClientDiagnostics, Pipeline, _sqlVirtualMachineGroupRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -432,25 +427,25 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SqlV /// /// /// Operation Id - /// SqlVirtualMachines_ListBySqlVmGroup + /// SqlVirtualMachineGroups_ListBySqlVmGroup /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSqlVmsBySqlVmGroupAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetBySqlVmGroupAsync(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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVirtualMachineGroupRestClient.CreateListBySqlVmGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVirtualMachineGroupRestClient.CreateListBySqlVmGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlVirtualMachineResource(Client, SqlVirtualMachineData.DeserializeSqlVirtualMachineData(e)), _sqlVirtualMachineGroupClientDiagnostics, Pipeline, "SqlVirtualMachineGroupResource.GetBySqlVmGroup", "value", "nextLink", cancellationToken); } /// @@ -462,25 +457,25 @@ public virtual AsyncPageable GetSqlVmsBySqlVmGroupAsync(Cancellat /// /// /// Operation Id - /// SqlVirtualMachines_ListBySqlVmGroup + /// SqlVirtualMachineGroups_ListBySqlVmGroup /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSqlVmsBySqlVmGroup(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetBySqlVmGroup(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); + HttpMessage FirstPageRequest(int? pageSizeHint) => _sqlVirtualMachineGroupRestClient.CreateListBySqlVmGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlVirtualMachineGroupRestClient.CreateListBySqlVmGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlVirtualMachineResource(Client, SqlVirtualMachineData.DeserializeSqlVirtualMachineData(e)), _sqlVirtualMachineGroupClientDiagnostics, Pipeline, "SqlVirtualMachineGroupResource.GetBySqlVmGroup", "value", "nextLink", cancellationToken); } /// @@ -492,15 +487,15 @@ public virtual Pageable GetSqlVmsBySqlVmGroup(CancellationToken c /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -508,12 +503,12 @@ public virtual Pageable GetSqlVmsBySqlVmGroup(CancellationToken c /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.AddTag"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.AddTag"); scope.Start(); try { @@ -522,13 +517,13 @@ public virtual async Task> AddTagAsync(string key, var 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()); + var originalResponse = await _sqlVirtualMachineGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmGroupPatch(); + var patch = new SqlVirtualMachineGroupPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -554,15 +549,15 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -570,12 +565,12 @@ public virtual async Task> AddTagAsync(string key, /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.AddTag"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.AddTag"); scope.Start(); try { @@ -584,13 +579,13 @@ public virtual Response AddTag(string key, string value, Can var 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()); + var originalResponse = _sqlVirtualMachineGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmGroupPatch(); + var patch = new SqlVirtualMachineGroupPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -616,26 +611,26 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.SetTags"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.SetTags"); scope.Start(); try { @@ -645,13 +640,13 @@ public virtual async Task> SetTagsAsync(IDictionary var 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()); + var originalResponse = await _sqlVirtualMachineGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmGroupPatch(); + var patch = new SqlVirtualMachineGroupPatch(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -673,26 +668,26 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.SetTags"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.SetTags"); scope.Start(); try { @@ -702,13 +697,13 @@ public virtual Response SetTags(IDictionary var 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()); + var originalResponse = _sqlVirtualMachineGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmGroupPatch(); + var patch = new SqlVirtualMachineGroupPatch(); patch.Tags.ReplaceWith(tags); var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -730,26 +725,26 @@ public virtual Response SetTags(IDictionary /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.RemoveTag"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.RemoveTag"); scope.Start(); try { @@ -758,13 +753,13 @@ public virtual async Task> RemoveTagAsync(string ke var 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()); + var originalResponse = await _sqlVirtualMachineGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmGroupPatch(); + var patch = new SqlVirtualMachineGroupPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -790,26 +785,26 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Operation Id - /// SqlVirtualMachineGroups_Get + /// SqlVirtualMachineGroup_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _sqlVmGroupSqlVmGroupsClientDiagnostics.CreateScope("SqlVmGroupResource.RemoveTag"); + using var scope = _sqlVirtualMachineGroupClientDiagnostics.CreateScope("SqlVirtualMachineGroupResource.RemoveTag"); scope.Start(); try { @@ -818,13 +813,13 @@ public virtual Response RemoveTag(string key, CancellationTo var 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()); + var originalResponse = _sqlVirtualMachineGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SqlVirtualMachineGroupResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmGroupPatch(); + var patch = new SqlVirtualMachineGroupPatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineResource.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineResource.Serialization.cs new file mode 100644 index 000000000000..77a253f1ff84 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.SqlVirtualMachine +{ + public partial class SqlVirtualMachineResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SqlVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlVirtualMachineContext.Default); + + SqlVirtualMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlVirtualMachineContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineResource.cs similarity index 56% rename from sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs rename to sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineResource.cs index 1b32290f49c4..001bdf397753 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVirtualMachineResource.cs @@ -18,52 +18,52 @@ 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 SqlVirtualMachine 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 GetSqlVirtualMachineResource method. + /// Otherwise you can get one from its parent resource using the GetSqlVirtualMachine method. /// - public partial class SqlVmResource : ArmResource + public partial class SqlVirtualMachineResource : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. /// The subscriptionId. /// The resourceGroupName. - /// The sqlVmName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVmName) + /// The sqlVirtualMachineName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string sqlVirtualMachineName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVmName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _sqlVmSqlVirtualMachinesClientDiagnostics; - private readonly SqlVirtualMachinesRestOperations _sqlVmSqlVirtualMachinesRestClient; - private readonly SqlVmData _data; + private readonly ClientDiagnostics _sqlVirtualMachineClientDiagnostics; + private readonly SqlVirtualMachinesRestOperations _sqlVirtualMachineRestClient; + private readonly SqlVirtualMachineData _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. - protected SqlVmResource() + /// Initializes a new instance of the class for mocking. + protected SqlVirtualMachineResource() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the 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) + internal SqlVirtualMachineResource(ArmClient client, SqlVirtualMachineData data) : this(client, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// Initializes a new instance of the 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) + internal SqlVirtualMachineResource(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); + _sqlVirtualMachineClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SqlVirtualMachine", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sqlVirtualMachineApiVersion); + _sqlVirtualMachineRestClient = new SqlVirtualMachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlVirtualMachineApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -74,7 +74,7 @@ internal SqlVmResource(ArmClient client, ResourceIdentifier id) : base(client, i /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual SqlVmData Data + public virtual SqlVirtualMachineData Data { get { @@ -99,30 +99,30 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// 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 = null, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Get"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.Get"); scope.Start(); try { - var response = await _sqlVmSqlVirtualMachinesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken).ConfigureAwait(false); + var response = await _sqlVirtualMachineRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -140,30 +140,30 @@ public virtual async Task> GetAsync(string expand = null /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// 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 = null, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Get"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.Get"); scope.Start(); try { - var response = _sqlVmSqlVirtualMachinesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken); + var response = _sqlVirtualMachineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new SqlVmResource(Client, response.Value), response.GetRawResponse()); + return Response.FromValue(new SqlVirtualMachineResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -181,15 +181,15 @@ public virtual Response Get(string expand = null, CancellationTok /// /// /// Operation Id - /// SqlVirtualMachines_Delete + /// SqlVirtualMachine_Delete /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -197,12 +197,12 @@ 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 var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.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); + var response = await _sqlVirtualMachineRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -223,15 +223,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// SqlVirtualMachines_Delete + /// SqlVirtualMachine_Delete /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -239,12 +239,12 @@ 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 var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.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); + var response = _sqlVirtualMachineRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -257,7 +257,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel } /// - /// Updates a SQL virtual machine. + /// Updates SQL virtual machine tags. /// /// /// Request Path @@ -265,15 +265,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// SqlVirtualMachines_Update + /// SqlVirtualMachine_Update /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -281,16 +281,16 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// The SQL virtual machine. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlVmPatch patch, CancellationToken cancellationToken = default) + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SqlVirtualMachinePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Update"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.Update"); 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); + var response = await _sqlVirtualMachineRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new SqlVirtualMachineArmOperation(new SqlVirtualMachineOperationSource(Client), _sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -303,7 +303,7 @@ public virtual async Task> UpdateAsync(WaitUntil wai } /// - /// Updates a SQL virtual machine. + /// Updates SQL virtual machine tags. /// /// /// Request Path @@ -311,15 +311,15 @@ public virtual async Task> UpdateAsync(WaitUntil wai /// /// /// Operation Id - /// SqlVirtualMachines_Update + /// SqlVirtualMachine_Update /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -327,16 +327,16 @@ public virtual async Task> UpdateAsync(WaitUntil wai /// The SQL virtual machine. /// The cancellation token to use. /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmPatch patch, CancellationToken cancellationToken = default) + public virtual ArmOperation Update(WaitUntil waitUntil, SqlVirtualMachinePatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNull(patch, nameof(patch)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.Update"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.Update"); 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); + var response = _sqlVirtualMachineRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new SqlVirtualMachineArmOperation(new SqlVirtualMachineOperationSource(Client), _sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -349,7 +349,183 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmPatc } /// - /// Uninstalls and reinstalls the SQL Iaas Extension. + /// Starts SQL best practices Assessment on SQL virtual machine. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment + /// + /// + /// Operation Id + /// SqlVirtualMachines_StartAssessment + /// + /// + /// 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 cancellation token to use. + public virtual async Task StartAssessmentAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.StartAssessment"); + scope.Start(); + try + { + var response = await _sqlVirtualMachineRestClient.StartAssessmentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateStartAssessmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts SQL best practices Assessment on SQL virtual machine. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment + /// + /// + /// Operation Id + /// SqlVirtualMachines_StartAssessment + /// + /// + /// 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 cancellation token to use. + public virtual ArmOperation StartAssessment(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.StartAssessment"); + scope.Start(); + try + { + var response = _sqlVirtualMachineRestClient.StartAssessment(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateStartAssessmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/fetchDCAssessment + /// + /// + /// Operation Id + /// SqlVirtualMachines_FetchDCAssessment + /// + /// + /// 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. + /// Disk Config Assessment property. + /// The cancellation token to use. + /// is null. + public virtual async Task FetchDCAssessmentAsync(WaitUntil waitUntil, DiskConfigAssessmentContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.FetchDCAssessment"); + scope.Start(); + try + { + var response = await _sqlVirtualMachineRestClient.FetchDCAssessmentAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateFetchDCAssessmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts SQL best practices Assessment with Disk Config rules on SQL virtual machine + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/fetchDCAssessment + /// + /// + /// Operation Id + /// SqlVirtualMachines_FetchDCAssessment + /// + /// + /// 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. + /// Disk Config Assessment property. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation FetchDCAssessment(WaitUntil waitUntil, DiskConfigAssessmentContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.FetchDCAssessment"); + scope.Start(); + try + { + var response = _sqlVirtualMachineRestClient.FetchDCAssessment(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateFetchDCAssessmentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Uninstalls and reinstalls the SQL IaaS Extension. /// /// /// Request Path @@ -361,11 +537,11 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SqlVmPatc /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -373,12 +549,12 @@ 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 var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.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); + var response = await _sqlVirtualMachineRestClient.RedeployAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -391,7 +567,7 @@ public virtual async Task RedeployAsync(WaitUntil waitUntil, Cance } /// - /// Uninstalls and reinstalls the SQL Iaas Extension. + /// Uninstalls and reinstalls the SQL IaaS Extension. /// /// /// Request Path @@ -403,11 +579,11 @@ public virtual async Task RedeployAsync(WaitUntil waitUntil, Cance /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -415,12 +591,12 @@ 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 var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.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); + var response = _sqlVirtualMachineRestClient.Redeploy(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SqlVirtualMachineArmOperation(_sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -433,38 +609,42 @@ public virtual ArmOperation Redeploy(WaitUntil waitUntil, CancellationToken canc } /// - /// Starts Assessment on SQL virtual machine. + /// Starts SQL virtual machine troubleshooting. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/troubleshoot /// /// /// Operation Id - /// SqlVirtualMachines_StartAssessment + /// SqlVirtualMachines_Troubleshoot /// /// /// Default Api Version - /// 2022-02-01 + /// 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. - public virtual async Task StartAssessmentAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> TroubleshootAsync(WaitUntil waitUntil, SqlVmTroubleshooting sqlVmTroubleshooting, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.StartAssessment"); + Argument.AssertNotNull(sqlVmTroubleshooting, nameof(sqlVmTroubleshooting)); + + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.Troubleshoot"); 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); + var response = await _sqlVirtualMachineRestClient.TroubleshootAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sqlVmTroubleshooting, cancellationToken).ConfigureAwait(false); + var operation = new SqlVirtualMachineArmOperation(new SqlVmTroubleshootingOperationSource(), _sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateTroubleshootRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sqlVmTroubleshooting).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -475,38 +655,42 @@ public virtual async Task StartAssessmentAsync(WaitUntil waitUntil } /// - /// Starts Assessment on SQL virtual machine. + /// Starts SQL virtual machine troubleshooting. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/troubleshoot /// /// /// Operation Id - /// SqlVirtualMachines_StartAssessment + /// SqlVirtualMachines_Troubleshoot /// /// /// Default Api Version - /// 2022-02-01 + /// 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. - public virtual ArmOperation StartAssessment(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation Troubleshoot(WaitUntil waitUntil, SqlVmTroubleshooting sqlVmTroubleshooting, CancellationToken cancellationToken = default) { - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.StartAssessment"); + Argument.AssertNotNull(sqlVmTroubleshooting, nameof(sqlVmTroubleshooting)); + + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.Troubleshoot"); 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); + var response = _sqlVirtualMachineRestClient.Troubleshoot(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sqlVmTroubleshooting, cancellationToken); + var operation = new SqlVirtualMachineArmOperation(new SqlVmTroubleshootingOperationSource(), _sqlVirtualMachineClientDiagnostics, Pipeline, _sqlVirtualMachineRestClient.CreateTroubleshootRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, sqlVmTroubleshooting).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -525,15 +709,15 @@ public virtual ArmOperation StartAssessment(WaitUntil waitUntil, CancellationTok /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -541,12 +725,12 @@ public virtual ArmOperation StartAssessment(WaitUntil waitUntil, CancellationTok /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.AddTag"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.AddTag"); scope.Start(); try { @@ -555,13 +739,13 @@ public virtual async Task> AddTagAsync(string key, strin var 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()); + var originalResponse = await _sqlVirtualMachineRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SqlVirtualMachineResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmPatch(); + var patch = new SqlVirtualMachinePatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -587,15 +771,15 @@ public virtual async Task> AddTagAsync(string key, strin /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// @@ -603,12 +787,12 @@ public virtual async Task> AddTagAsync(string key, strin /// The value for the tag. /// The cancellation token to use. /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); Argument.AssertNotNull(value, nameof(value)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.AddTag"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.AddTag"); scope.Start(); try { @@ -617,13 +801,13 @@ public virtual Response AddTag(string key, string value, Cancella var 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()); + var originalResponse = _sqlVirtualMachineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); + return Response.FromValue(new SqlVirtualMachineResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmPatch(); + var patch = new SqlVirtualMachinePatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -649,26 +833,26 @@ public virtual Response AddTag(string key, string value, Cancella /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.SetTags"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.SetTags"); scope.Start(); try { @@ -678,13 +862,13 @@ public virtual async Task> SetTagsAsync(IDictionary> SetTagsAsync(IDictionary /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The set of tags to use as replacement. /// The cancellation token to use. /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { Argument.AssertNotNull(tags, nameof(tags)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.SetTags"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.SetTags"); scope.Start(); try { @@ -735,13 +919,13 @@ public virtual Response SetTags(IDictionary tags, var 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()); + var originalResponse = _sqlVirtualMachineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); + return Response.FromValue(new SqlVirtualMachineResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmPatch(); + var patch = new SqlVirtualMachinePatch(); patch.Tags.ReplaceWith(tags); var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); return Response.FromValue(result.Value, result.GetRawResponse()); @@ -763,26 +947,26 @@ public virtual Response SetTags(IDictionary tags, /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.RemoveTag"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.RemoveTag"); scope.Start(); try { @@ -791,13 +975,13 @@ public virtual async Task> RemoveTagAsync(string key, Ca var 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()); + var originalResponse = await _sqlVirtualMachineRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SqlVirtualMachineResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new SqlVmPatch(); + var patch = new SqlVirtualMachinePatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -823,26 +1007,26 @@ public virtual async Task> RemoveTagAsync(string key, Ca /// /// /// Operation Id - /// SqlVirtualMachines_Get + /// SqlVirtualMachine_Get /// /// /// Default Api Version - /// 2022-02-01 + /// 2023-10-01 /// /// /// Resource - /// + /// /// /// /// /// The key for the tag. /// The cancellation token to use. /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNull(key, nameof(key)); - using var scope = _sqlVmSqlVirtualMachinesClientDiagnostics.CreateScope("SqlVmResource.RemoveTag"); + using var scope = _sqlVirtualMachineClientDiagnostics.CreateScope("SqlVirtualMachineResource.RemoveTag"); scope.Start(); try { @@ -851,13 +1035,13 @@ public virtual Response RemoveTag(string key, CancellationToken c var 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()); + var originalResponse = _sqlVirtualMachineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, null, cancellationToken); + return Response.FromValue(new SqlVirtualMachineResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); } else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new SqlVmPatch(); + var patch = new SqlVirtualMachinePatch(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs deleted file mode 100644 index c8f8255d3282..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.SqlVirtualMachine -{ - public partial class SqlVmGroupResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - SqlVmGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlVirtualMachineContext.Default); - - SqlVmGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlVirtualMachineContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs deleted file mode 100644 index 59ce8ed52211..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; - -namespace Azure.ResourceManager.SqlVirtualMachine -{ - public partial class SqlVmResource : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - - SqlVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlVirtualMachineContext.Default); - - SqlVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlVirtualMachineContext.Default); - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); - } -} diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/autorest.md b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/autorest.md deleted file mode 100644 index 6f0687d12b23..000000000000 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/autorest.md +++ /dev/null @@ -1,115 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml - -azure-arm: true -csharp: true -library-name: SqlVirtualMachine -namespace: Azure.ResourceManager.SqlVirtualMachine -require: https://github.com/Azure/azure-rest-api-specs/blob/bab2f4389eb5ca73cdf366ec0a4af3f3eb6e1f6d/specification/sqlvirtualmachine/resource-manager/readme.md -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../samples/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - '*ResourceId': 'arm-id' - 'IPAddress': 'ip-address' - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - ADD: Add - NEW: New - ALL: All - NO: No - SQL: Sql - Db: DB - SqlVirtualMachine: SqlVm - Wsfc: WindowsServerFailoverCluster - -rename-mapping: - LoadBalancerConfiguration: AvailabilityGroupListenerLoadBalancerConfiguration - PrivateIPAddress: AvailabilityGroupListenerPrivateIPAddress - AgConfiguration: AvailabilityGroupConfiguration - AgReplica: AvailabilityGroupReplica - AgReplica.sqlVirtualMachineInstanceId: -|arm-id - Commit: AvailabilityGroupReplicaCommitMode - Failover: AvailabilityGroupReplicaFailoverMode - Role: AvailabilityGroupReplicaRole - AutoBackupSettings.backupSystemDbs: AreSystemDbsIncludedInBackup - AutoBackupSettings.enableEncryption: IsEncryptionEnabled - DayOfWeek: SqlVmAutoPatchingDayOfWeek - ConnectivityType: SqlServerConnectivityType - FullBackupFrequencyType: SqlVmFullBackupFrequency - ScaleType: SqlVmGroupScaleType - Schedule: SqlVmAssessmentSchedule - SQLInstanceSettings.maxServerMemoryMB: MaxServerMemoryInMB - SQLInstanceSettings.minServerMemoryMB: MinServerMemoryInMB - ReadableSecondary: ReadableSecondaryMode - AutoBackupSettings: SqlVmAutoBackupSettings - AutoBackupSettings.fullBackupStartTime: FullBackupStartHour - AutoBackupSettings.retentionPeriod: RetentionPeriodInDays - AutoPatchingSettings: SqlVmAutoPatchingSettings - AutoPatchingSettings.maintenanceWindowDuration: MaintenanceWindowDurationInMinutes - BackupScheduleType: SqVmBackupScheduleType - ClusterConfiguration: SqlVmClusterConfiguration - AssessmentSettings: SqlVmAssessmentSettings - AssessmentDayOfWeek: SqlVmAssessmentDayOfWeek - ClusterManagerType: SqlVmClusterManagerType - ClusterSubnetType: SqlVmClusterSubnetType - StorageConfigurationSettings: SqlVmStorageConfigurationSettings - StorageConfigurationSettings.sqlSystemDbOnDataDisk: IsSqlSystemDBOnDataDisk - KeyVaultCredentialSettings: SqlVmKeyVaultCredentialSettings - ServerConfigurationsManagementSettings: SqlServerConfigurationsManagementSettings - DiskConfigurationType: SqlVmDiskConfigurationType - StorageWorkloadType: SqlVmStorageWorkloadType - AutoBackupDaysOfWeek: SqlVmAutoBackupDayOfWeek - SqlVirtualMachine.properties.wsfcStaticIp: -|ip-address - SqlStorageSettings.luns: LogicalUnitNumbers - SQLTempDbSettings.luns: LogicalUnitNumbers - WsfcDomainProfile.ouPath: OrganizationalUnitPath - -override-operation-name: - SqlVirtualMachines_ListBySqlVmGroup: GetSqlVmsBySqlVmGroup -directive: - - from: sqlvm.json - where: $.definitions..enable - transform: > - $['x-ms-client-name'] = 'IsEnabled'; - - from: sqlvm.json - where: $.definitions.LoadBalancerConfiguration.properties.sqlVirtualMachineInstances.items - transform: > - $['x-ms-format'] = 'arm-id'; -``` 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..aeba3d945c45 --- /dev/null +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/sqlvirtualmachine/SqlVirtualMachine.Management +commit: bebc0652e51c9b4164b8d2a9133ea4f9a2545838 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..4e749e6b85b1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -12,6 +12,8 @@ trigger: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/