From 0861442dd30df0fc06444fa89e90d4981ad349e3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 20 Jan 2023 11:30:34 +0000 Subject: [PATCH] CodeGen from PR 22207 in Azure/azure-rest-api-specs Merge 22ea1cc0bc6535141ae9d8a6f5aa622a015c20d8 into 2d9846d81852452cf10270b18329ac382a881bf7 --- .../ResourceGroupResourceExtensionClient.cs | 7 - .../SubscriptionResourceExtensionClient.cs | 116 +--- .../Extensions/WorkloadsExtensions.cs | 225 +----- .../PhpWorkloadResourceOperationSource.cs | 40 -- ...ordPressInstanceResourceOperationSource.cs | 40 -- .../Models/ApplicationProvisioningState.cs | 66 -- ...onServerFullResourceNames.Serialization.cs | 67 ++ .../ApplicationServerFullResourceNames.cs | 36 + .../ApplicationServerVirtualMachineType.cs | 54 ++ ...plicationServerVmDetails.Serialization.cs} | 40 +- .../Models/ApplicationServerVmDetails.cs | 41 ++ .../Generated/Models/AzureFrontDoorEnabled.cs | 51 -- .../Models/BackupProfile.Serialization.cs | 48 -- .../src/Generated/Models/BackupProfile.cs | 36 - .../Models/CacheProfile.Serialization.cs | 75 -- .../src/Generated/Models/CacheProfile.cs | 56 -- ...alServerFullResourceNames.Serialization.cs | 83 +++ .../Models/CentralServerFullResourceNames.cs | 40 ++ .../CentralServerVmDetails.Serialization.cs | 20 +- .../Models/CentralServerVmDetails.cs | 11 +- .../src/Generated/Models/ConfigurationType.cs | 54 ++ ...untFileShareConfiguration.Serialization.cs | 59 ++ .../CreateAndMountFileShareConfiguration.cs | 35 + ...roviderInstanceProperties.Serialization.cs | 34 +- .../Models/DB2ProviderInstanceProperties.cs | 10 +- .../DatabaseConfiguration.Serialization.cs | 18 +- .../Generated/Models/DatabaseConfiguration.cs | 17 +- .../Models/DatabaseProfile.Serialization.cs | 177 ----- .../src/Generated/Models/DatabaseProfile.cs | 84 --- ...seServerFullResourceNames.Serialization.cs | 83 +++ .../Models/DatabaseServerFullResourceNames.cs | 40 ++ .../Models/DatabaseTier.Serialization.cs | 30 - .../src/Generated/Models/DatabaseTier.cs | 20 - .../src/Generated/Models/DatabaseType.cs | 48 -- .../Models/DatabaseVmDetails.Serialization.cs | 20 +- .../src/Generated/Models/DatabaseVmDetails.cs | 11 +- .../Models/DeploymentConfiguration.cs | 4 +- .../Models/DeploymentWithOSConfiguration.cs | 4 +- .../Models/DiskConfiguration.Serialization.cs | 57 ++ .../src/Generated/Models/DiskConfiguration.cs | 32 + .../Models/DiskDetails.Serialization.cs | 95 +++ .../src/Generated/Models/DiskDetails.cs | 58 ++ .../Models/DiskInfo.Serialization.cs | 53 -- .../src/Generated/Models/DiskInfo.cs | 34 - .../Generated/Models/DiskSku.Serialization.cs | 45 ++ .../src/Generated/Models/DiskSku.cs | 28 + .../src/Generated/Models/DiskSkuName.cs | 66 ++ .../Models/DiskStorageType.Serialization.cs | 30 - .../src/Generated/Models/DiskStorageType.cs | 20 - .../DiskVolumeConfiguration.Serialization.cs | 77 +++ .../Models/DiskVolumeConfiguration.cs | 47 ++ .../src/Generated/Models/EnableBackup.cs | 51 -- .../Generated/Models/EnableSslEnforcement.cs | 51 -- .../EnqueueReplicationServerProperties.cs | 26 +- .../Models/EnqueueServerProperties.cs | 18 +- ...tionSoftwareConfiguration.Serialization.cs | 48 ++ ...ternalInstallationSoftwareConfiguration.cs | 31 + .../FileShareConfiguration.Serialization.cs | 37 + .../Models/FileShareConfiguration.cs | 32 + .../Generated/Models/FileShareStorageType.cs | 57 -- .../src/Generated/Models/FileShareType.cs | 51 -- .../Models/FileshareProfile.Serialization.cs | 78 --- .../src/Generated/Models/FileshareProfile.cs | 50 -- .../Models/GatewayServerProperties.cs | 8 +- .../src/Generated/Models/HAEnabled.cs | 51 -- ...roviderInstanceProperties.Serialization.cs | 43 +- .../HanaDBProviderInstanceProperties.cs | 16 +- .../Models/InfrastructureConfiguration.cs | 4 +- ...LoadBalancerResourceNames.Serialization.cs | 119 ++++ .../Models/LoadBalancerResourceNames.cs | 46 ++ .../src/Generated/Models/LoadBalancerType.cs | 51 -- .../src/Generated/Models/LocationType.cs | 51 -- .../Models/MessageServerProperties.cs | 30 +- ...untFileShareConfiguration.Serialization.cs | 53 ++ .../Models/MountFileShareConfiguration.cs | 46 ++ ...roviderInstanceProperties.Serialization.cs | 34 +- .../MsSqlServerProviderInstanceProperties.cs | 10 +- .../src/Generated/Models/NamingPatternType.cs | 48 ++ .../Generated/Models/NetworkConfiguration.cs | 6 +- ...orkInterfaceResourceNames.Serialization.cs | 40 ++ .../Models/NetworkInterfaceResourceNames.cs | 28 + .../Models/NetworkProfile.Serialization.cs | 152 ----- .../src/Generated/Models/NetworkProfile.cs | 70 -- .../Models/NodeProfile.Serialization.cs | 107 --- .../src/Generated/Models/NodeProfile.cs | 65 -- .../src/Generated/Models/OSImageOffer.cs | 48 -- .../Models/OSImageProfile.Serialization.cs | 93 --- .../src/Generated/Models/OSImageProfile.cs | 40 -- .../src/Generated/Models/OSImagePublisher.cs | 48 -- .../src/Generated/Models/OSImageSku.cs | 46 -- .../src/Generated/Models/OSImageVersion.cs | 48 -- ...sourceRequestBodyIdentity.Serialization.cs | 66 -- .../PatchResourceRequestBodyIdentity.cs | 29 - .../Models/PhpProfile.Serialization.cs | 37 - .../src/Generated/Models/PhpProfile.cs | 23 - .../src/Generated/Models/PhpVersion.cs | 47 -- .../Models/PhpWorkloadProvisioningState.cs | 69 -- .../PhpWorkloadResourceData.Serialization.cs | 370 ---------- ...pWorkloadResourceIdentity.Serialization.cs | 66 -- .../Models/PhpWorkloadResourceIdentity.cs | 29 - .../Models/PhpWorkloadResourceList.cs | 37 - .../PhpWorkloadResourcePatch.Serialization.cs | 37 - .../Models/PhpWorkloadResourcePatch.cs | 27 - ...roviderInstanceProperties.Serialization.cs | 34 +- ...heusHAClusterProviderInstanceProperties.cs | 10 +- ...roviderInstanceProperties.Serialization.cs | 45 +- .../PrometheusOSProviderInstanceProperties.cs | 14 +- .../src/Generated/Models/RedisCacheFamily.cs | 51 -- .../Models/RestrictionInfo.Serialization.cs | 56 -- .../src/Generated/Models/RestrictionInfo.cs | 37 - ...icationServerInstanceData.Serialization.cs | 25 +- .../SapApplicationServerInstanceList.cs | 6 +- .../Models/SapCentralInstanceList.cs | 6 +- ...CentralServerInstanceData.Serialization.cs | 14 +- .../SapDatabaseInstanceData.Serialization.cs | 14 +- .../src/Generated/Models/SapDeploymentType.cs | 2 +- .../SapDiskConfiguration.Serialization.cs | 56 +- .../Generated/Models/SapDiskConfiguration.cs | 44 +- ...pDiskConfigurationsResult.Serialization.cs | 14 +- .../Models/SapDiskConfigurationsResult.cs | 12 +- .../src/Generated/Models/SapHealthState.cs | 2 +- ... SapLandscapeMonitorData.Serialization.cs} | 67 +- ...ndscapeMonitorListResult.Serialization.cs} | 12 +- .../Models/SapLandscapeMonitorListResult.cs | 37 + ...peMonitorMetricThresholds.Serialization.cs | 88 +++ .../SapLandscapeMonitorMetricThresholds.cs | 40 ++ ...MonitorPropertiesGrouping.Serialization.cs | 82 +++ .../SapLandscapeMonitorPropertiesGrouping.cs | 37 + .../SapLandscapeMonitorProvisioningState.cs | 60 ++ ...andscapeMonitorSidMapping.Serialization.cs | 67 ++ .../Models/SapLandscapeMonitorSidMapping.cs | 36 + .../Models/SapMonitorData.Serialization.cs | 35 +- .../Models/SapMonitorPatch.Serialization.cs | 5 + .../src/Generated/Models/SapMonitorPatch.cs | 6 +- ...roviderInstanceProperties.Serialization.cs | 32 +- .../SapNetWeaverProviderInstanceProperties.cs | 12 +- .../SapProviderInstanceData.Serialization.cs | 18 +- .../Models/SapSizingRecommendationResult.cs | 4 +- .../Models/SapSoftwareInstallationType.cs | 3 + .../Models/SapVirtualInstanceList.cs | 6 +- .../Models/SapVirtualInstanceState.cs | 6 + .../Models/SapVirtualInstanceStatus.cs | 3 + .../Models/SearchProfile.Serialization.cs | 115 ---- .../src/Generated/Models/SearchProfile.cs | 48 -- .../src/Generated/Models/SearchType.cs | 48 -- ...haredStorageResourceNames.Serialization.cs | 51 ++ .../Models/SharedStorageResourceNames.cs | 32 + ...SingleServerConfiguration.Serialization.cs | 34 +- .../Models/SingleServerConfiguration.cs | 34 +- ...ServerCustomResourceNames.Serialization.cs | 35 + .../Models/SingleServerCustomResourceNames.cs | 32 + ...leServerFullResourceNames.Serialization.cs | 53 ++ .../Models/SingleServerFullResourceNames.cs | 31 + .../SingleServerRecommendationResult.cs | 2 +- .../Models/SiteProfile.Serialization.cs | 40 -- .../src/Generated/Models/SiteProfile.cs | 28 - ...kipFileShareConfiguration.Serialization.cs | 37 + .../Models/SkipFileShareConfiguration.cs | 26 + .../Models/SkuCapability.Serialization.cs | 35 - .../src/Generated/Models/SkuCapability.cs | 32 - .../Generated/Models/SkuCost.Serialization.cs | 46 -- .../src/Generated/Models/SkuCost.cs | 36 - .../Models/SkuDefinition.Serialization.cs | 152 ----- .../src/Generated/Models/SkuDefinition.cs | 115 ---- .../SkuLocationAndZones.Serialization.cs | 94 --- .../Generated/Models/SkuLocationAndZones.cs | 50 -- .../src/Generated/Models/SkuRestriction.cs | 44 -- .../Models/SkuRestrictionReasonCode.cs | 54 -- .../Generated/Models/SkuRestrictionType.cs | 54 -- .../Models/SkuZoneDetail.Serialization.cs | 56 -- .../src/Generated/Models/SkuZoneDetail.cs | 37 - .../Models/SkusListResult.Serialization.cs | 46 -- .../src/Generated/Models/SkusListResult.cs | 36 - .../SoftwareConfiguration.Serialization.cs | 1 + .../Generated/Models/SoftwareConfiguration.cs | 2 +- .../src/Generated/Models/SslPreference.cs | 54 ++ .../src/Generated/Models/StopContent.cs | 21 - ...zation.cs => StopRequest.Serialization.cs} | 8 +- .../src/Generated/Models/StopRequest.cs | 21 + .../StorageConfiguration.Serialization.cs | 45 ++ .../Generated/Models/StorageConfiguration.cs | 36 + .../ThreeTierConfiguration.Serialization.cs | 34 +- .../Models/ThreeTierConfiguration.cs | 41 +- ...eeTierCustomResourceNames.Serialization.cs | 35 + .../Models/ThreeTierCustomResourceNames.cs | 32 + ...hreeTierFullResourceNames.Serialization.cs | 101 +++ .../Models/ThreeTierFullResourceNames.cs | 43 ++ .../Models/ThreeTierRecommendationResult.cs | 2 +- ...ownFileShareConfiguration.Serialization.cs | 37 + .../Models/UnknownFileShareConfiguration.cs | 20 + .../UnknownInfrastructureConfiguration.cs | 2 +- .../UnknownSapSizingRecommendationResult.cs | 2 +- ...ServerCustomResourceNames.Serialization.cs | 37 + .../UnknownSingleServerCustomResourceNames.cs | 20 + ...eeTierCustomResourceNames.Serialization.cs | 37 + .../UnknownThreeTierCustomResourceNames.cs | 20 + .../Models/UserProfile.Serialization.cs | 45 -- .../src/Generated/Models/UserProfile.cs | 34 - ...rtualMachineResourceNames.Serialization.cs | 126 ++++ .../Models/VirtualMachineResourceNames.cs | 49 ++ .../Models/VmssNodesProfile.Serialization.cs | 139 ---- .../src/Generated/Models/VmssNodesProfile.cs | 49 -- ...PressInstanceResourceList.Serialization.cs | 47 -- .../Models/WordPressInstanceResourceList.cs | 37 - .../src/Generated/Models/WordPressVersion.cs | 48 -- .../src/Generated/Models/WorkloadKind.cs | 48 -- .../Models/WorkloadsSku.Serialization.cs | 91 --- .../src/Generated/Models/WorkloadsSku.cs | 52 -- .../Models/WorkloadsSkuTier.Serialization.cs | 32 - .../src/Generated/Models/WorkloadsSkuTier.cs | 22 - .../src/Generated/PhpWorkloadResource.cs | 611 ----------------- .../PhpWorkloadResourceCollection.cs | 341 ---------- .../src/Generated/PhpWorkloadResourceData.cs | 140 ---- .../RestOperations/MonitorsRestOperations.cs | 6 +- .../PhpWorkloadsRestOperations.cs | 644 ------------------ .../ProviderInstancesRestOperations.cs | 2 +- ...pplicationServerInstancesRestOperations.cs | 237 ++++++- .../SAPCentralInstancesRestOperations.cs | 237 ++++++- .../SAPDatabaseInstancesRestOperations.cs | 237 ++++++- .../SAPVirtualInstancesRestOperations.cs | 96 +-- ...s => SapLandscapeMonitorRestOperations.cs} | 279 ++++---- .../RestOperations/SkusRestOperations.cs | 175 ----- .../RestOperations/WorkloadsRestOperations.cs | 18 +- .../SapApplicationServerInstanceCollection.cs | 28 +- .../SapApplicationServerInstanceData.cs | 62 +- .../SapApplicationServerInstanceResource.cs | 154 ++++- .../SapCentralServerInstanceCollection.cs | 28 +- .../Generated/SapCentralServerInstanceData.cs | 53 +- .../SapCentralServerInstanceResource.cs | 154 ++++- .../SapDatabaseInstanceCollection.cs | 28 +- .../src/Generated/SapDatabaseInstanceData.cs | 37 +- .../Generated/SapDatabaseInstanceResource.cs | 154 ++++- .../src/Generated/SapLandscapeMonitorData.cs | 46 ++ .../Generated/SapLandscapeMonitorResource.cs | 365 ++++++++++ .../src/Generated/SapMonitorData.cs | 14 +- .../src/Generated/SapMonitorResource.cs | 15 +- .../src/Generated/SapProviderInstanceData.cs | 6 +- .../Generated/SapProviderInstanceResource.cs | 4 +- .../Generated/SapVirtualInstanceCollection.cs | 28 +- .../src/Generated/SapVirtualInstanceData.cs | 14 +- .../Generated/SapVirtualInstanceResource.cs | 64 +- .../Generated/WordPressInstanceResource.cs | 297 -------- .../WordPressInstanceResourceData.cs | 53 -- .../src/autorest.md | 2 +- 244 files changed, 5772 insertions(+), 8268 deletions(-) delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/LongRunningOperation/PhpWorkloadResourceOperationSource.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/LongRunningOperation/WordPressInstanceResourceOperationSource.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationProvisioningState.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerFullResourceNames.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVirtualMachineType.cs rename sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/{SkuRestriction.Serialization.cs => ApplicationServerVmDetails.Serialization.cs} (51%) create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVmDetails.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/AzureFrontDoorEnabled.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/BackupProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/BackupProfile.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CacheProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CacheProfile.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerFullResourceNames.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ConfigurationType.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CreateAndMountFileShareConfiguration.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseProfile.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseServerFullResourceNames.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseTier.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseTier.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseType.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskConfiguration.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskConfiguration.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskDetails.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskDetails.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskInfo.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskInfo.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSku.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSku.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSkuName.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskStorageType.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskStorageType.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskVolumeConfiguration.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnableBackup.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnableSslEnforcement.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareConfiguration.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareConfiguration.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareStorageType.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareType.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileshareProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileshareProfile.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HAEnabled.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerResourceNames.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerType.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LocationType.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MountFileShareConfiguration.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MountFileShareConfiguration.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NamingPatternType.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkInterfaceResourceNames.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkProfile.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NodeProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NodeProfile.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageOffer.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageProfile.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImagePublisher.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageSku.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageVersion.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PatchResourceRequestBodyIdentity.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PatchResourceRequestBodyIdentity.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpProfile.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpVersion.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadProvisioningState.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceData.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceIdentity.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceIdentity.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceList.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourcePatch.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourcePatch.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RedisCacheFamily.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RestrictionInfo.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RestrictionInfo.cs rename sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/{WordPressInstanceResourceData.Serialization.cs => SapLandscapeMonitorData.Serialization.cs} (61%) rename sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/{PhpWorkloadResourceList.Serialization.cs => SapLandscapeMonitorListResult.Serialization.cs} (68%) create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorListResult.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorMetricThresholds.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorMetricThresholds.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorPropertiesGrouping.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorPropertiesGrouping.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorProvisioningState.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorSidMapping.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorSidMapping.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchProfile.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchType.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SharedStorageResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SharedStorageResourceNames.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerCustomResourceNames.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerFullResourceNames.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SiteProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SiteProfile.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkipFileShareConfiguration.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCapability.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCapability.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCost.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCost.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuDefinition.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuDefinition.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuLocationAndZones.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuLocationAndZones.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestriction.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestrictionReasonCode.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestrictionType.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuZoneDetail.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuZoneDetail.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkusListResult.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkusListResult.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SslPreference.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopContent.cs rename sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/{StopContent.Serialization.cs => StopRequest.Serialization.cs} (62%) create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopRequest.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StorageConfiguration.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StorageConfiguration.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierCustomResourceNames.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierFullResourceNames.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownFileShareConfiguration.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UserProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UserProfile.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VirtualMachineResourceNames.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VmssNodesProfile.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VmssNodesProfile.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceList.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceList.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressVersion.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadKind.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSku.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSku.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSkuTier.Serialization.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSkuTier.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResource.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResourceCollection.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResourceData.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/PhpWorkloadsRestOperations.cs rename sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/{WordpressInstancesRestOperations.cs => SapLandscapeMonitorRestOperations.cs} (58%) delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SkusRestOperations.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorData.cs create mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorResource.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/WordPressInstanceResource.cs delete mode 100644 sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/WordPressInstanceResourceData.cs diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs index eeb225a59a768..2a4a6b730ed1f 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs @@ -31,13 +31,6 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// Gets a collection of PhpWorkloadResources in the ResourceGroupResource. - /// An object representing collection of PhpWorkloadResources and their operations over a PhpWorkloadResource. - public virtual PhpWorkloadResourceCollection GetPhpWorkloadResources() - { - return GetCachedClient(Client => new PhpWorkloadResourceCollection(Client, Id)); - } - /// Gets a collection of SapVirtualInstanceResources in the ResourceGroupResource. /// An object representing collection of SapVirtualInstanceResources and their operations over a SapVirtualInstanceResource. public virtual SapVirtualInstanceCollection GetSapVirtualInstances() diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index b2ec8183ffde0..7e46495371d8b 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -19,16 +19,12 @@ namespace Azure.ResourceManager.Workloads /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { - private ClientDiagnostics _phpWorkloadResourcePhpWorkloadsClientDiagnostics; - private PhpWorkloadsRestOperations _phpWorkloadResourcePhpWorkloadsRestClient; private ClientDiagnostics _defaultClientDiagnostics; private WorkloadsRestOperations _defaultRestClient; private ClientDiagnostics _sapVirtualInstanceSapVirtualInstancesClientDiagnostics; private SAPVirtualInstancesRestOperations _sapVirtualInstanceSapVirtualInstancesRestClient; private ClientDiagnostics _sapMonitormonitorsClientDiagnostics; private MonitorsRestOperations _sapMonitormonitorsRestClient; - private ClientDiagnostics _skusClientDiagnostics; - private SkusRestOperations _skusRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -42,16 +38,12 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics PhpWorkloadResourcePhpWorkloadsClientDiagnostics => _phpWorkloadResourcePhpWorkloadsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Workloads", PhpWorkloadResource.ResourceType.Namespace, Diagnostics); - private PhpWorkloadsRestOperations PhpWorkloadResourcePhpWorkloadsRestClient => _phpWorkloadResourcePhpWorkloadsRestClient ??= new PhpWorkloadsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PhpWorkloadResource.ResourceType)); private ClientDiagnostics DefaultClientDiagnostics => _defaultClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Workloads", ProviderConstants.DefaultProviderNamespace, Diagnostics); private WorkloadsRestOperations DefaultRestClient => _defaultRestClient ??= new WorkloadsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics SapVirtualInstanceSAPVirtualInstancesClientDiagnostics => _sapVirtualInstanceSapVirtualInstancesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Workloads", SapVirtualInstanceResource.ResourceType.Namespace, Diagnostics); private SAPVirtualInstancesRestOperations SapVirtualInstanceSAPVirtualInstancesRestClient => _sapVirtualInstanceSapVirtualInstancesRestClient ??= new SAPVirtualInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SapVirtualInstanceResource.ResourceType)); private ClientDiagnostics SapMonitormonitorsClientDiagnostics => _sapMonitormonitorsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Workloads", SapMonitorResource.ResourceType.Namespace, Diagnostics); private MonitorsRestOperations SapMonitormonitorsRestClient => _sapMonitormonitorsRestClient ??= new MonitorsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SapMonitorResource.ResourceType)); - private ClientDiagnostics SkusClientDiagnostics => _skusClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Workloads", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private SkusRestOperations SkusRestClient => _skusRestClient ??= new SkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -60,51 +52,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Lists PHP workload resources for a subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/phpWorkloads - /// - /// - /// Operation Id - /// PhpWorkloads_ListBySubscription - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetPhpWorkloadResourcesAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => PhpWorkloadResourcePhpWorkloadsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PhpWorkloadResourcePhpWorkloadsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PhpWorkloadResource(Client, PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(e)), PhpWorkloadResourcePhpWorkloadsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetPhpWorkloadResources", "value", "nextLink", cancellationToken); - } - - /// - /// Lists PHP workload resources for a subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/phpWorkloads - /// - /// - /// Operation Id - /// PhpWorkloads_ListBySubscription - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetPhpWorkloadResources(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => PhpWorkloadResourcePhpWorkloadsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PhpWorkloadResourcePhpWorkloadsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PhpWorkloadResource(Client, PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(e)), PhpWorkloadResourcePhpWorkloadsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetPhpWorkloadResources", "value", "nextLink", cancellationToken); - } - - /// - /// Get SAP sizing recommendations. + /// Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier /// /// /// Request Path @@ -136,7 +84,7 @@ public virtual async Task> SapSizingReco } /// - /// Get SAP sizing recommendations. + /// Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier /// /// /// Request Path @@ -168,7 +116,7 @@ public virtual Response SapSizingRecommendations( } /// - /// Get SAP supported SKUs. + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. /// /// /// Request Path @@ -200,7 +148,7 @@ public virtual async Task> SapSupported } /// - /// Get SAP supported SKUs. + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. /// /// /// Request Path @@ -232,7 +180,7 @@ public virtual Response SapSupportedSku(AzureLoc } /// - /// Get SAP Disk Configurations. + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. /// /// /// Request Path @@ -264,7 +212,7 @@ public virtual async Task> SapDiskConfigur } /// - /// Get SAP Disk Configurations. + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. /// /// /// Request Path @@ -296,7 +244,7 @@ public virtual Response SapDiskConfigurations(Azure } /// - /// Get SAP Availability Zone Details. + /// Get the recommended SAP Availability Zone Pair Details for your region. /// /// /// Request Path @@ -328,7 +276,7 @@ public virtual async Task> SapAvailab } /// - /// Get SAP Availability Zone Details. + /// Get the recommended SAP Availability Zone Pair Details for your region. /// /// /// Request Path @@ -360,7 +308,7 @@ public virtual Response SapAvailabilityZoneDet } /// - /// Gets all Virtual Instances for SAP in the subscription. + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. /// /// /// Request Path @@ -382,7 +330,7 @@ public virtual AsyncPageable GetSapVirtualInstancesA } /// - /// Gets all Virtual Instances for SAP in the subscription. + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. /// /// /// Request Path @@ -446,49 +394,5 @@ public virtual Pageable GetSapMonitors(CancellationToken can HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SapMonitormonitorsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SapMonitorResource(Client, SapMonitorData.DeserializeSapMonitorData(e)), SapMonitormonitorsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetSapMonitors", "value", "nextLink", cancellationToken); } - - /// - /// Lists all the available SKUs under this PR - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/skus - /// - /// - /// Operation Id - /// Skus_List - /// - /// - /// - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSkusAsync(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, SkuDefinition.DeserializeSkuDefinition, SkusClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetSkus", "value", "nextLink", cancellationToken); - } - - /// - /// Lists all the available SKUs under this PR - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/skus - /// - /// - /// Operation Id - /// Skus_List - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSkus(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => SkusRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, SkuDefinition.DeserializeSkuDefinition, SkusClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetSkus", "value", "nextLink", cancellationToken); - } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/WorkloadsExtensions.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/WorkloadsExtensions.cs index 54407f0725227..c7689c6b5b8de 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/WorkloadsExtensions.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Extensions/WorkloadsExtensions.cs @@ -29,49 +29,7 @@ private static SubscriptionResourceExtensionClient GetExtensionClient(Subscripti } /// - /// Lists PHP workload resources for a subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/phpWorkloads - /// - /// - /// Operation Id - /// PhpWorkloads_ListBySubscription - /// - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetPhpWorkloadResourcesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - return GetExtensionClient(subscriptionResource).GetPhpWorkloadResourcesAsync(cancellationToken); - } - - /// - /// Lists PHP workload resources for a subscription. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/phpWorkloads - /// - /// - /// Operation Id - /// PhpWorkloads_ListBySubscription - /// - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetPhpWorkloadResources(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - return GetExtensionClient(subscriptionResource).GetPhpWorkloadResources(cancellationToken); - } - - /// - /// Get SAP sizing recommendations. + /// Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier /// /// /// Request Path @@ -93,7 +51,7 @@ public static async Task> SapSizingRecom } /// - /// Get SAP sizing recommendations. + /// Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier /// /// /// Request Path @@ -115,7 +73,7 @@ public static Response SapSizingRecommendations(t } /// - /// Get SAP supported SKUs. + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. /// /// /// Request Path @@ -137,7 +95,7 @@ public static async Task> SapSupportedS } /// - /// Get SAP supported SKUs. + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. /// /// /// Request Path @@ -159,7 +117,7 @@ public static Response SapSupportedSku(this Subs } /// - /// Get SAP Disk Configurations. + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. /// /// /// Request Path @@ -181,7 +139,7 @@ public static async Task> SapDiskConfigura } /// - /// Get SAP Disk Configurations. + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. /// /// /// Request Path @@ -203,7 +161,7 @@ public static Response SapDiskConfigurations(this S } /// - /// Get SAP Availability Zone Details. + /// Get the recommended SAP Availability Zone Pair Details for your region. /// /// /// Request Path @@ -225,7 +183,7 @@ public static async Task> SapAvailabi } /// - /// Get SAP Availability Zone Details. + /// Get the recommended SAP Availability Zone Pair Details for your region. /// /// /// Request Path @@ -247,7 +205,7 @@ public static Response SapAvailabilityZoneDeta } /// - /// Gets all Virtual Instances for SAP in the subscription. + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. /// /// /// Request Path @@ -268,7 +226,7 @@ public static AsyncPageable GetSapVirtualInstancesAs } /// - /// Gets all Virtual Instances for SAP in the subscription. + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. /// /// /// Request Path @@ -330,48 +288,6 @@ public static Pageable GetSapMonitors(this SubscriptionResou return GetExtensionClient(subscriptionResource).GetSapMonitors(cancellationToken); } - /// - /// Lists all the available SKUs under this PR - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/skus - /// - /// - /// Operation Id - /// Skus_List - /// - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetSkusAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - return GetExtensionClient(subscriptionResource).GetSkusAsync(cancellationToken); - } - - /// - /// Lists all the available SKUs under this PR - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Workloads/skus - /// - /// - /// Operation Id - /// Skus_List - /// - /// - /// - /// The instance the method will execute against. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetSkus(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) - { - return GetExtensionClient(subscriptionResource).GetSkus(cancellationToken); - } - private static ResourceGroupResourceExtensionClient GetExtensionClient(ResourceGroupResource resourceGroupResource) { return resourceGroupResource.GetCachedClient((client) => @@ -381,62 +297,6 @@ private static ResourceGroupResourceExtensionClient GetExtensionClient(ResourceG ); } - /// Gets a collection of PhpWorkloadResources in the ResourceGroupResource. - /// The instance the method will execute against. - /// An object representing collection of PhpWorkloadResources and their operations over a PhpWorkloadResource. - public static PhpWorkloadResourceCollection GetPhpWorkloadResources(this ResourceGroupResource resourceGroupResource) - { - return GetExtensionClient(resourceGroupResource).GetPhpWorkloadResources(); - } - - /// - /// Gets the PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// The instance the method will execute against. - /// Php workload name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static async Task> GetPhpWorkloadResourceAsync(this ResourceGroupResource resourceGroupResource, string phpWorkloadName, CancellationToken cancellationToken = default) - { - return await resourceGroupResource.GetPhpWorkloadResources().GetAsync(phpWorkloadName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// The instance the method will execute against. - /// Php workload name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public static Response GetPhpWorkloadResource(this ResourceGroupResource resourceGroupResource, string phpWorkloadName, CancellationToken cancellationToken = default) - { - return resourceGroupResource.GetPhpWorkloadResources().Get(phpWorkloadName, cancellationToken); - } - /// Gets a collection of SapVirtualInstanceResources in the ResourceGroupResource. /// The instance the method will execute against. /// An object representing collection of SapVirtualInstanceResources and their operations over a SapVirtualInstanceResource. @@ -446,7 +306,7 @@ public static SapVirtualInstanceCollection GetSapVirtualInstances(this ResourceG } /// - /// Gets an Virtual Instance for SAP. + /// Gets a Virtual Instance for SAP solutions resource /// /// /// Request Path @@ -459,7 +319,7 @@ public static SapVirtualInstanceCollection GetSapVirtualInstances(this ResourceG /// /// /// The instance the method will execute against. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -470,7 +330,7 @@ public static async Task> GetSapVirtualInst } /// - /// Gets an Virtual Instance for SAP. + /// Gets a Virtual Instance for SAP solutions resource /// /// /// Request Path @@ -483,7 +343,7 @@ public static async Task> GetSapVirtualInst /// /// /// The instance the method will execute against. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -549,44 +409,6 @@ public static Response GetSapMonitor(this ResourceGroupResou return resourceGroupResource.GetSapMonitors().Get(monitorName, cancellationToken); } - #region PhpWorkloadResource - /// - /// 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 instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static PhpWorkloadResource GetPhpWorkloadResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - PhpWorkloadResource.ValidateResourceId(id); - return new PhpWorkloadResource(client, id); - } - ); - } - #endregion - - #region WordPressInstanceResource - /// - /// 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 instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static WordPressInstanceResource GetWordPressInstanceResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - WordPressInstanceResource.ValidateResourceId(id); - return new WordPressInstanceResource(client, id); - } - ); - } - #endregion - #region SapVirtualInstanceResource /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. @@ -700,5 +522,24 @@ public static SapProviderInstanceResource GetSapProviderInstanceResource(this Ar ); } #endregion + + #region SapLandscapeMonitorResource + /// + /// 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 instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static SapLandscapeMonitorResource GetSapLandscapeMonitorResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + SapLandscapeMonitorResource.ValidateResourceId(id); + return new SapLandscapeMonitorResource(client, id); + } + ); + } + #endregion } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/LongRunningOperation/PhpWorkloadResourceOperationSource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/LongRunningOperation/PhpWorkloadResourceOperationSource.cs deleted file mode 100644 index e93f7e992a3a4..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/LongRunningOperation/PhpWorkloadResourceOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.Workloads -{ - internal class PhpWorkloadResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal PhpWorkloadResourceOperationSource(ArmClient client) - { - _client = client; - } - - PhpWorkloadResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(document.RootElement); - return new PhpWorkloadResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(document.RootElement); - return new PhpWorkloadResource(_client, data); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/LongRunningOperation/WordPressInstanceResourceOperationSource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/LongRunningOperation/WordPressInstanceResourceOperationSource.cs deleted file mode 100644 index 53d090cb6adca..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/LongRunningOperation/WordPressInstanceResourceOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.Workloads -{ - internal class WordPressInstanceResourceOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal WordPressInstanceResourceOperationSource(ArmClient client) - { - _client = client; - } - - WordPressInstanceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = WordPressInstanceResourceData.DeserializeWordPressInstanceResourceData(document.RootElement); - return new WordPressInstanceResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = WordPressInstanceResourceData.DeserializeWordPressInstanceResourceData(document.RootElement); - return new WordPressInstanceResource(_client, data); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationProvisioningState.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationProvisioningState.cs deleted file mode 100644 index 3594358eea7eb..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationProvisioningState.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.Workloads.Models -{ - /// WordPress instance provisioning state. - public readonly partial struct ApplicationProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ApplicationProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotSpecifiedValue = "NotSpecified"; - private const string AcceptedValue = "Accepted"; - private const string CreatedValue = "Created"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - private const string InstallingValue = "Installing"; - - /// NotSpecified. - public static ApplicationProvisioningState NotSpecified { get; } = new ApplicationProvisioningState(NotSpecifiedValue); - /// Accepted. - public static ApplicationProvisioningState Accepted { get; } = new ApplicationProvisioningState(AcceptedValue); - /// Created. - public static ApplicationProvisioningState Created { get; } = new ApplicationProvisioningState(CreatedValue); - /// Succeeded. - public static ApplicationProvisioningState Succeeded { get; } = new ApplicationProvisioningState(SucceededValue); - /// Failed. - public static ApplicationProvisioningState Failed { get; } = new ApplicationProvisioningState(FailedValue); - /// Canceled. - public static ApplicationProvisioningState Canceled { get; } = new ApplicationProvisioningState(CanceledValue); - /// Installing. - public static ApplicationProvisioningState Installing { get; } = new ApplicationProvisioningState(InstallingValue); - /// Determines if two values are the same. - public static bool operator ==(ApplicationProvisioningState left, ApplicationProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ApplicationProvisioningState left, ApplicationProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ApplicationProvisioningState(string value) => new ApplicationProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ApplicationProvisioningState other && Equals(other); - /// - public bool Equals(ApplicationProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs new file mode 100644 index 0000000000000..767e1ba51994c --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerFullResourceNames.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class ApplicationServerFullResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"); + writer.WriteStringValue(AvailabilitySetName); + } + writer.WriteEndObject(); + } + + internal static ApplicationServerFullResourceNames DeserializeApplicationServerFullResourceNames(JsonElement element) + { + Optional> virtualMachines = default; + Optional availabilitySetName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName")) + { + availabilitySetName = property.Value.GetString(); + continue; + } + } + return new ApplicationServerFullResourceNames(Optional.ToList(virtualMachines), availabilitySetName.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerFullResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerFullResourceNames.cs new file mode 100644 index 0000000000000..7c28cc6b6430d --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerFullResourceNames.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + public partial class ApplicationServerFullResourceNames + { + /// Initializes a new instance of ApplicationServerFullResourceNames. + public ApplicationServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApplicationServerFullResourceNames. + /// The list of virtual machine naming details. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. + internal ApplicationServerFullResourceNames(IList virtualMachines, string availabilitySetName) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + } + + /// The list of virtual machine naming details. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-App-AvSet. + public string AvailabilitySetName { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVirtualMachineType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVirtualMachineType.cs new file mode 100644 index 0000000000000..933d90067e8dd --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVirtualMachineType.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.Workloads.Models +{ + /// Defines the type of application server VM. + public readonly partial struct ApplicationServerVirtualMachineType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApplicationServerVirtualMachineType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string StandbyValue = "Standby"; + private const string UnknownValue = "Unknown"; + + /// Active. + public static ApplicationServerVirtualMachineType Active { get; } = new ApplicationServerVirtualMachineType(ActiveValue); + /// Standby. + public static ApplicationServerVirtualMachineType Standby { get; } = new ApplicationServerVirtualMachineType(StandbyValue); + /// Unknown. + public static ApplicationServerVirtualMachineType Unknown { get; } = new ApplicationServerVirtualMachineType(UnknownValue); + /// Determines if two values are the same. + public static bool operator ==(ApplicationServerVirtualMachineType left, ApplicationServerVirtualMachineType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApplicationServerVirtualMachineType left, ApplicationServerVirtualMachineType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ApplicationServerVirtualMachineType(string value) => new ApplicationServerVirtualMachineType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApplicationServerVirtualMachineType other && Equals(other); + /// + public bool Equals(ApplicationServerVirtualMachineType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestriction.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs similarity index 51% rename from sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestriction.Serialization.cs rename to sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs index a992a0e51ce8b..a74dc8d8815fd 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestriction.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVmDetails.Serialization.cs @@ -8,17 +8,17 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Workloads.Models { - public partial class SkuRestriction + public partial class ApplicationServerVmDetails { - internal static SkuRestriction DeserializeSkuRestriction(JsonElement element) + internal static ApplicationServerVmDetails DeserializeApplicationServerVmDetails(JsonElement element) { - Optional type = default; - Optional> values = default; - Optional restrictionInfo = default; - Optional reasonCode = default; + Optional type = default; + Optional virtualMachineId = default; + Optional> storageDetails = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) @@ -28,46 +28,36 @@ internal static SkuRestriction DeserializeSkuRestriction(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - type = new SkuRestrictionType(property.Value.GetString()); + type = new ApplicationServerVirtualMachineType(property.Value.GetString()); continue; } - if (property.NameEquals("values")) + if (property.NameEquals("virtualMachineId")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - values = array; + virtualMachineId = new ResourceIdentifier(property.Value.GetString()); continue; } - if (property.NameEquals("restrictionInfo")) + if (property.NameEquals("storageDetails")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - restrictionInfo = RestrictionInfo.DeserializeRestrictionInfo(property.Value); - continue; - } - if (property.NameEquals("reasonCode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) { - property.ThrowNonNullablePropertyIsNull(); - continue; + array.Add(JsonSerializer.Deserialize(item.GetRawText())); } - reasonCode = new SkuRestrictionReasonCode(property.Value.GetString()); + storageDetails = array; continue; } } - return new SkuRestriction(Optional.ToNullable(type), Optional.ToList(values), restrictionInfo.Value, Optional.ToNullable(reasonCode)); + return new ApplicationServerVmDetails(Optional.ToNullable(type), virtualMachineId.Value, Optional.ToList(storageDetails)); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVmDetails.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVmDetails.cs new file mode 100644 index 0000000000000..ea2ffb286cc6c --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ApplicationServerVmDetails.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The Application Server VM Details. + public partial class ApplicationServerVmDetails + { + /// Initializes a new instance of ApplicationServerVmDetails. + internal ApplicationServerVmDetails() + { + StorageDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of ApplicationServerVmDetails. + /// Defines the type of application server VM. + /// + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + internal ApplicationServerVmDetails(ApplicationServerVirtualMachineType? virtualMachineType, ResourceIdentifier virtualMachineId, IReadOnlyList storageDetails) + { + VirtualMachineType = virtualMachineType; + VirtualMachineId = virtualMachineId; + StorageDetails = storageDetails; + } + + /// Defines the type of application server VM. + public ApplicationServerVirtualMachineType? VirtualMachineType { get; } + /// Gets the virtual machine id. + public ResourceIdentifier VirtualMachineId { get; } + /// Storage details of all the Storage Accounts attached to the App Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/AzureFrontDoorEnabled.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/AzureFrontDoorEnabled.cs deleted file mode 100644 index 8c57900fa49ca..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/AzureFrontDoorEnabled.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.Workloads.Models -{ - /// Whether to enable Azure front door. - public readonly partial struct AzureFrontDoorEnabled : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AzureFrontDoorEnabled(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static AzureFrontDoorEnabled Enabled { get; } = new AzureFrontDoorEnabled(EnabledValue); - /// Disabled. - public static AzureFrontDoorEnabled Disabled { get; } = new AzureFrontDoorEnabled(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(AzureFrontDoorEnabled left, AzureFrontDoorEnabled right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AzureFrontDoorEnabled left, AzureFrontDoorEnabled right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AzureFrontDoorEnabled(string value) => new AzureFrontDoorEnabled(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AzureFrontDoorEnabled other && Equals(other); - /// - public bool Equals(AzureFrontDoorEnabled other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/BackupProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/BackupProfile.Serialization.cs deleted file mode 100644 index 68e877ef83336..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/BackupProfile.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class BackupProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("backupEnabled"); - writer.WriteStringValue(BackupEnabled.ToString()); - writer.WriteEndObject(); - } - - internal static BackupProfile DeserializeBackupProfile(JsonElement element) - { - EnableBackup backupEnabled = default; - Optional vaultResourceId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("backupEnabled")) - { - backupEnabled = new EnableBackup(property.Value.GetString()); - continue; - } - if (property.NameEquals("vaultResourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - vaultResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - } - return new BackupProfile(backupEnabled, vaultResourceId.Value); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/BackupProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/BackupProfile.cs deleted file mode 100644 index f246570eca36c..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/BackupProfile.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Backup profile. - public partial class BackupProfile - { - /// Initializes a new instance of BackupProfile. - /// Whether to enable Azure backup for the workload. - public BackupProfile(EnableBackup backupEnabled) - { - BackupEnabled = backupEnabled; - } - - /// Initializes a new instance of BackupProfile. - /// Whether to enable Azure backup for the workload. - /// Backup vault resource Id. - internal BackupProfile(EnableBackup backupEnabled, ResourceIdentifier vaultResourceId) - { - BackupEnabled = backupEnabled; - VaultResourceId = vaultResourceId; - } - - /// Whether to enable Azure backup for the workload. - public EnableBackup BackupEnabled { get; set; } - /// Backup vault resource Id. - public ResourceIdentifier VaultResourceId { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CacheProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CacheProfile.Serialization.cs deleted file mode 100644 index 7e65432fdeb0e..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CacheProfile.Serialization.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class CacheProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("skuName"); - writer.WriteStringValue(SkuName); - writer.WritePropertyName("family"); - writer.WriteStringValue(Family.ToString()); - writer.WritePropertyName("capacity"); - writer.WriteNumberValue(Capacity); - writer.WriteEndObject(); - } - - internal static CacheProfile DeserializeCacheProfile(JsonElement element) - { - Optional name = default; - string skuName = default; - RedisCacheFamily family = default; - long capacity = default; - Optional cacheResourceId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("skuName")) - { - skuName = property.Value.GetString(); - continue; - } - if (property.NameEquals("family")) - { - family = new RedisCacheFamily(property.Value.GetString()); - continue; - } - if (property.NameEquals("capacity")) - { - capacity = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("cacheResourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - cacheResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - } - return new CacheProfile(name.Value, skuName, family, capacity, cacheResourceId.Value); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CacheProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CacheProfile.cs deleted file mode 100644 index 4acc32ed768f6..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CacheProfile.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Cache profile. - public partial class CacheProfile - { - /// Initializes a new instance of CacheProfile. - /// Cache SKU name. - /// Cache family. - /// Cache capacity. - /// is null. - public CacheProfile(string skuName, RedisCacheFamily family, long capacity) - { - Argument.AssertNotNull(skuName, nameof(skuName)); - - SkuName = skuName; - Family = family; - Capacity = capacity; - } - - /// Initializes a new instance of CacheProfile. - /// Cache name. - /// Cache SKU name. - /// Cache family. - /// Cache capacity. - /// Cache resource Id. - internal CacheProfile(string name, string skuName, RedisCacheFamily family, long capacity, ResourceIdentifier cacheResourceId) - { - Name = name; - SkuName = skuName; - Family = family; - Capacity = capacity; - CacheResourceId = cacheResourceId; - } - - /// Cache name. - public string Name { get; set; } - /// Cache SKU name. - public string SkuName { get; set; } - /// Cache family. - public RedisCacheFamily Family { get; set; } - /// Cache capacity. - public long Capacity { get; set; } - /// Cache resource Id. - public ResourceIdentifier CacheResourceId { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs new file mode 100644 index 0000000000000..38674c6f164ab --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerFullResourceNames.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class CentralServerFullResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"); + writer.WriteStringValue(AvailabilitySetName); + } + if (Optional.IsDefined(LoadBalancer)) + { + writer.WritePropertyName("loadBalancer"); + writer.WriteObjectValue(LoadBalancer); + } + writer.WriteEndObject(); + } + + internal static CentralServerFullResourceNames DeserializeCentralServerFullResourceNames(JsonElement element) + { + Optional> virtualMachines = default; + Optional availabilitySetName = default; + Optional loadBalancer = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName")) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancer")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + loadBalancer = LoadBalancerResourceNames.DeserializeLoadBalancerResourceNames(property.Value); + continue; + } + } + return new CentralServerFullResourceNames(Optional.ToList(virtualMachines), availabilitySetName.Value, loadBalancer.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerFullResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerFullResourceNames.cs new file mode 100644 index 0000000000000..2714ee5158a25 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerFullResourceNames.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The full resource names object for central server layer resources. + public partial class CentralServerFullResourceNames + { + /// Initializes a new instance of CentralServerFullResourceNames. + public CentralServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of CentralServerFullResourceNames. + /// The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this layer: ASCS and ERS. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. + /// The resource names object for load balancer and related resources. + internal CentralServerFullResourceNames(IList virtualMachines, string availabilitySetName, LoadBalancerResourceNames loadBalancer) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + LoadBalancer = loadBalancer; + } + + /// The list of names for all ASCS virtual machines to be deployed. The number of entries in this list should be equal to the number VMs to be created for ASCS layer. At maximum, there can be two virtual machines at this layer: ASCS and ERS. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-ASCS-AvSet. + public string AvailabilitySetName { get; set; } + /// The resource names object for load balancer and related resources. + public LoadBalancerResourceNames LoadBalancer { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerVmDetails.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerVmDetails.Serialization.cs index 858621499798c..495a032ce58ac 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerVmDetails.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerVmDetails.Serialization.cs @@ -5,8 +5,10 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Workloads.Models { @@ -16,6 +18,7 @@ internal static CentralServerVmDetails DeserializeCentralServerVmDetails(JsonEle { Optional type = default; Optional virtualMachineId = default; + Optional> storageDetails = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("type")) @@ -38,8 +41,23 @@ internal static CentralServerVmDetails DeserializeCentralServerVmDetails(JsonEle virtualMachineId = new ResourceIdentifier(property.Value.GetString()); continue; } + if (property.NameEquals("storageDetails")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } } - return new CentralServerVmDetails(Optional.ToNullable(type), virtualMachineId.Value); + return new CentralServerVmDetails(Optional.ToNullable(type), virtualMachineId.Value, Optional.ToList(storageDetails)); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerVmDetails.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerVmDetails.cs index 204f9cfc4a910..ac98e8cee702b 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerVmDetails.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CentralServerVmDetails.cs @@ -5,30 +5,37 @@ #nullable disable +using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Workloads.Models { - /// The Central Server VM Details. + /// The SAP Central Services Instance VM details. public partial class CentralServerVmDetails { /// Initializes a new instance of CentralServerVmDetails. internal CentralServerVmDetails() { + StorageDetails = new ChangeTrackingList(); } /// Initializes a new instance of CentralServerVmDetails. /// Defines the type of central server VM. /// - internal CentralServerVmDetails(CentralServerVirtualMachineType? virtualMachineType, ResourceIdentifier virtualMachineId) + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + internal CentralServerVmDetails(CentralServerVirtualMachineType? virtualMachineType, ResourceIdentifier virtualMachineId, IReadOnlyList storageDetails) { VirtualMachineType = virtualMachineType; VirtualMachineId = virtualMachineId; + StorageDetails = storageDetails; } /// Defines the type of central server VM. public CentralServerVirtualMachineType? VirtualMachineType { get; } /// Gets the virtual machine id. public ResourceIdentifier VirtualMachineId { get; } + /// Storage details of all the Storage Accounts attached to the ASCS Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ConfigurationType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ConfigurationType.cs new file mode 100644 index 0000000000000..f0631a014cf99 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ConfigurationType.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.Workloads.Models +{ + /// The type of file share config. + internal readonly partial struct ConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SkipValue = "Skip"; + private const string CreateAndMountValue = "CreateAndMount"; + private const string MountValue = "Mount"; + + /// Skip. + public static ConfigurationType Skip { get; } = new ConfigurationType(SkipValue); + /// CreateAndMount. + public static ConfigurationType CreateAndMount { get; } = new ConfigurationType(CreateAndMountValue); + /// Mount. + public static ConfigurationType Mount { get; } = new ConfigurationType(MountValue); + /// Determines if two values are the same. + public static bool operator ==(ConfigurationType left, ConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ConfigurationType left, ConfigurationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ConfigurationType(string value) => new ConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ConfigurationType other && Equals(other); + /// + public bool Equals(ConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs new file mode 100644 index 0000000000000..570170c3aa01f --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CreateAndMountFileShareConfiguration.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class CreateAndMountFileShareConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceGroup)) + { + writer.WritePropertyName("resourceGroup"); + writer.WriteStringValue(ResourceGroup); + } + if (Optional.IsDefined(StorageAccountName)) + { + writer.WritePropertyName("storageAccountName"); + writer.WriteStringValue(StorageAccountName); + } + writer.WritePropertyName("configurationType"); + writer.WriteStringValue(ConfigurationType.ToString()); + writer.WriteEndObject(); + } + + internal static CreateAndMountFileShareConfiguration DeserializeCreateAndMountFileShareConfiguration(JsonElement element) + { + Optional resourceGroup = default; + Optional storageAccountName = default; + ConfigurationType configurationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceGroup")) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountName")) + { + storageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType")) + { + configurationType = new ConfigurationType(property.Value.GetString()); + continue; + } + } + return new CreateAndMountFileShareConfiguration(configurationType, resourceGroup.Value, storageAccountName.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CreateAndMountFileShareConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CreateAndMountFileShareConfiguration.cs new file mode 100644 index 0000000000000..ca818d9845452 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/CreateAndMountFileShareConfiguration.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// Gets or sets the file share configuration for file share created with the VIS case. + public partial class CreateAndMountFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of CreateAndMountFileShareConfiguration. + public CreateAndMountFileShareConfiguration() + { + ConfigurationType = ConfigurationType.CreateAndMount; + } + + /// Initializes a new instance of CreateAndMountFileShareConfiguration. + /// The type of file share config. + /// The name of file share resource group. The app rg is used in case of missing input. + /// The name of file share storage account name . A custom name is used in case of missing input. + internal CreateAndMountFileShareConfiguration(ConfigurationType configurationType, string resourceGroup, string storageAccountName) : base(configurationType) + { + ResourceGroup = resourceGroup; + StorageAccountName = storageAccountName; + ConfigurationType = configurationType; + } + + /// The name of file share resource group. The app rg is used in case of missing input. + public string ResourceGroup { get; set; } + /// The name of file share storage account name . A custom name is used in case of missing input. + public string StorageAccountName { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DB2ProviderInstanceProperties.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DB2ProviderInstanceProperties.Serialization.cs index 672ae27c8a952..229a7423d7cad 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DB2ProviderInstanceProperties.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DB2ProviderInstanceProperties.Serialization.cs @@ -51,6 +51,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("sapSid"); writer.WriteStringValue(SapSid); } + if (Optional.IsDefined(SslPreference)) + { + writer.WritePropertyName("sslPreference"); + writer.WriteStringValue(SslPreference.Value.ToString()); + } + if (Optional.IsDefined(SslCertificateUri)) + { + writer.WritePropertyName("sslCertificateUri"); + writer.WriteStringValue(SslCertificateUri.AbsoluteUri); + } writer.WritePropertyName("providerType"); writer.WriteStringValue(ProviderType); writer.WriteEndObject(); @@ -65,6 +75,8 @@ internal static DB2ProviderInstanceProperties DeserializeDB2ProviderInstanceProp Optional dbPassword = default; Optional dbPasswordUri = default; Optional sapSid = default; + Optional sslPreference = default; + Optional sslCertificateUri = default; string providerType = default; foreach (var property in element.EnumerateObject()) { @@ -108,13 +120,33 @@ internal static DB2ProviderInstanceProperties DeserializeDB2ProviderInstanceProp sapSid = property.Value.GetString(); continue; } + if (property.NameEquals("sslPreference")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sslPreference = new SslPreference(property.Value.GetString()); + continue; + } + if (property.NameEquals("sslCertificateUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sslCertificateUri = null; + continue; + } + sslCertificateUri = new Uri(property.Value.GetString()); + continue; + } if (property.NameEquals("providerType")) { providerType = property.Value.GetString(); continue; } } - return new DB2ProviderInstanceProperties(providerType, hostname.Value, dbName.Value, dbPort.Value, dbUsername.Value, dbPassword.Value, dbPasswordUri.Value, sapSid.Value); + return new DB2ProviderInstanceProperties(providerType, hostname.Value, dbName.Value, dbPort.Value, dbUsername.Value, dbPassword.Value, dbPasswordUri.Value, sapSid.Value, Optional.ToNullable(sslPreference), sslCertificateUri.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DB2ProviderInstanceProperties.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DB2ProviderInstanceProperties.cs index c8eddc4f237ca..fea11cbec060d 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DB2ProviderInstanceProperties.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DB2ProviderInstanceProperties.cs @@ -27,7 +27,9 @@ public DB2ProviderInstanceProperties() /// Gets or sets the db2 database password. /// Gets or sets the key vault URI to secret with the database password. /// Gets or sets the SAP System Identifier. - internal DB2ProviderInstanceProperties(string providerType, string hostname, string dbName, string dbPort, string dbUsername, string dbPassword, Uri dbPasswordUri, string sapSid) : base(providerType) + /// Gets or sets certificate preference if secure communication is enabled. + /// Gets or sets the blob URI to SSL certificate for the DB2 Database. + internal DB2ProviderInstanceProperties(string providerType, string hostname, string dbName, string dbPort, string dbUsername, string dbPassword, Uri dbPasswordUri, string sapSid, SslPreference? sslPreference, Uri sslCertificateUri) : base(providerType) { Hostname = hostname; DBName = dbName; @@ -36,6 +38,8 @@ internal DB2ProviderInstanceProperties(string providerType, string hostname, str DBPassword = dbPassword; DBPasswordUri = dbPasswordUri; SapSid = sapSid; + SslPreference = sslPreference; + SslCertificateUri = sslCertificateUri; ProviderType = providerType ?? "Db2"; } @@ -53,5 +57,9 @@ internal DB2ProviderInstanceProperties(string providerType, string hostname, str public Uri DBPasswordUri { get; set; } /// Gets or sets the SAP System Identifier. public string SapSid { get; set; } + /// Gets or sets certificate preference if secure communication is enabled. + public SslPreference? SslPreference { get; set; } + /// Gets or sets the blob URI to SSL certificate for the DB2 Database. + public Uri SslCertificateUri { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseConfiguration.Serialization.cs index d0a7924bf1509..d8decdbbf0142 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseConfiguration.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseConfiguration.Serialization.cs @@ -26,6 +26,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteObjectValue(VirtualMachineConfiguration); writer.WritePropertyName("instanceCount"); writer.WriteNumberValue(InstanceCount); + if (Optional.IsDefined(DiskConfiguration)) + { + writer.WritePropertyName("diskConfiguration"); + writer.WriteObjectValue(DiskConfiguration); + } writer.WriteEndObject(); } @@ -35,6 +40,7 @@ internal static DatabaseConfiguration DeserializeDatabaseConfiguration(JsonEleme ResourceIdentifier subnetId = default; VirtualMachineConfiguration virtualMachineConfiguration = default; long instanceCount = default; + Optional diskConfiguration = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("databaseType")) @@ -62,8 +68,18 @@ internal static DatabaseConfiguration DeserializeDatabaseConfiguration(JsonEleme instanceCount = property.Value.GetInt64(); continue; } + if (property.NameEquals("diskConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + diskConfiguration = DiskConfiguration.DeserializeDiskConfiguration(property.Value); + continue; + } } - return new DatabaseConfiguration(Optional.ToNullable(databaseType), subnetId, virtualMachineConfiguration, instanceCount); + return new DatabaseConfiguration(Optional.ToNullable(databaseType), subnetId, virtualMachineConfiguration, instanceCount, diskConfiguration.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseConfiguration.cs index bb124fce63254..4af5ae6277f94 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseConfiguration.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseConfiguration.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using Azure.Core; namespace Azure.ResourceManager.Workloads.Models @@ -33,12 +34,14 @@ public DatabaseConfiguration(ResourceIdentifier subnetId, VirtualMachineConfigur /// The subnet id. /// Gets or sets the virtual machine configuration. /// The number of database VMs. - internal DatabaseConfiguration(SapDatabaseType? databaseType, ResourceIdentifier subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount) + /// Gets or sets the disk configuration. + internal DatabaseConfiguration(SapDatabaseType? databaseType, ResourceIdentifier subnetId, VirtualMachineConfiguration virtualMachineConfiguration, long instanceCount, DiskConfiguration diskConfiguration) { DatabaseType = databaseType; SubnetId = subnetId; VirtualMachineConfiguration = virtualMachineConfiguration; InstanceCount = instanceCount; + DiskConfiguration = diskConfiguration; } /// The database type. @@ -49,5 +52,17 @@ internal DatabaseConfiguration(SapDatabaseType? databaseType, ResourceIdentifier public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } /// The number of database VMs. public long InstanceCount { get; set; } + /// Gets or sets the disk configuration. + internal DiskConfiguration DiskConfiguration { get; set; } + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations + { + get + { + if (DiskConfiguration is null) + DiskConfiguration = new DiskConfiguration(); + return DiskConfiguration.DiskVolumeConfigurations; + } + } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseProfile.Serialization.cs deleted file mode 100644 index cf4fd073745a4..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseProfile.Serialization.cs +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class DatabaseProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue(DatabaseType.ToString()); - if (Optional.IsDefined(ServerName)) - { - writer.WritePropertyName("serverName"); - writer.WriteStringValue(ServerName); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version); - } - writer.WritePropertyName("sku"); - writer.WriteStringValue(Sku); - writer.WritePropertyName("tier"); - writer.WriteStringValue(Tier.ToSerialString()); - if (Optional.IsDefined(HAEnabled)) - { - writer.WritePropertyName("haEnabled"); - writer.WriteStringValue(HAEnabled.Value.ToString()); - } - if (Optional.IsDefined(StorageSku)) - { - writer.WritePropertyName("storageSku"); - writer.WriteStringValue(StorageSku); - } - if (Optional.IsDefined(StorageInGB)) - { - writer.WritePropertyName("storageInGB"); - writer.WriteNumberValue(StorageInGB.Value); - } - if (Optional.IsDefined(StorageIops)) - { - writer.WritePropertyName("storageIops"); - writer.WriteNumberValue(StorageIops.Value); - } - if (Optional.IsDefined(BackupRetentionDays)) - { - writer.WritePropertyName("backupRetentionDays"); - writer.WriteNumberValue(BackupRetentionDays.Value); - } - if (Optional.IsDefined(SslEnforcementEnabled)) - { - writer.WritePropertyName("sslEnforcementEnabled"); - writer.WriteStringValue(SslEnforcementEnabled.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static DatabaseProfile DeserializeDatabaseProfile(JsonElement element) - { - DatabaseType type = default; - Optional serverName = default; - Optional version = default; - string sku = default; - DatabaseTier tier = default; - Optional haEnabled = default; - Optional storageSku = default; - Optional storageInGB = default; - Optional storageIops = default; - Optional backupRetentionDays = default; - Optional sslEnforcementEnabled = default; - Optional serverResourceId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type")) - { - type = new DatabaseType(property.Value.GetString()); - continue; - } - if (property.NameEquals("serverName")) - { - serverName = property.Value.GetString(); - continue; - } - if (property.NameEquals("version")) - { - version = property.Value.GetString(); - continue; - } - if (property.NameEquals("sku")) - { - sku = property.Value.GetString(); - continue; - } - if (property.NameEquals("tier")) - { - tier = property.Value.GetString().ToDatabaseTier(); - continue; - } - if (property.NameEquals("haEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - haEnabled = new HAEnabled(property.Value.GetString()); - continue; - } - if (property.NameEquals("storageSku")) - { - storageSku = property.Value.GetString(); - continue; - } - if (property.NameEquals("storageInGB")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - storageInGB = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("storageIops")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - storageIops = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("backupRetentionDays")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - backupRetentionDays = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("sslEnforcementEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sslEnforcementEnabled = new EnableSslEnforcement(property.Value.GetString()); - continue; - } - if (property.NameEquals("serverResourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - serverResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - } - return new DatabaseProfile(type, serverName.Value, version.Value, sku, tier, Optional.ToNullable(haEnabled), storageSku.Value, Optional.ToNullable(storageInGB), Optional.ToNullable(storageIops), Optional.ToNullable(backupRetentionDays), Optional.ToNullable(sslEnforcementEnabled), serverResourceId.Value); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseProfile.cs deleted file mode 100644 index 2c7dd1a419684..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseProfile.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Workload database profile. - public partial class DatabaseProfile - { - /// Initializes a new instance of DatabaseProfile. - /// Database type. - /// The name of the server SKU, e.g. Standard_D32s_v4. - /// Tier of the server SKU. - /// is null. - public DatabaseProfile(DatabaseType databaseType, string sku, DatabaseTier tier) - { - Argument.AssertNotNull(sku, nameof(sku)); - - DatabaseType = databaseType; - Sku = sku; - Tier = tier; - } - - /// Initializes a new instance of DatabaseProfile. - /// Database type. - /// Database server name. - /// Database version. - /// The name of the server SKU, e.g. Standard_D32s_v4. - /// Tier of the server SKU. - /// Whether to enable HA for the server. - /// SKU name for database storage. - /// Database storage size in GB. - /// Storage IOPS for the server. - /// Backup retention days for the server. - /// Whether to enable SSL enforcement on the database. - /// Azure Database Server resource Id. - internal DatabaseProfile(DatabaseType databaseType, string serverName, string version, string sku, DatabaseTier tier, HAEnabled? haEnabled, string storageSku, long? storageInGB, long? storageIops, int? backupRetentionDays, EnableSslEnforcement? sslEnforcementEnabled, ResourceIdentifier serverResourceId) - { - DatabaseType = databaseType; - ServerName = serverName; - Version = version; - Sku = sku; - Tier = tier; - HAEnabled = haEnabled; - StorageSku = storageSku; - StorageInGB = storageInGB; - StorageIops = storageIops; - BackupRetentionDays = backupRetentionDays; - SslEnforcementEnabled = sslEnforcementEnabled; - ServerResourceId = serverResourceId; - } - - /// Database type. - public DatabaseType DatabaseType { get; set; } - /// Database server name. - public string ServerName { get; set; } - /// Database version. - public string Version { get; set; } - /// The name of the server SKU, e.g. Standard_D32s_v4. - public string Sku { get; set; } - /// Tier of the server SKU. - public DatabaseTier Tier { get; set; } - /// Whether to enable HA for the server. - public HAEnabled? HAEnabled { get; set; } - /// SKU name for database storage. - public string StorageSku { get; set; } - /// Database storage size in GB. - public long? StorageInGB { get; set; } - /// Storage IOPS for the server. - public long? StorageIops { get; set; } - /// Backup retention days for the server. - public int? BackupRetentionDays { get; set; } - /// Whether to enable SSL enforcement on the database. - public EnableSslEnforcement? SslEnforcementEnabled { get; set; } - /// Azure Database Server resource Id. - public ResourceIdentifier ServerResourceId { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs new file mode 100644 index 0000000000000..eaecaef12f44a --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseServerFullResourceNames.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class DatabaseServerFullResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(VirtualMachines)) + { + writer.WritePropertyName("virtualMachines"); + writer.WriteStartArray(); + foreach (var item in VirtualMachines) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AvailabilitySetName)) + { + writer.WritePropertyName("availabilitySetName"); + writer.WriteStringValue(AvailabilitySetName); + } + if (Optional.IsDefined(LoadBalancer)) + { + writer.WritePropertyName("loadBalancer"); + writer.WriteObjectValue(LoadBalancer); + } + writer.WriteEndObject(); + } + + internal static DatabaseServerFullResourceNames DeserializeDatabaseServerFullResourceNames(JsonElement element) + { + Optional> virtualMachines = default; + Optional availabilitySetName = default; + Optional loadBalancer = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachines")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(item)); + } + virtualMachines = array; + continue; + } + if (property.NameEquals("availabilitySetName")) + { + availabilitySetName = property.Value.GetString(); + continue; + } + if (property.NameEquals("loadBalancer")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + loadBalancer = LoadBalancerResourceNames.DeserializeLoadBalancerResourceNames(property.Value); + continue; + } + } + return new DatabaseServerFullResourceNames(Optional.ToList(virtualMachines), availabilitySetName.Value, loadBalancer.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseServerFullResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseServerFullResourceNames.cs new file mode 100644 index 0000000000000..ff917e69a9e04 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseServerFullResourceNames.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + public partial class DatabaseServerFullResourceNames + { + /// Initializes a new instance of DatabaseServerFullResourceNames. + public DatabaseServerFullResourceNames() + { + VirtualMachines = new ChangeTrackingList(); + } + + /// Initializes a new instance of DatabaseServerFullResourceNames. + /// The list of virtual machine naming details. + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. + /// The resource names object for load balancer and related resources. + internal DatabaseServerFullResourceNames(IList virtualMachines, string availabilitySetName, LoadBalancerResourceNames loadBalancer) + { + VirtualMachines = virtualMachines; + AvailabilitySetName = availabilitySetName; + LoadBalancer = loadBalancer; + } + + /// The list of virtual machine naming details. + public IList VirtualMachines { get; } + /// The full name for availability set. In case name is not provided, it will be defaulted to {SID}-DB-AvSet. + public string AvailabilitySetName { get; set; } + /// The resource names object for load balancer and related resources. + public LoadBalancerResourceNames LoadBalancer { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseTier.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseTier.Serialization.cs deleted file mode 100644 index d26cd17bc5d46..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseTier.Serialization.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.Workloads.Models -{ - internal static partial class DatabaseTierExtensions - { - public static string ToSerialString(this DatabaseTier value) => value switch - { - DatabaseTier.Burstable => "Burstable", - DatabaseTier.GeneralPurpose => "GeneralPurpose", - DatabaseTier.MemoryOptimized => "MemoryOptimized", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DatabaseTier value.") - }; - - public static DatabaseTier ToDatabaseTier(this string value) - { - if (string.Equals(value, "Burstable", StringComparison.InvariantCultureIgnoreCase)) return DatabaseTier.Burstable; - if (string.Equals(value, "GeneralPurpose", StringComparison.InvariantCultureIgnoreCase)) return DatabaseTier.GeneralPurpose; - if (string.Equals(value, "MemoryOptimized", StringComparison.InvariantCultureIgnoreCase)) return DatabaseTier.MemoryOptimized; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DatabaseTier value."); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseTier.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseTier.cs deleted file mode 100644 index 2cdc6881fe23e..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseTier.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Tier of the server SKU. - public enum DatabaseTier - { - /// Burstable. - Burstable, - /// GeneralPurpose. - GeneralPurpose, - /// MemoryOptimized. - MemoryOptimized - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseType.cs deleted file mode 100644 index 3e90e4d0c5cac..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseType.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.Workloads.Models -{ - /// Database type. - public readonly partial struct DatabaseType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DatabaseType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MySqlValue = "MySql"; - - /// MySql. - public static DatabaseType MySql { get; } = new DatabaseType(MySqlValue); - /// Determines if two values are the same. - public static bool operator ==(DatabaseType left, DatabaseType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DatabaseType left, DatabaseType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DatabaseType(string value) => new DatabaseType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DatabaseType other && Equals(other); - /// - public bool Equals(DatabaseType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseVmDetails.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseVmDetails.Serialization.cs index 2a60d97b5cc06..3fa16819bb29a 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseVmDetails.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseVmDetails.Serialization.cs @@ -5,8 +5,10 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Workloads.Models { @@ -16,6 +18,7 @@ internal static DatabaseVmDetails DeserializeDatabaseVmDetails(JsonElement eleme { Optional virtualMachineId = default; Optional status = default; + Optional> storageDetails = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("virtualMachineId")) @@ -38,8 +41,23 @@ internal static DatabaseVmDetails DeserializeDatabaseVmDetails(JsonElement eleme status = new SapVirtualInstanceStatus(property.Value.GetString()); continue; } + if (property.NameEquals("storageDetails")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + storageDetails = array; + continue; + } } - return new DatabaseVmDetails(virtualMachineId.Value, Optional.ToNullable(status)); + return new DatabaseVmDetails(virtualMachineId.Value, Optional.ToNullable(status), Optional.ToList(storageDetails)); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseVmDetails.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseVmDetails.cs index 3a315267e850f..eb3dfccebde91 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseVmDetails.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DatabaseVmDetails.cs @@ -5,30 +5,37 @@ #nullable disable +using System.Collections.Generic; using Azure.Core; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.Workloads.Models { - /// The Database VM Details. + /// Database VM details. public partial class DatabaseVmDetails { /// Initializes a new instance of DatabaseVmDetails. internal DatabaseVmDetails() { + StorageDetails = new ChangeTrackingList(); } /// Initializes a new instance of DatabaseVmDetails. /// /// Defines the SAP Instance status. - internal DatabaseVmDetails(ResourceIdentifier virtualMachineId, SapVirtualInstanceStatus? status) + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + internal DatabaseVmDetails(ResourceIdentifier virtualMachineId, SapVirtualInstanceStatus? status, IReadOnlyList storageDetails) { VirtualMachineId = virtualMachineId; Status = status; + StorageDetails = storageDetails; } /// Gets the virtual machine id. public ResourceIdentifier VirtualMachineId { get; } /// Defines the SAP Instance status. public SapVirtualInstanceStatus? Status { get; } + /// Storage details of all the Storage Accounts attached to the Database Virtual Machine. For e.g. NFS on AFS Shared Storage. + public IReadOnlyList StorageDetails { get; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DeploymentConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DeploymentConfiguration.cs index d4ebce2c43c8e..5e55a9e269ae3 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DeploymentConfiguration.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DeploymentConfiguration.cs @@ -29,7 +29,7 @@ public DeploymentConfiguration() /// /// The software configuration. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// internal DeploymentConfiguration(SapConfigurationType configurationType, AzureLocation? appLocation, InfrastructureConfiguration infrastructureConfiguration, SoftwareConfiguration softwareConfiguration) : base(configurationType) { @@ -50,7 +50,7 @@ internal DeploymentConfiguration(SapConfigurationType configurationType, AzureLo /// /// The software configuration. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public SoftwareConfiguration SoftwareConfiguration { get; set; } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DeploymentWithOSConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DeploymentWithOSConfiguration.cs index 6c3fc059cf5b4..bfe7971ced3b6 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DeploymentWithOSConfiguration.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DeploymentWithOSConfiguration.cs @@ -29,7 +29,7 @@ public DeploymentWithOSConfiguration() /// /// The software configuration. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// /// The OS and SAP configuration. internal DeploymentWithOSConfiguration(SapConfigurationType configurationType, AzureLocation? appLocation, InfrastructureConfiguration infrastructureConfiguration, SoftwareConfiguration softwareConfiguration, OSSapConfiguration osSapConfiguration) : base(configurationType) @@ -52,7 +52,7 @@ internal DeploymentWithOSConfiguration(SapConfigurationType configurationType, A /// /// The software configuration. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public SoftwareConfiguration SoftwareConfiguration { get; set; } /// The OS and SAP configuration. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskConfiguration.Serialization.cs new file mode 100644 index 0000000000000..00301e919d21f --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskConfiguration.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + internal partial class DiskConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(DiskVolumeConfigurations)) + { + writer.WritePropertyName("diskVolumeConfigurations"); + writer.WriteStartObject(); + foreach (var item in DiskVolumeConfigurations) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static DiskConfiguration DeserializeDiskConfiguration(JsonElement element) + { + Optional> diskVolumeConfigurations = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskVolumeConfigurations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, DiskVolumeConfiguration.DeserializeDiskVolumeConfiguration(property0.Value)); + } + diskVolumeConfigurations = dictionary; + continue; + } + } + return new DiskConfiguration(Optional.ToDictionary(diskVolumeConfigurations)); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskConfiguration.cs new file mode 100644 index 0000000000000..bffa97591ce15 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskConfiguration.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The Disk Configuration Details. + internal partial class DiskConfiguration + { + /// Initializes a new instance of DiskConfiguration. + public DiskConfiguration() + { + DiskVolumeConfigurations = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of DiskConfiguration. + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + internal DiskConfiguration(IDictionary diskVolumeConfigurations) + { + DiskVolumeConfigurations = diskVolumeConfigurations; + } + + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations { get; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskDetails.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskDetails.Serialization.cs new file mode 100644 index 0000000000000..8d5db5b007858 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskDetails.Serialization.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class DiskDetails + { + internal static DiskDetails DeserializeDiskDetails(JsonElement element) + { + Optional sku = default; + Optional sizeGB = default; + Optional minimumSupportedDiskCount = default; + Optional maximumSupportedDiskCount = default; + Optional iopsReadWrite = default; + Optional mbpsReadWrite = default; + Optional diskTier = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = DiskSku.DeserializeDiskSku(property.Value); + continue; + } + if (property.NameEquals("sizeGB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("minimumSupportedDiskCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minimumSupportedDiskCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("maximumSupportedDiskCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maximumSupportedDiskCount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("iopsReadWrite")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + iopsReadWrite = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("mbpsReadWrite")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mbpsReadWrite = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("diskTier")) + { + diskTier = property.Value.GetString(); + continue; + } + } + return new DiskDetails(sku.Value, Optional.ToNullable(sizeGB), Optional.ToNullable(minimumSupportedDiskCount), Optional.ToNullable(maximumSupportedDiskCount), Optional.ToNullable(iopsReadWrite), Optional.ToNullable(mbpsReadWrite), diskTier.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskDetails.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskDetails.cs new file mode 100644 index 0000000000000..6bd0d7f5f7cf0 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskDetails.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The supported disk size details for a disk type. + public partial class DiskDetails + { + /// Initializes a new instance of DiskDetails. + internal DiskDetails() + { + } + + /// Initializes a new instance of DiskDetails. + /// The disk sku. + /// The disk size in GB. + /// The minimum supported disk count. + /// The maximum supported disk count. + /// The disk Iops. + /// The disk provisioned throughput in MBps. + /// The disk tier, e.g. P10, E10. + internal DiskDetails(DiskSku sku, long? sizeGB, long? minimumSupportedDiskCount, long? maximumSupportedDiskCount, long? iopsReadWrite, long? mbpsReadWrite, string diskTier) + { + Sku = sku; + SizeGB = sizeGB; + MinimumSupportedDiskCount = minimumSupportedDiskCount; + MaximumSupportedDiskCount = maximumSupportedDiskCount; + IopsReadWrite = iopsReadWrite; + MbpsReadWrite = mbpsReadWrite; + DiskTier = diskTier; + } + + /// The disk sku. + internal DiskSku Sku { get; } + /// Defines the disk sku name. + public DiskSkuName? SkuName + { + get => Sku?.Name; + } + + /// The disk size in GB. + public long? SizeGB { get; } + /// The minimum supported disk count. + public long? MinimumSupportedDiskCount { get; } + /// The maximum supported disk count. + public long? MaximumSupportedDiskCount { get; } + /// The disk Iops. + public long? IopsReadWrite { get; } + /// The disk provisioned throughput in MBps. + public long? MbpsReadWrite { get; } + /// The disk tier, e.g. P10, E10. + public string DiskTier { get; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskInfo.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskInfo.Serialization.cs deleted file mode 100644 index 41876c7c51a0d..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskInfo.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class DiskInfo : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("storageType"); - writer.WriteStringValue(StorageType.ToSerialString()); - if (Optional.IsDefined(SizeInGB)) - { - writer.WritePropertyName("sizeInGB"); - writer.WriteNumberValue(SizeInGB.Value); - } - writer.WriteEndObject(); - } - - internal static DiskInfo DeserializeDiskInfo(JsonElement element) - { - DiskStorageType storageType = default; - Optional sizeInGB = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("storageType")) - { - storageType = property.Value.GetString().ToDiskStorageType(); - continue; - } - if (property.NameEquals("sizeInGB")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sizeInGB = property.Value.GetInt64(); - continue; - } - } - return new DiskInfo(storageType, Optional.ToNullable(sizeInGB)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskInfo.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskInfo.cs deleted file mode 100644 index 3b834d0be78d9..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Disk resource creation details. - public partial class DiskInfo - { - /// Initializes a new instance of DiskInfo. - /// Storage type. - public DiskInfo(DiskStorageType storageType) - { - StorageType = storageType; - } - - /// Initializes a new instance of DiskInfo. - /// Storage type. - /// Disk size in GB. - internal DiskInfo(DiskStorageType storageType, long? sizeInGB) - { - StorageType = storageType; - SizeInGB = sizeInGB; - } - - /// Storage type. - public DiskStorageType StorageType { get; set; } - /// Disk size in GB. - public long? SizeInGB { get; set; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSku.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSku.Serialization.cs new file mode 100644 index 0000000000000..8572681367bfa --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSku.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + internal partial class DiskSku : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static DiskSku DeserializeDiskSku(JsonElement element) + { + Optional name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + name = new DiskSkuName(property.Value.GetString()); + continue; + } + } + return new DiskSku(Optional.ToNullable(name)); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSku.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSku.cs new file mode 100644 index 0000000000000..97e1f7381b8f4 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSku.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The disk sku. + internal partial class DiskSku + { + /// Initializes a new instance of DiskSku. + public DiskSku() + { + } + + /// Initializes a new instance of DiskSku. + /// Defines the disk sku name. + internal DiskSku(DiskSkuName? name) + { + Name = name; + } + + /// Defines the disk sku name. + public DiskSkuName? Name { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSkuName.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSkuName.cs new file mode 100644 index 0000000000000..39ccd99af4b8c --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskSkuName.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.Workloads.Models +{ + /// Defines the disk sku name. + public readonly partial struct DiskSkuName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DiskSkuName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardLrsValue = "Standard_LRS"; + private const string PremiumLrsValue = "Premium_LRS"; + private const string StandardSsdLrsValue = "StandardSSD_LRS"; + private const string UltraSsdLrsValue = "UltraSSD_LRS"; + private const string PremiumZrsValue = "Premium_ZRS"; + private const string StandardSsdZrsValue = "StandardSSD_ZRS"; + private const string PremiumV2LrsValue = "PremiumV2_LRS"; + + /// Standard_LRS. + public static DiskSkuName StandardLrs { get; } = new DiskSkuName(StandardLrsValue); + /// Premium_LRS. + public static DiskSkuName PremiumLrs { get; } = new DiskSkuName(PremiumLrsValue); + /// StandardSSD_LRS. + public static DiskSkuName StandardSsdLrs { get; } = new DiskSkuName(StandardSsdLrsValue); + /// UltraSSD_LRS. + public static DiskSkuName UltraSsdLrs { get; } = new DiskSkuName(UltraSsdLrsValue); + /// Premium_ZRS. + public static DiskSkuName PremiumZrs { get; } = new DiskSkuName(PremiumZrsValue); + /// StandardSSD_ZRS. + public static DiskSkuName StandardSsdZrs { get; } = new DiskSkuName(StandardSsdZrsValue); + /// PremiumV2_LRS. + public static DiskSkuName PremiumV2Lrs { get; } = new DiskSkuName(PremiumV2LrsValue); + /// Determines if two values are the same. + public static bool operator ==(DiskSkuName left, DiskSkuName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiskSkuName left, DiskSkuName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator DiskSkuName(string value) => new DiskSkuName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiskSkuName other && Equals(other); + /// + public bool Equals(DiskSkuName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskStorageType.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskStorageType.Serialization.cs deleted file mode 100644 index 494a3e5f8dbd8..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskStorageType.Serialization.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.Workloads.Models -{ - internal static partial class DiskStorageTypeExtensions - { - public static string ToSerialString(this DiskStorageType value) => value switch - { - DiskStorageType.PremiumLrs => "Premium_LRS", - DiskStorageType.StandardLrs => "Standard_LRS", - DiskStorageType.StandardSsdLrs => "StandardSSD_LRS", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DiskStorageType value.") - }; - - public static DiskStorageType ToDiskStorageType(this string value) - { - if (string.Equals(value, "Premium_LRS", StringComparison.InvariantCultureIgnoreCase)) return DiskStorageType.PremiumLrs; - if (string.Equals(value, "Standard_LRS", StringComparison.InvariantCultureIgnoreCase)) return DiskStorageType.StandardLrs; - if (string.Equals(value, "StandardSSD_LRS", StringComparison.InvariantCultureIgnoreCase)) return DiskStorageType.StandardSsdLrs; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown DiskStorageType value."); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskStorageType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskStorageType.cs deleted file mode 100644 index 64a1ac8c5f49e..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskStorageType.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Storage type. - public enum DiskStorageType - { - /// Premium_LRS. - PremiumLrs, - /// Standard_LRS. - StandardLrs, - /// StandardSSD_LRS. - StandardSsdLrs - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs new file mode 100644 index 0000000000000..cf65c8fc9c9e2 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskVolumeConfiguration.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class DiskVolumeConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(SizeGB)) + { + writer.WritePropertyName("sizeGB"); + writer.WriteNumberValue(SizeGB.Value); + } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + writer.WriteEndObject(); + } + + internal static DiskVolumeConfiguration DeserializeDiskVolumeConfiguration(JsonElement element) + { + Optional count = default; + Optional sizeGB = default; + Optional sku = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("count")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sizeGB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sizeGB = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = DiskSku.DeserializeDiskSku(property.Value); + continue; + } + } + return new DiskVolumeConfiguration(Optional.ToNullable(count), Optional.ToNullable(sizeGB), sku.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskVolumeConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskVolumeConfiguration.cs new file mode 100644 index 0000000000000..ad54bb0a6c334 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/DiskVolumeConfiguration.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The disk configuration required for the selected volume. + public partial class DiskVolumeConfiguration + { + /// Initializes a new instance of DiskVolumeConfiguration. + public DiskVolumeConfiguration() + { + } + + /// Initializes a new instance of DiskVolumeConfiguration. + /// The total number of disks required for the concerned volume. + /// The disk size in GB. + /// The disk SKU details. + internal DiskVolumeConfiguration(long? count, long? sizeGB, DiskSku sku) + { + Count = count; + SizeGB = sizeGB; + Sku = sku; + } + + /// The total number of disks required for the concerned volume. + public long? Count { get; set; } + /// The disk size in GB. + public long? SizeGB { get; set; } + /// The disk SKU details. + internal DiskSku Sku { get; set; } + /// Defines the disk sku name. + public DiskSkuName? SkuName + { + get => Sku is null ? default : Sku.Name; + set + { + if (Sku is null) + Sku = new DiskSku(); + Sku.Name = value; + } + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnableBackup.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnableBackup.cs deleted file mode 100644 index 026c422c39957..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnableBackup.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.Workloads.Models -{ - /// Whether to enable Azure backup for the workload. - public readonly partial struct EnableBackup : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EnableBackup(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static EnableBackup Enabled { get; } = new EnableBackup(EnabledValue); - /// Disabled. - public static EnableBackup Disabled { get; } = new EnableBackup(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(EnableBackup left, EnableBackup right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EnableBackup left, EnableBackup right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EnableBackup(string value) => new EnableBackup(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EnableBackup other && Equals(other); - /// - public bool Equals(EnableBackup other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnableSslEnforcement.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnableSslEnforcement.cs deleted file mode 100644 index 0b4537f441444..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnableSslEnforcement.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.Workloads.Models -{ - /// Whether to enable SSL enforcement on the database. - public readonly partial struct EnableSslEnforcement : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EnableSslEnforcement(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static EnableSslEnforcement Enabled { get; } = new EnableSslEnforcement(EnabledValue); - /// Disabled. - public static EnableSslEnforcement Disabled { get; } = new EnableSslEnforcement(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(EnableSslEnforcement left, EnableSslEnforcement right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EnableSslEnforcement left, EnableSslEnforcement right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EnableSslEnforcement(string value) => new EnableSslEnforcement(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EnableSslEnforcement other && Equals(other); - /// - public bool Equals(EnableSslEnforcement other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnqueueReplicationServerProperties.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnqueueReplicationServerProperties.cs index 6d7881fb0fe09..8a6c14af33af7 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnqueueReplicationServerProperties.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnqueueReplicationServerProperties.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Workloads.Models { - /// Defines the SAP ERS Server properties. + /// Defines the SAP Enqueue Replication Server (ERS) properties. public partial class EnqueueReplicationServerProperties { /// Initializes a new instance of EnqueueReplicationServerProperties. @@ -17,12 +17,12 @@ public EnqueueReplicationServerProperties() /// Initializes a new instance of EnqueueReplicationServerProperties. /// Defines the type of Enqueue Replication Server. - /// The ERS server instance id. - /// The ERS server SAP host name. - /// The ERS server SAP kernel version. - /// The ERS server SAP kernel patch. - /// The ERS server SAP IP Address. - /// Defines the SAP Instance health. + /// ERS Instance Number. + /// ERS SAP Hostname. + /// ERS SAP Kernel Version. + /// ERS SAP Kernel Patch level. + /// ERS SAP IP Address. + /// Defines the health of SAP Instances. internal EnqueueReplicationServerProperties(EnqueueReplicationServerType? ersVersion, string instanceNo, string hostname, string kernelVersion, string kernelPatch, string ipAddress, SapHealthState? health) { ErsVersion = ersVersion; @@ -36,17 +36,17 @@ internal EnqueueReplicationServerProperties(EnqueueReplicationServerType? ersVer /// Defines the type of Enqueue Replication Server. public EnqueueReplicationServerType? ErsVersion { get; } - /// The ERS server instance id. + /// ERS Instance Number. public string InstanceNo { get; } - /// The ERS server SAP host name. + /// ERS SAP Hostname. public string Hostname { get; } - /// The ERS server SAP kernel version. + /// ERS SAP Kernel Version. public string KernelVersion { get; } - /// The ERS server SAP kernel patch. + /// ERS SAP Kernel Patch level. public string KernelPatch { get; } - /// The ERS server SAP IP Address. + /// ERS SAP IP Address. public string IPAddress { get; } - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. public SapHealthState? Health { get; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnqueueServerProperties.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnqueueServerProperties.cs index e4b67cb5103f6..29a9c65591c72 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnqueueServerProperties.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/EnqueueServerProperties.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Workloads.Models { - /// Defines the SAP enqueue server properties. + /// Defines the SAP Enqueue Server properties. public partial class EnqueueServerProperties { /// Initializes a new instance of EnqueueServerProperties. @@ -16,10 +16,10 @@ public EnqueueServerProperties() } /// Initializes a new instance of EnqueueServerProperties. - /// The enqueue server SAP host name. - /// The enqueue server SAP IP Address. - /// The enqueue server Port. - /// Defines the SAP Instance health. + /// Enqueue Server SAP Hostname. + /// Enqueue Server SAP IP Address. + /// Enqueue Server Port. + /// Defines the health of SAP Instances. internal EnqueueServerProperties(string hostname, string ipAddress, long? port, SapHealthState? health) { Hostname = hostname; @@ -28,13 +28,13 @@ internal EnqueueServerProperties(string hostname, string ipAddress, long? port, Health = health; } - /// The enqueue server SAP host name. + /// Enqueue Server SAP Hostname. public string Hostname { get; } - /// The enqueue server SAP IP Address. + /// Enqueue Server SAP IP Address. public string IPAddress { get; } - /// The enqueue server Port. + /// Enqueue Server Port. public long? Port { get; } - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. public SapHealthState? Health { get; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs new file mode 100644 index 0000000000000..95c8dac590858 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ExternalInstallationSoftwareConfiguration.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class ExternalInstallationSoftwareConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CentralServerVmId)) + { + writer.WritePropertyName("centralServerVmId"); + writer.WriteStringValue(CentralServerVmId); + } + writer.WritePropertyName("softwareInstallationType"); + writer.WriteStringValue(SoftwareInstallationType.ToString()); + writer.WriteEndObject(); + } + + internal static ExternalInstallationSoftwareConfiguration DeserializeExternalInstallationSoftwareConfiguration(JsonElement element) + { + Optional centralServerVmId = default; + SapSoftwareInstallationType softwareInstallationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServerVmId")) + { + centralServerVmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("softwareInstallationType")) + { + softwareInstallationType = new SapSoftwareInstallationType(property.Value.GetString()); + continue; + } + } + return new ExternalInstallationSoftwareConfiguration(softwareInstallationType, centralServerVmId.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs new file mode 100644 index 0000000000000..89595812509d6 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ExternalInstallationSoftwareConfiguration.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The SAP Software configuration Input when the software is installed externally outside the service. + public partial class ExternalInstallationSoftwareConfiguration : SoftwareConfiguration + { + /// Initializes a new instance of ExternalInstallationSoftwareConfiguration. + public ExternalInstallationSoftwareConfiguration() + { + SoftwareInstallationType = SapSoftwareInstallationType.External; + } + + /// Initializes a new instance of ExternalInstallationSoftwareConfiguration. + /// The SAP software installation Type. + /// The resource ID of the virtual machine containing the central server instance. + internal ExternalInstallationSoftwareConfiguration(SapSoftwareInstallationType softwareInstallationType, string centralServerVmId) : base(softwareInstallationType) + { + CentralServerVmId = centralServerVmId; + SoftwareInstallationType = softwareInstallationType; + } + + /// The resource ID of the virtual machine containing the central server instance. + public string CentralServerVmId { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareConfiguration.Serialization.cs new file mode 100644 index 0000000000000..546cb5f023fe3 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareConfiguration.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class FileShareConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("configurationType"); + writer.WriteStringValue(ConfigurationType.ToString()); + writer.WriteEndObject(); + } + + internal static FileShareConfiguration DeserializeFileShareConfiguration(JsonElement element) + { + if (element.TryGetProperty("configurationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CreateAndMount": return CreateAndMountFileShareConfiguration.DeserializeCreateAndMountFileShareConfiguration(element); + case "Mount": return MountFileShareConfiguration.DeserializeMountFileShareConfiguration(element); + case "Skip": return SkipFileShareConfiguration.DeserializeSkipFileShareConfiguration(element); + } + } + return UnknownFileShareConfiguration.DeserializeUnknownFileShareConfiguration(element); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareConfiguration.cs new file mode 100644 index 0000000000000..c1ca4a38e380a --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareConfiguration.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// + /// File Share configuration details, populated with information on storage configuration mounted on the VIS. The createAndMount option is selected in case of missing input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class FileShareConfiguration + { + /// Initializes a new instance of FileShareConfiguration. + protected FileShareConfiguration() + { + } + + /// Initializes a new instance of FileShareConfiguration. + /// The type of file share config. + internal FileShareConfiguration(ConfigurationType configurationType) + { + ConfigurationType = configurationType; + } + + /// The type of file share config. + internal ConfigurationType ConfigurationType { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareStorageType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareStorageType.cs deleted file mode 100644 index bbd4e7593fb18..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareStorageType.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// File share backing storage type. - public readonly partial struct FileShareStorageType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FileShareStorageType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StandardLrsValue = "Standard_LRS"; - private const string StandardGrsValue = "Standard_GRS"; - private const string StandardZrsValue = "Standard_ZRS"; - private const string PremiumLrsValue = "Premium_LRS"; - - /// Standard_LRS. - public static FileShareStorageType StandardLrs { get; } = new FileShareStorageType(StandardLrsValue); - /// Standard_GRS. - public static FileShareStorageType StandardGrs { get; } = new FileShareStorageType(StandardGrsValue); - /// Standard_ZRS. - public static FileShareStorageType StandardZrs { get; } = new FileShareStorageType(StandardZrsValue); - /// Premium_LRS. - public static FileShareStorageType PremiumLrs { get; } = new FileShareStorageType(PremiumLrsValue); - /// Determines if two values are the same. - public static bool operator ==(FileShareStorageType left, FileShareStorageType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FileShareStorageType left, FileShareStorageType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FileShareStorageType(string value) => new FileShareStorageType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FileShareStorageType other && Equals(other); - /// - public bool Equals(FileShareStorageType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareType.cs deleted file mode 100644 index 55e61f568f793..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileShareType.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.Workloads.Models -{ - /// Share type. - public readonly partial struct FileShareType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FileShareType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NfsOnControllerValue = "NfsOnController"; - private const string AzureFilesValue = "AzureFiles"; - - /// NfsOnController. - public static FileShareType NfsOnController { get; } = new FileShareType(NfsOnControllerValue); - /// AzureFiles. - public static FileShareType AzureFiles { get; } = new FileShareType(AzureFilesValue); - /// Determines if two values are the same. - public static bool operator ==(FileShareType left, FileShareType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FileShareType left, FileShareType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FileShareType(string value) => new FileShareType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FileShareType other && Equals(other); - /// - public bool Equals(FileShareType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileshareProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileshareProfile.Serialization.cs deleted file mode 100644 index 8468840af61ae..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileshareProfile.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class FileshareProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("shareType"); - writer.WriteStringValue(ShareType.ToString()); - writer.WritePropertyName("storageType"); - writer.WriteStringValue(StorageType.ToString()); - if (Optional.IsDefined(ShareSizeInGB)) - { - writer.WritePropertyName("shareSizeInGB"); - writer.WriteNumberValue(ShareSizeInGB.Value); - } - writer.WriteEndObject(); - } - - internal static FileshareProfile DeserializeFileshareProfile(JsonElement element) - { - FileShareType shareType = default; - FileShareStorageType storageType = default; - Optional shareSizeInGB = default; - Optional storageResourceId = default; - Optional shareName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("shareType")) - { - shareType = new FileShareType(property.Value.GetString()); - continue; - } - if (property.NameEquals("storageType")) - { - storageType = new FileShareStorageType(property.Value.GetString()); - continue; - } - if (property.NameEquals("shareSizeInGB")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - shareSizeInGB = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("storageResourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - storageResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("shareName")) - { - shareName = property.Value.GetString(); - continue; - } - } - return new FileshareProfile(shareType, storageType, Optional.ToNullable(shareSizeInGB), storageResourceId.Value, shareName.Value); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileshareProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileshareProfile.cs deleted file mode 100644 index fd8824d8aef40..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/FileshareProfile.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// File share profile. - public partial class FileshareProfile - { - /// Initializes a new instance of FileshareProfile. - /// Share type. - /// File share backing storage type. - public FileshareProfile(FileShareType shareType, FileShareStorageType storageType) - { - ShareType = shareType; - StorageType = storageType; - } - - /// Initializes a new instance of FileshareProfile. - /// Share type. - /// File share backing storage type. - /// File share size in GB. - /// File share storage resource id. - /// File share name. - internal FileshareProfile(FileShareType shareType, FileShareStorageType storageType, long? shareSizeInGB, ResourceIdentifier storageResourceId, string shareName) - { - ShareType = shareType; - StorageType = storageType; - ShareSizeInGB = shareSizeInGB; - StorageResourceId = storageResourceId; - ShareName = shareName; - } - - /// Share type. - public FileShareType ShareType { get; set; } - /// File share backing storage type. - public FileShareStorageType StorageType { get; set; } - /// File share size in GB. - public long? ShareSizeInGB { get; set; } - /// File share storage resource id. - public ResourceIdentifier StorageResourceId { get; } - /// File share name. - public string ShareName { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/GatewayServerProperties.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/GatewayServerProperties.cs index bb90efa5c1d91..7e2cb7ab01171 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/GatewayServerProperties.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/GatewayServerProperties.cs @@ -16,17 +16,17 @@ public GatewayServerProperties() } /// Initializes a new instance of GatewayServerProperties. - /// The gateway Port. - /// Defines the SAP Instance health. + /// Gateway Port. + /// Defines the health of SAP Instances. internal GatewayServerProperties(long? port, SapHealthState? health) { Port = port; Health = health; } - /// The gateway Port. + /// Gateway Port. public long? Port { get; } - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. public SapHealthState? Health { get; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HAEnabled.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HAEnabled.cs deleted file mode 100644 index 58aefec4f0f9e..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HAEnabled.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.Workloads.Models -{ - /// Whether to enable HA for the server. - public readonly partial struct HAEnabled : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HAEnabled(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static HAEnabled Enabled { get; } = new HAEnabled(EnabledValue); - /// Disabled. - public static HAEnabled Disabled { get; } = new HAEnabled(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(HAEnabled left, HAEnabled right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HAEnabled left, HAEnabled right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HAEnabled(string value) => new HAEnabled(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HAEnabled other && Equals(other); - /// - public bool Equals(HAEnabled other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HanaDBProviderInstanceProperties.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HanaDBProviderInstanceProperties.Serialization.cs index aa71357101e8e..ca3e401d37b6a 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HanaDBProviderInstanceProperties.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HanaDBProviderInstanceProperties.Serialization.cs @@ -51,16 +51,26 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("dbPasswordUri"); writer.WriteStringValue(DBPasswordUri.AbsoluteUri); } - if (Optional.IsDefined(DBSslCertificateUri)) + if (Optional.IsDefined(SslCertificateUri)) { - writer.WritePropertyName("dbSslCertificateUri"); - writer.WriteStringValue(DBSslCertificateUri.AbsoluteUri); + writer.WritePropertyName("sslCertificateUri"); + writer.WriteStringValue(SslCertificateUri.AbsoluteUri); } if (Optional.IsDefined(SslHostNameInCertificate)) { writer.WritePropertyName("sslHostNameInCertificate"); writer.WriteStringValue(SslHostNameInCertificate); } + if (Optional.IsDefined(SslPreference)) + { + writer.WritePropertyName("sslPreference"); + writer.WriteStringValue(SslPreference.Value.ToString()); + } + if (Optional.IsDefined(SapSid)) + { + writer.WritePropertyName("sapSid"); + writer.WriteStringValue(SapSid); + } writer.WritePropertyName("providerType"); writer.WriteStringValue(ProviderType); writer.WriteEndObject(); @@ -75,8 +85,10 @@ internal static HanaDBProviderInstanceProperties DeserializeHanaDBProviderInstan Optional dbUsername = default; Optional dbPassword = default; Optional dbPasswordUri = default; - Optional dbSslCertificateUri = default; + Optional sslCertificateUri = default; Optional sslHostNameInCertificate = default; + Optional sslPreference = default; + Optional sapSid = default; string providerType = default; foreach (var property in element.EnumerateObject()) { @@ -120,14 +132,14 @@ internal static HanaDBProviderInstanceProperties DeserializeHanaDBProviderInstan dbPasswordUri = new Uri(property.Value.GetString()); continue; } - if (property.NameEquals("dbSslCertificateUri")) + if (property.NameEquals("sslCertificateUri")) { if (property.Value.ValueKind == JsonValueKind.Null) { - dbSslCertificateUri = null; + sslCertificateUri = null; continue; } - dbSslCertificateUri = new Uri(property.Value.GetString()); + sslCertificateUri = new Uri(property.Value.GetString()); continue; } if (property.NameEquals("sslHostNameInCertificate")) @@ -135,13 +147,28 @@ internal static HanaDBProviderInstanceProperties DeserializeHanaDBProviderInstan sslHostNameInCertificate = property.Value.GetString(); continue; } + if (property.NameEquals("sslPreference")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sslPreference = new SslPreference(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapSid")) + { + sapSid = property.Value.GetString(); + continue; + } if (property.NameEquals("providerType")) { providerType = property.Value.GetString(); continue; } } - return new HanaDBProviderInstanceProperties(providerType, hostname.Value, dbName.Value, sqlPort.Value, instanceNumber.Value, dbUsername.Value, dbPassword.Value, dbPasswordUri.Value, dbSslCertificateUri.Value, sslHostNameInCertificate.Value); + return new HanaDBProviderInstanceProperties(providerType, hostname.Value, dbName.Value, sqlPort.Value, instanceNumber.Value, dbUsername.Value, dbPassword.Value, dbPasswordUri.Value, sslCertificateUri.Value, sslHostNameInCertificate.Value, Optional.ToNullable(sslPreference), sapSid.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HanaDBProviderInstanceProperties.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HanaDBProviderInstanceProperties.cs index a2786b93b6ddd..1c253680f4a22 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HanaDBProviderInstanceProperties.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/HanaDBProviderInstanceProperties.cs @@ -27,9 +27,11 @@ public HanaDBProviderInstanceProperties() /// Gets or sets the database user name. /// Gets or sets the database password. /// Gets or sets the key vault URI to secret with the database password. - /// Gets or sets the blob URI to SSL certificate for the DB. + /// Gets or sets the blob URI to SSL certificate for the DB. /// Gets or sets the hostname(s) in the SSL certificate. - internal HanaDBProviderInstanceProperties(string providerType, string hostname, string dbName, string sqlPort, string instanceNumber, string dbUsername, string dbPassword, Uri dbPasswordUri, Uri dbSslCertificateUri, string sslHostNameInCertificate) : base(providerType) + /// Gets or sets certificate preference if secure communication is enabled. + /// Gets or sets the SAP System Identifier. + internal HanaDBProviderInstanceProperties(string providerType, string hostname, string dbName, string sqlPort, string instanceNumber, string dbUsername, string dbPassword, Uri dbPasswordUri, Uri sslCertificateUri, string sslHostNameInCertificate, SslPreference? sslPreference, string sapSid) : base(providerType) { Hostname = hostname; DBName = dbName; @@ -38,8 +40,10 @@ internal HanaDBProviderInstanceProperties(string providerType, string hostname, DBUsername = dbUsername; DBPassword = dbPassword; DBPasswordUri = dbPasswordUri; - DBSslCertificateUri = dbSslCertificateUri; + SslCertificateUri = sslCertificateUri; SslHostNameInCertificate = sslHostNameInCertificate; + SslPreference = sslPreference; + SapSid = sapSid; ProviderType = providerType ?? "SapHana"; } @@ -58,8 +62,12 @@ internal HanaDBProviderInstanceProperties(string providerType, string hostname, /// Gets or sets the key vault URI to secret with the database password. public Uri DBPasswordUri { get; set; } /// Gets or sets the blob URI to SSL certificate for the DB. - public Uri DBSslCertificateUri { get; set; } + public Uri SslCertificateUri { get; set; } /// Gets or sets the hostname(s) in the SSL certificate. public string SslHostNameInCertificate { get; set; } + /// Gets or sets certificate preference if secure communication is enabled. + public SslPreference? SslPreference { get; set; } + /// Gets or sets the SAP System Identifier. + public string SapSid { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/InfrastructureConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/InfrastructureConfiguration.cs index 5205bbb7576bc..f4dc176496864 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/InfrastructureConfiguration.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/InfrastructureConfiguration.cs @@ -28,7 +28,7 @@ protected InfrastructureConfiguration(string appResourceGroup) } /// Initializes a new instance of InfrastructureConfiguration. - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. /// The application resource group where SAP system resources will be deployed. internal InfrastructureConfiguration(SapDeploymentType deploymentType, string appResourceGroup) { @@ -36,7 +36,7 @@ internal InfrastructureConfiguration(SapDeploymentType deploymentType, string ap AppResourceGroup = appResourceGroup; } - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. internal SapDeploymentType DeploymentType { get; set; } /// The application resource group where SAP system resources will be deployed. public string AppResourceGroup { get; set; } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs new file mode 100644 index 0000000000000..4600cd369cb67 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerResourceNames.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class LoadBalancerResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(LoadBalancerName)) + { + writer.WritePropertyName("loadBalancerName"); + writer.WriteStringValue(LoadBalancerName); + } + if (Optional.IsCollectionDefined(FrontendIPConfigurationNames)) + { + writer.WritePropertyName("frontendIpConfigurationNames"); + writer.WriteStartArray(); + foreach (var item in FrontendIPConfigurationNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(BackendPoolNames)) + { + writer.WritePropertyName("backendPoolNames"); + writer.WriteStartArray(); + foreach (var item in BackendPoolNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(HealthProbeNames)) + { + writer.WritePropertyName("healthProbeNames"); + writer.WriteStartArray(); + foreach (var item in HealthProbeNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static LoadBalancerResourceNames DeserializeLoadBalancerResourceNames(JsonElement element) + { + Optional loadBalancerName = default; + Optional> frontendIPConfigurationNames = default; + Optional> backendPoolNames = default; + Optional> healthProbeNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("loadBalancerName")) + { + loadBalancerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("frontendIpConfigurationNames")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + frontendIPConfigurationNames = array; + continue; + } + if (property.NameEquals("backendPoolNames")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + backendPoolNames = array; + continue; + } + if (property.NameEquals("healthProbeNames")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + healthProbeNames = array; + continue; + } + } + return new LoadBalancerResourceNames(loadBalancerName.Value, Optional.ToList(frontendIPConfigurationNames), Optional.ToList(backendPoolNames), Optional.ToList(healthProbeNames)); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerResourceNames.cs new file mode 100644 index 0000000000000..e9862bf6b2e5b --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerResourceNames.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The resource names object for load balancer and related resources. + public partial class LoadBalancerResourceNames + { + /// Initializes a new instance of LoadBalancerResourceNames. + public LoadBalancerResourceNames() + { + FrontendIPConfigurationNames = new ChangeTrackingList(); + BackendPoolNames = new ChangeTrackingList(); + HealthProbeNames = new ChangeTrackingList(); + } + + /// Initializes a new instance of LoadBalancerResourceNames. + /// The full resource name for load balancer. If this value is not provided, load balancer will be name as {ASCS/DB}-loadBalancer. + /// The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + /// The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list should be 1. + /// The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + internal LoadBalancerResourceNames(string loadBalancerName, IList frontendIPConfigurationNames, IList backendPoolNames, IList healthProbeNames) + { + LoadBalancerName = loadBalancerName; + FrontendIPConfigurationNames = frontendIPConfigurationNames; + BackendPoolNames = backendPoolNames; + HealthProbeNames = healthProbeNames; + } + + /// The full resource name for load balancer. If this value is not provided, load balancer will be name as {ASCS/DB}-loadBalancer. + public string LoadBalancerName { get; set; } + /// The list of frontend IP configuration names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + public IList FrontendIPConfigurationNames { get; } + /// The list of backend pool names. Currently, ACSS deploys only one backend pool and hence, size of this list should be 1. + public IList BackendPoolNames { get; } + /// The list of health probe names. If provided as input, size of this list should be 2 for cs layer and should be 1 for database layer. + public IList HealthProbeNames { get; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerType.cs deleted file mode 100644 index ce88073107933..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LoadBalancerType.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.Workloads.Models -{ - /// Load balancer type. - public readonly partial struct LoadBalancerType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public LoadBalancerType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ApplicationGatewayValue = "ApplicationGateway"; - private const string LoadBalancerValue = "LoadBalancer"; - - /// ApplicationGateway. - public static LoadBalancerType ApplicationGateway { get; } = new LoadBalancerType(ApplicationGatewayValue); - /// LoadBalancer. - public static LoadBalancerType LoadBalancer { get; } = new LoadBalancerType(LoadBalancerValue); - /// Determines if two values are the same. - public static bool operator ==(LoadBalancerType left, LoadBalancerType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LoadBalancerType left, LoadBalancerType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator LoadBalancerType(string value) => new LoadBalancerType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LoadBalancerType other && Equals(other); - /// - public bool Equals(LoadBalancerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LocationType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LocationType.cs deleted file mode 100644 index abcec3cda7d9e..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/LocationType.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.Workloads.Models -{ - /// Type of the extended location. - public readonly partial struct LocationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public LocationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RegionValue = "Region"; - private const string EdgeZoneValue = "EdgeZone"; - - /// Region. - public static LocationType Region { get; } = new LocationType(RegionValue); - /// EdgeZone. - public static LocationType EdgeZone { get; } = new LocationType(EdgeZoneValue); - /// Determines if two values are the same. - public static bool operator ==(LocationType left, LocationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LocationType left, LocationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator LocationType(string value) => new LocationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LocationType other && Equals(other); - /// - public bool Equals(LocationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MessageServerProperties.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MessageServerProperties.cs index a16f7d95bf495..7cb291bba5944 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MessageServerProperties.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MessageServerProperties.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Workloads.Models { - /// Defines the SAP message server properties. + /// Defines the SAP Message Server properties. public partial class MessageServerProperties { /// Initializes a new instance of MessageServerProperties. @@ -16,13 +16,13 @@ public MessageServerProperties() } /// Initializes a new instance of MessageServerProperties. - /// The message server port. - /// The message server internal MS port. - /// The message server http port. - /// The message server https port. - /// The message server SAP host name. - /// The message server IP Address. - /// Defines the SAP Instance health. + /// Message Server port. + /// Message Server internal MS port. + /// Message Server HTTP Port. + /// Message Server HTTPS Port. + /// Message Server SAP Hostname. + /// Message server IP Address. + /// Defines the health of SAP Instances. internal MessageServerProperties(long? msPort, long? internalMsPort, long? httpPort, long? httpsPort, string hostname, string ipAddress, SapHealthState? health) { MsPort = msPort; @@ -34,19 +34,19 @@ internal MessageServerProperties(long? msPort, long? internalMsPort, long? httpP Health = health; } - /// The message server port. + /// Message Server port. public long? MsPort { get; } - /// The message server internal MS port. + /// Message Server internal MS port. public long? InternalMsPort { get; } - /// The message server http port. + /// Message Server HTTP Port. public long? HttpPort { get; } - /// The message server https port. + /// Message Server HTTPS Port. public long? HttpsPort { get; } - /// The message server SAP host name. + /// Message Server SAP Hostname. public string Hostname { get; } - /// The message server IP Address. + /// Message server IP Address. public string IPAddress { get; } - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. public SapHealthState? Health { get; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MountFileShareConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MountFileShareConfiguration.Serialization.cs new file mode 100644 index 0000000000000..76f6f3a5bdff8 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MountFileShareConfiguration.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class MountFileShareConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + writer.WritePropertyName("privateEndpointId"); + writer.WriteStringValue(PrivateEndpointId); + writer.WritePropertyName("configurationType"); + writer.WriteStringValue(ConfigurationType.ToString()); + writer.WriteEndObject(); + } + + internal static MountFileShareConfiguration DeserializeMountFileShareConfiguration(JsonElement element) + { + string id = default; + string privateEndpointId = default; + ConfigurationType configurationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointId")) + { + privateEndpointId = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationType")) + { + configurationType = new ConfigurationType(property.Value.GetString()); + continue; + } + } + return new MountFileShareConfiguration(configurationType, id, privateEndpointId); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MountFileShareConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MountFileShareConfiguration.cs new file mode 100644 index 0000000000000..f2b298955ff90 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MountFileShareConfiguration.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// Gets or sets the file share configuration for externally mounted cases. + public partial class MountFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of MountFileShareConfiguration. + /// The fileshare resource ID. + /// The private endpoint resource ID. + /// or is null. + public MountFileShareConfiguration(string id, string privateEndpointId) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(privateEndpointId, nameof(privateEndpointId)); + + Id = id; + PrivateEndpointId = privateEndpointId; + ConfigurationType = ConfigurationType.Mount; + } + + /// Initializes a new instance of MountFileShareConfiguration. + /// The type of file share config. + /// The fileshare resource ID. + /// The private endpoint resource ID. + internal MountFileShareConfiguration(ConfigurationType configurationType, string id, string privateEndpointId) : base(configurationType) + { + Id = id; + PrivateEndpointId = privateEndpointId; + ConfigurationType = configurationType; + } + + /// The fileshare resource ID. + public string Id { get; set; } + /// The private endpoint resource ID. + public string PrivateEndpointId { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MsSqlServerProviderInstanceProperties.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MsSqlServerProviderInstanceProperties.Serialization.cs index 108cb0d876b54..2342ea9afeb19 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MsSqlServerProviderInstanceProperties.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MsSqlServerProviderInstanceProperties.Serialization.cs @@ -46,6 +46,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("sapSid"); writer.WriteStringValue(SapSid); } + if (Optional.IsDefined(SslPreference)) + { + writer.WritePropertyName("sslPreference"); + writer.WriteStringValue(SslPreference.Value.ToString()); + } + if (Optional.IsDefined(SslCertificateUri)) + { + writer.WritePropertyName("sslCertificateUri"); + writer.WriteStringValue(SslCertificateUri.AbsoluteUri); + } writer.WritePropertyName("providerType"); writer.WriteStringValue(ProviderType); writer.WriteEndObject(); @@ -59,6 +69,8 @@ internal static MsSqlServerProviderInstanceProperties DeserializeMsSqlServerProv Optional dbPassword = default; Optional dbPasswordUri = default; Optional sapSid = default; + Optional sslPreference = default; + Optional sslCertificateUri = default; string providerType = default; foreach (var property in element.EnumerateObject()) { @@ -97,13 +109,33 @@ internal static MsSqlServerProviderInstanceProperties DeserializeMsSqlServerProv sapSid = property.Value.GetString(); continue; } + if (property.NameEquals("sslPreference")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sslPreference = new SslPreference(property.Value.GetString()); + continue; + } + if (property.NameEquals("sslCertificateUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sslCertificateUri = null; + continue; + } + sslCertificateUri = new Uri(property.Value.GetString()); + continue; + } if (property.NameEquals("providerType")) { providerType = property.Value.GetString(); continue; } } - return new MsSqlServerProviderInstanceProperties(providerType, hostname.Value, dbPort.Value, dbUsername.Value, dbPassword.Value, dbPasswordUri.Value, sapSid.Value); + return new MsSqlServerProviderInstanceProperties(providerType, hostname.Value, dbPort.Value, dbUsername.Value, dbPassword.Value, dbPasswordUri.Value, sapSid.Value, Optional.ToNullable(sslPreference), sslCertificateUri.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MsSqlServerProviderInstanceProperties.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MsSqlServerProviderInstanceProperties.cs index b2b552792232d..75b5884398a00 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MsSqlServerProviderInstanceProperties.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/MsSqlServerProviderInstanceProperties.cs @@ -26,7 +26,9 @@ public MsSqlServerProviderInstanceProperties() /// Gets or sets the database password. /// Gets or sets the key vault URI to secret with the database password. /// Gets or sets the SAP System Identifier. - internal MsSqlServerProviderInstanceProperties(string providerType, string hostname, string dbPort, string dbUsername, string dbPassword, Uri dbPasswordUri, string sapSid) : base(providerType) + /// Gets or sets certificate preference if secure communication is enabled. + /// Gets or sets the blob URI to SSL certificate for the SQL Database. + internal MsSqlServerProviderInstanceProperties(string providerType, string hostname, string dbPort, string dbUsername, string dbPassword, Uri dbPasswordUri, string sapSid, SslPreference? sslPreference, Uri sslCertificateUri) : base(providerType) { Hostname = hostname; DBPort = dbPort; @@ -34,6 +36,8 @@ internal MsSqlServerProviderInstanceProperties(string providerType, string hostn DBPassword = dbPassword; DBPasswordUri = dbPasswordUri; SapSid = sapSid; + SslPreference = sslPreference; + SslCertificateUri = sslCertificateUri; ProviderType = providerType ?? "MsSqlServer"; } @@ -49,5 +53,9 @@ internal MsSqlServerProviderInstanceProperties(string providerType, string hostn public Uri DBPasswordUri { get; set; } /// Gets or sets the SAP System Identifier. public string SapSid { get; set; } + /// Gets or sets certificate preference if secure communication is enabled. + public SslPreference? SslPreference { get; set; } + /// Gets or sets the blob URI to SSL certificate for the SQL Database. + public Uri SslCertificateUri { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NamingPatternType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NamingPatternType.cs new file mode 100644 index 0000000000000..32a8a1743dc5f --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NamingPatternType.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.Workloads.Models +{ + /// The pattern type to be used for resource naming. + internal readonly partial struct NamingPatternType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NamingPatternType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FullResourceNameValue = "FullResourceName"; + + /// FullResourceName. + public static NamingPatternType FullResourceName { get; } = new NamingPatternType(FullResourceNameValue); + /// Determines if two values are the same. + public static bool operator ==(NamingPatternType left, NamingPatternType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NamingPatternType left, NamingPatternType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NamingPatternType(string value) => new NamingPatternType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NamingPatternType other && Equals(other); + /// + public bool Equals(NamingPatternType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkConfiguration.cs index 11c7ad8072194..658141f22d529 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkConfiguration.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkConfiguration.cs @@ -7,7 +7,7 @@ namespace Azure.ResourceManager.Workloads.Models { - /// Defines the network configuration for SAP infrastructure. + /// Defines the network configuration type for SAP system infrastructure that is being deployed. internal partial class NetworkConfiguration { /// Initializes a new instance of NetworkConfiguration. @@ -16,13 +16,13 @@ public NetworkConfiguration() } /// Initializes a new instance of NetworkConfiguration. - /// Specifies whether a secondary IP address should be added to the network interface on all VMs. + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. internal NetworkConfiguration(bool? isSecondaryIPEnabled) { IsSecondaryIPEnabled = isSecondaryIPEnabled; } - /// Specifies whether a secondary IP address should be added to the network interface on all VMs. + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. public bool? IsSecondaryIPEnabled { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs new file mode 100644 index 0000000000000..f664d71562df3 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkInterfaceResourceNames.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class NetworkInterfaceResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(NetworkInterfaceName)) + { + writer.WritePropertyName("networkInterfaceName"); + writer.WriteStringValue(NetworkInterfaceName); + } + writer.WriteEndObject(); + } + + internal static NetworkInterfaceResourceNames DeserializeNetworkInterfaceResourceNames(JsonElement element) + { + Optional networkInterfaceName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("networkInterfaceName")) + { + networkInterfaceName = property.Value.GetString(); + continue; + } + } + return new NetworkInterfaceResourceNames(networkInterfaceName.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkInterfaceResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkInterfaceResourceNames.cs new file mode 100644 index 0000000000000..39a22c9f74488 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkInterfaceResourceNames.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The resource names object for network interface and related resources. + public partial class NetworkInterfaceResourceNames + { + /// Initializes a new instance of NetworkInterfaceResourceNames. + public NetworkInterfaceResourceNames() + { + } + + /// Initializes a new instance of NetworkInterfaceResourceNames. + /// The full name for network interface. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in case of more than 1 instance per layer. + internal NetworkInterfaceResourceNames(string networkInterfaceName) + { + NetworkInterfaceName = networkInterfaceName; + } + + /// The full name for network interface. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}-Nic. In case of HA-AvZone systems, default name will be {SID}-{App/ASCS/DB}-Zone{A/B}-Nic with an incrementor at the end in case of more than 1 instance per layer. For distributed and HA-AvSet systems, default name will be {SID}-{App/ASCS/DB}-Nic with an incrementor at the end in case of more than 1 instance per layer. + public string NetworkInterfaceName { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkProfile.Serialization.cs deleted file mode 100644 index 18b754a545422..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkProfile.Serialization.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class NetworkProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("loadBalancerType"); - writer.WriteStringValue(LoadBalancerType.ToString()); - if (Optional.IsDefined(LoadBalancerSku)) - { - writer.WritePropertyName("loadBalancerSku"); - writer.WriteStringValue(LoadBalancerSku); - } - if (Optional.IsDefined(LoadBalancerTier)) - { - writer.WritePropertyName("loadBalancerTier"); - writer.WriteStringValue(LoadBalancerTier); - } - if (Optional.IsDefined(Capacity)) - { - writer.WritePropertyName("capacity"); - writer.WriteNumberValue(Capacity.Value); - } - if (Optional.IsDefined(AzureFrontDoorEnabled)) - { - writer.WritePropertyName("azureFrontDoorEnabled"); - writer.WriteStringValue(AzureFrontDoorEnabled.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static NetworkProfile DeserializeNetworkProfile(JsonElement element) - { - LoadBalancerType loadBalancerType = default; - Optional loadBalancerSku = default; - Optional loadBalancerTier = default; - Optional capacity = default; - Optional azureFrontDoorEnabled = default; - Optional vNetResourceId = default; - Optional loadBalancerResourceId = default; - Optional azureFrontDoorResourceId = default; - Optional frontEndPublicIPResourceId = default; - Optional> outboundPublicIPResourceIds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("loadBalancerType")) - { - loadBalancerType = new LoadBalancerType(property.Value.GetString()); - continue; - } - if (property.NameEquals("loadBalancerSku")) - { - loadBalancerSku = property.Value.GetString(); - continue; - } - if (property.NameEquals("loadBalancerTier")) - { - loadBalancerTier = property.Value.GetString(); - continue; - } - if (property.NameEquals("capacity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - capacity = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("azureFrontDoorEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - azureFrontDoorEnabled = new AzureFrontDoorEnabled(property.Value.GetString()); - continue; - } - if (property.NameEquals("vNetResourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - vNetResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("loadBalancerResourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - loadBalancerResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("azureFrontDoorResourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - azureFrontDoorResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("frontEndPublicIpResourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - frontEndPublicIPResourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("outboundPublicIpResourceIds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - outboundPublicIPResourceIds = array; - continue; - } - } - return new NetworkProfile(loadBalancerType, loadBalancerSku.Value, loadBalancerTier.Value, Optional.ToNullable(capacity), Optional.ToNullable(azureFrontDoorEnabled), vNetResourceId.Value, loadBalancerResourceId.Value, azureFrontDoorResourceId.Value, frontEndPublicIPResourceId.Value, Optional.ToList(outboundPublicIPResourceIds)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkProfile.cs deleted file mode 100644 index 7d5f4cf9992d8..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NetworkProfile.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Network profile. - public partial class NetworkProfile - { - /// Initializes a new instance of NetworkProfile. - /// Load balancer type. - public NetworkProfile(LoadBalancerType loadBalancerType) - { - LoadBalancerType = loadBalancerType; - OutboundPublicIPResourceIds = new ChangeTrackingList(); - } - - /// Initializes a new instance of NetworkProfile. - /// Load balancer type. - /// Load balancer SKU. - /// Load balancer tier. - /// Capacity, applicable only for Application Gateway. - /// Whether to enable Azure front door. - /// Virtual network resource Id. - /// Azure Loadbalancer or ApplicationGateway resource Id. - /// Azure front door resource id. - /// Loadbalancer front-end IP address resource Id. - /// List of outbound public IP resource IDs. - internal NetworkProfile(LoadBalancerType loadBalancerType, string loadBalancerSku, string loadBalancerTier, int? capacity, AzureFrontDoorEnabled? azureFrontDoorEnabled, ResourceIdentifier vNetResourceId, ResourceIdentifier loadBalancerResourceId, ResourceIdentifier azureFrontDoorResourceId, ResourceIdentifier frontEndPublicIPResourceId, IReadOnlyList outboundPublicIPResourceIds) - { - LoadBalancerType = loadBalancerType; - LoadBalancerSku = loadBalancerSku; - LoadBalancerTier = loadBalancerTier; - Capacity = capacity; - AzureFrontDoorEnabled = azureFrontDoorEnabled; - VNetResourceId = vNetResourceId; - LoadBalancerResourceId = loadBalancerResourceId; - AzureFrontDoorResourceId = azureFrontDoorResourceId; - FrontEndPublicIPResourceId = frontEndPublicIPResourceId; - OutboundPublicIPResourceIds = outboundPublicIPResourceIds; - } - - /// Load balancer type. - public LoadBalancerType LoadBalancerType { get; set; } - /// Load balancer SKU. - public string LoadBalancerSku { get; set; } - /// Load balancer tier. - public string LoadBalancerTier { get; set; } - /// Capacity, applicable only for Application Gateway. - public int? Capacity { get; set; } - /// Whether to enable Azure front door. - public AzureFrontDoorEnabled? AzureFrontDoorEnabled { get; set; } - /// Virtual network resource Id. - public ResourceIdentifier VNetResourceId { get; } - /// Azure Loadbalancer or ApplicationGateway resource Id. - public ResourceIdentifier LoadBalancerResourceId { get; } - /// Azure front door resource id. - public ResourceIdentifier AzureFrontDoorResourceId { get; } - /// Loadbalancer front-end IP address resource Id. - public ResourceIdentifier FrontEndPublicIPResourceId { get; } - /// List of outbound public IP resource IDs. - public IReadOnlyList OutboundPublicIPResourceIds { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NodeProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NodeProfile.Serialization.cs deleted file mode 100644 index 733851165949a..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NodeProfile.Serialization.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class NodeProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("nodeSku"); - writer.WriteStringValue(NodeSku); - writer.WritePropertyName("osImage"); - writer.WriteObjectValue(OSImage); - writer.WritePropertyName("osDisk"); - writer.WriteObjectValue(OSDisk); - if (Optional.IsCollectionDefined(DataDisks)) - { - writer.WritePropertyName("dataDisks"); - writer.WriteStartArray(); - foreach (var item in DataDisks) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static NodeProfile DeserializeNodeProfile(JsonElement element) - { - Optional name = default; - string nodeSku = default; - OSImageProfile osImage = default; - DiskInfo osDisk = default; - Optional> dataDisks = default; - Optional> nodeResourceIds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("nodeSku")) - { - nodeSku = property.Value.GetString(); - continue; - } - if (property.NameEquals("osImage")) - { - osImage = OSImageProfile.DeserializeOSImageProfile(property.Value); - continue; - } - if (property.NameEquals("osDisk")) - { - osDisk = DiskInfo.DeserializeDiskInfo(property.Value); - continue; - } - if (property.NameEquals("dataDisks")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiskInfo.DeserializeDiskInfo(item)); - } - dataDisks = array; - continue; - } - if (property.NameEquals("nodeResourceIds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new ResourceIdentifier(item.GetString())); - } - nodeResourceIds = array; - continue; - } - } - return new NodeProfile(name.Value, nodeSku, osImage, osDisk, Optional.ToList(dataDisks), Optional.ToList(nodeResourceIds)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NodeProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NodeProfile.cs deleted file mode 100644 index 14b5dfc690bfa..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/NodeProfile.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// VM or VMSS node profile. - public partial class NodeProfile - { - /// Initializes a new instance of NodeProfile. - /// VM SKU for node(s). - /// OS image used for creating the nodes. - /// OS disk details. - /// , or is null. - public NodeProfile(string nodeSku, OSImageProfile osImage, DiskInfo osDisk) - { - Argument.AssertNotNull(nodeSku, nameof(nodeSku)); - Argument.AssertNotNull(osImage, nameof(osImage)); - Argument.AssertNotNull(osDisk, nameof(osDisk)); - - NodeSku = nodeSku; - OSImage = osImage; - OSDisk = osDisk; - DataDisks = new ChangeTrackingList(); - NodeResourceIds = new ChangeTrackingList(); - } - - /// Initializes a new instance of NodeProfile. - /// VM or VMSS name. - /// VM SKU for node(s). - /// OS image used for creating the nodes. - /// OS disk details. - /// Data disks details. This property is not in use right now. - /// VM/VMSS resource ARM Ids. - internal NodeProfile(string name, string nodeSku, OSImageProfile osImage, DiskInfo osDisk, IList dataDisks, IReadOnlyList nodeResourceIds) - { - Name = name; - NodeSku = nodeSku; - OSImage = osImage; - OSDisk = osDisk; - DataDisks = dataDisks; - NodeResourceIds = nodeResourceIds; - } - - /// VM or VMSS name. - public string Name { get; set; } - /// VM SKU for node(s). - public string NodeSku { get; set; } - /// OS image used for creating the nodes. - public OSImageProfile OSImage { get; set; } - /// OS disk details. - public DiskInfo OSDisk { get; set; } - /// Data disks details. This property is not in use right now. - public IList DataDisks { get; } - /// VM/VMSS resource ARM Ids. - public IReadOnlyList NodeResourceIds { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageOffer.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageOffer.cs deleted file mode 100644 index 4719501fd3e9e..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageOffer.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.Workloads.Models -{ - /// OS image offer. - public readonly partial struct OSImageOffer : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OSImageOffer(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UbuntuServerValue = "UbuntuServer"; - - /// UbuntuServer. - public static OSImageOffer UbuntuServer { get; } = new OSImageOffer(UbuntuServerValue); - /// Determines if two values are the same. - public static bool operator ==(OSImageOffer left, OSImageOffer right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OSImageOffer left, OSImageOffer right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OSImageOffer(string value) => new OSImageOffer(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OSImageOffer other && Equals(other); - /// - public bool Equals(OSImageOffer other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageProfile.Serialization.cs deleted file mode 100644 index 3f62979a0fefc..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageProfile.Serialization.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class OSImageProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Publisher)) - { - writer.WritePropertyName("publisher"); - writer.WriteStringValue(Publisher.Value.ToString()); - } - if (Optional.IsDefined(Offer)) - { - writer.WritePropertyName("offer"); - writer.WriteStringValue(Offer.Value.ToString()); - } - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"); - writer.WriteStringValue(Sku.Value.ToString()); - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static OSImageProfile DeserializeOSImageProfile(JsonElement element) - { - Optional publisher = default; - Optional offer = default; - Optional sku = default; - Optional version = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("publisher")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - publisher = new OSImagePublisher(property.Value.GetString()); - continue; - } - if (property.NameEquals("offer")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - offer = new OSImageOffer(property.Value.GetString()); - continue; - } - if (property.NameEquals("sku")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sku = new OSImageSku(property.Value.GetString()); - continue; - } - if (property.NameEquals("version")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - version = new OSImageVersion(property.Value.GetString()); - continue; - } - } - return new OSImageProfile(Optional.ToNullable(publisher), Optional.ToNullable(offer), Optional.ToNullable(sku), Optional.ToNullable(version)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageProfile.cs deleted file mode 100644 index 3ea4ed7df53b3..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageProfile.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Workloads.Models -{ - /// OS image profile. - public partial class OSImageProfile - { - /// Initializes a new instance of OSImageProfile. - public OSImageProfile() - { - } - - /// Initializes a new instance of OSImageProfile. - /// OS image publisher. - /// OS image offer. - /// OS image sku. - /// OS image version. - internal OSImageProfile(OSImagePublisher? publisher, OSImageOffer? offer, OSImageSku? sku, OSImageVersion? version) - { - Publisher = publisher; - Offer = offer; - Sku = sku; - Version = version; - } - - /// OS image publisher. - public OSImagePublisher? Publisher { get; set; } - /// OS image offer. - public OSImageOffer? Offer { get; set; } - /// OS image sku. - public OSImageSku? Sku { get; set; } - /// OS image version. - public OSImageVersion? Version { get; set; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImagePublisher.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImagePublisher.cs deleted file mode 100644 index acd12c3c0eb8c..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImagePublisher.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.Workloads.Models -{ - /// OS image publisher. - public readonly partial struct OSImagePublisher : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OSImagePublisher(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CanonicalValue = "Canonical"; - - /// Canonical. - public static OSImagePublisher Canonical { get; } = new OSImagePublisher(CanonicalValue); - /// Determines if two values are the same. - public static bool operator ==(OSImagePublisher left, OSImagePublisher right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OSImagePublisher left, OSImagePublisher right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OSImagePublisher(string value) => new OSImagePublisher(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OSImagePublisher other && Equals(other); - /// - public bool Equals(OSImagePublisher other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageSku.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageSku.cs deleted file mode 100644 index 06549518a5f1a..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageSku.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// OS image sku. - public readonly partial struct OSImageSku : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OSImageSku(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string Ubuntu18_04LtsValue = "18.04-LTS"; - private const string Ubuntu16_04LtsValue = "16.04-LTS"; - /// Determines if two values are the same. - public static bool operator ==(OSImageSku left, OSImageSku right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OSImageSku left, OSImageSku right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OSImageSku(string value) => new OSImageSku(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OSImageSku other && Equals(other); - /// - public bool Equals(OSImageSku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageVersion.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageVersion.cs deleted file mode 100644 index 5fbc359922314..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/OSImageVersion.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.Workloads.Models -{ - /// OS image version. - public readonly partial struct OSImageVersion : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OSImageVersion(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string LatestValue = "latest"; - - /// latest. - public static OSImageVersion Latest { get; } = new OSImageVersion(LatestValue); - /// Determines if two values are the same. - public static bool operator ==(OSImageVersion left, OSImageVersion right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OSImageVersion left, OSImageVersion right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OSImageVersion(string value) => new OSImageVersion(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OSImageVersion other && Equals(other); - /// - public bool Equals(OSImageVersion other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PatchResourceRequestBodyIdentity.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PatchResourceRequestBodyIdentity.Serialization.cs deleted file mode 100644 index f62aad382e71c..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PatchResourceRequestBodyIdentity.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class PatchResourceRequestBodyIdentity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue(ManagedServiceIdentityType.ToString()); - if (Optional.IsCollectionDefined(UserAssignedIdentities)) - { - writer.WritePropertyName("userAssignedIdentities"); - writer.WriteStartObject(); - foreach (var item in UserAssignedIdentities) - { - writer.WritePropertyName(item.Key); - JsonSerializer.Serialize(writer, item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static PatchResourceRequestBodyIdentity DeserializePatchResourceRequestBodyIdentity(JsonElement element) - { - ManagedServiceIdentityType type = default; - Optional> userAssignedIdentities = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type")) - { - type = new ManagedServiceIdentityType(property.Value.GetString()); - continue; - } - if (property.NameEquals("userAssignedIdentities")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize(property0.Value.GetRawText())); - } - userAssignedIdentities = dictionary; - continue; - } - } - return new PatchResourceRequestBodyIdentity(type, Optional.ToDictionary(userAssignedIdentities)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PatchResourceRequestBodyIdentity.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PatchResourceRequestBodyIdentity.cs deleted file mode 100644 index 0e7b45c715534..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PatchResourceRequestBodyIdentity.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// The PatchResourceRequestBodyIdentity. - public partial class PatchResourceRequestBodyIdentity : UserAssignedServiceIdentity - { - /// Initializes a new instance of PatchResourceRequestBodyIdentity. - /// Type of manage identity. - public PatchResourceRequestBodyIdentity(ManagedServiceIdentityType managedServiceIdentityType) : base(managedServiceIdentityType) - { - } - - /// Initializes a new instance of PatchResourceRequestBodyIdentity. - /// Type of manage identity. - /// User assigned identities dictionary. - internal PatchResourceRequestBodyIdentity(ManagedServiceIdentityType managedServiceIdentityType, IDictionary userAssignedIdentities) : base(managedServiceIdentityType, userAssignedIdentities) - { - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpProfile.Serialization.cs deleted file mode 100644 index b35a8f0271abc..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpProfile.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - internal partial class PhpProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("version"); - writer.WriteStringValue(Version.ToString()); - writer.WriteEndObject(); - } - - internal static PhpProfile DeserializePhpProfile(JsonElement element) - { - PhpVersion version = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("version")) - { - version = new PhpVersion(property.Value.GetString()); - continue; - } - } - return new PhpProfile(version); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpProfile.cs deleted file mode 100644 index 9e4c83b55007e..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpProfile.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Workloads.Models -{ - /// PHP profile. - internal partial class PhpProfile - { - /// Initializes a new instance of PhpProfile. - /// PHP version. - public PhpProfile(PhpVersion version) - { - Version = version; - } - - /// PHP version. - public PhpVersion Version { get; set; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpVersion.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpVersion.cs deleted file mode 100644 index e461ffd34bb12..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpVersion.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// PHP version. - public readonly partial struct PhpVersion : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PhpVersion(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string V7_2Value = "7.2"; - private const string V7_3Value = "7.3"; - private const string V7_4Value = "7.4"; - /// Determines if two values are the same. - public static bool operator ==(PhpVersion left, PhpVersion right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PhpVersion left, PhpVersion right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PhpVersion(string value) => new PhpVersion(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PhpVersion other && Equals(other); - /// - public bool Equals(PhpVersion other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadProvisioningState.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadProvisioningState.cs deleted file mode 100644 index 230d7e8b91bff..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadProvisioningState.cs +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Php workload resource provisioning state. - public readonly partial struct PhpWorkloadProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PhpWorkloadProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotSpecifiedValue = "NotSpecified"; - private const string AcceptedValue = "Accepted"; - private const string CreatedValue = "Created"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - private const string ProvisioningValue = "Provisioning"; - private const string DeletingValue = "Deleting"; - - /// NotSpecified. - public static PhpWorkloadProvisioningState NotSpecified { get; } = new PhpWorkloadProvisioningState(NotSpecifiedValue); - /// Accepted. - public static PhpWorkloadProvisioningState Accepted { get; } = new PhpWorkloadProvisioningState(AcceptedValue); - /// Created. - public static PhpWorkloadProvisioningState Created { get; } = new PhpWorkloadProvisioningState(CreatedValue); - /// Succeeded. - public static PhpWorkloadProvisioningState Succeeded { get; } = new PhpWorkloadProvisioningState(SucceededValue); - /// Failed. - public static PhpWorkloadProvisioningState Failed { get; } = new PhpWorkloadProvisioningState(FailedValue); - /// Canceled. - public static PhpWorkloadProvisioningState Canceled { get; } = new PhpWorkloadProvisioningState(CanceledValue); - /// Provisioning. - public static PhpWorkloadProvisioningState Provisioning { get; } = new PhpWorkloadProvisioningState(ProvisioningValue); - /// Deleting. - public static PhpWorkloadProvisioningState Deleting { get; } = new PhpWorkloadProvisioningState(DeletingValue); - /// Determines if two values are the same. - public static bool operator ==(PhpWorkloadProvisioningState left, PhpWorkloadProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PhpWorkloadProvisioningState left, PhpWorkloadProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PhpWorkloadProvisioningState(string value) => new PhpWorkloadProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PhpWorkloadProvisioningState other && Equals(other); - /// - public bool Equals(PhpWorkloadProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceData.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceData.Serialization.cs deleted file mode 100644 index 349fa64966735..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceData.Serialization.cs +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Workloads.Models; - -namespace Azure.ResourceManager.Workloads -{ - public partial class PhpWorkloadResourceData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("kind"); - writer.WriteStringValue(Kind.ToString()); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"); - writer.WriteObjectValue(Sku); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - writer.WriteObjectValue(Identity); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - if (Optional.IsDefined(AppLocation)) - { - writer.WritePropertyName("appLocation"); - writer.WriteStringValue(AppLocation.Value); - } - if (Optional.IsDefined(ManagedResourceGroupConfiguration)) - { - writer.WritePropertyName("managedResourceGroupConfiguration"); - writer.WriteObjectValue(ManagedResourceGroupConfiguration); - } - if (Optional.IsDefined(AdminUserProfile)) - { - writer.WritePropertyName("adminUserProfile"); - writer.WriteObjectValue(AdminUserProfile); - } - if (Optional.IsDefined(WebNodesProfile)) - { - writer.WritePropertyName("webNodesProfile"); - writer.WriteObjectValue(WebNodesProfile); - } - if (Optional.IsDefined(ControllerProfile)) - { - writer.WritePropertyName("controllerProfile"); - writer.WriteObjectValue(ControllerProfile); - } - if (Optional.IsDefined(NetworkProfile)) - { - writer.WritePropertyName("networkProfile"); - writer.WriteObjectValue(NetworkProfile); - } - if (Optional.IsDefined(DatabaseProfile)) - { - writer.WritePropertyName("databaseProfile"); - writer.WriteObjectValue(DatabaseProfile); - } - if (Optional.IsDefined(SiteProfile)) - { - writer.WritePropertyName("siteProfile"); - writer.WriteObjectValue(SiteProfile); - } - if (Optional.IsDefined(FileshareProfile)) - { - writer.WritePropertyName("fileshareProfile"); - writer.WriteObjectValue(FileshareProfile); - } - if (Optional.IsDefined(PhpProfile)) - { - writer.WritePropertyName("phpProfile"); - writer.WriteObjectValue(PhpProfile); - } - if (Optional.IsDefined(SearchProfile)) - { - writer.WritePropertyName("searchProfile"); - writer.WriteObjectValue(SearchProfile); - } - if (Optional.IsDefined(CacheProfile)) - { - writer.WritePropertyName("cacheProfile"); - writer.WriteObjectValue(CacheProfile); - } - if (Optional.IsDefined(BackupProfile)) - { - writer.WritePropertyName("backupProfile"); - writer.WriteObjectValue(BackupProfile); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static PhpWorkloadResourceData DeserializePhpWorkloadResourceData(JsonElement element) - { - WorkloadKind kind = default; - Optional sku = default; - Optional identity = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - Optional appLocation = default; - Optional managedResourceGroupConfiguration = default; - Optional adminUserProfile = default; - Optional webNodesProfile = default; - Optional controllerProfile = default; - Optional networkProfile = default; - Optional databaseProfile = default; - Optional siteProfile = default; - Optional fileshareProfile = default; - Optional phpProfile = default; - Optional searchProfile = default; - Optional cacheProfile = default; - Optional backupProfile = default; - Optional provisioningState = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("kind")) - { - kind = new WorkloadKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("sku")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sku = WorkloadsSku.DeserializeWorkloadsSku(property.Value); - continue; - } - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - identity = PhpWorkloadResourceIdentity.DeserializePhpWorkloadResourceIdentity(property.Value); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location")) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("appLocation")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - appLocation = new AzureLocation(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("managedResourceGroupConfiguration")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - managedResourceGroupConfiguration = ManagedRGConfiguration.DeserializeManagedRGConfiguration(property0.Value); - continue; - } - if (property0.NameEquals("adminUserProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - adminUserProfile = UserProfile.DeserializeUserProfile(property0.Value); - continue; - } - if (property0.NameEquals("webNodesProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - webNodesProfile = VmssNodesProfile.DeserializeVmssNodesProfile(property0.Value); - continue; - } - if (property0.NameEquals("controllerProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - controllerProfile = NodeProfile.DeserializeNodeProfile(property0.Value); - continue; - } - if (property0.NameEquals("networkProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - networkProfile = NetworkProfile.DeserializeNetworkProfile(property0.Value); - continue; - } - if (property0.NameEquals("databaseProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - databaseProfile = DatabaseProfile.DeserializeDatabaseProfile(property0.Value); - continue; - } - if (property0.NameEquals("siteProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - siteProfile = SiteProfile.DeserializeSiteProfile(property0.Value); - continue; - } - if (property0.NameEquals("fileshareProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - fileshareProfile = FileshareProfile.DeserializeFileshareProfile(property0.Value); - continue; - } - if (property0.NameEquals("phpProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - phpProfile = PhpProfile.DeserializePhpProfile(property0.Value); - continue; - } - if (property0.NameEquals("searchProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - searchProfile = SearchProfile.DeserializeSearchProfile(property0.Value); - continue; - } - if (property0.NameEquals("cacheProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - cacheProfile = CacheProfile.DeserializeCacheProfile(property0.Value); - continue; - } - if (property0.NameEquals("backupProfile")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - backupProfile = BackupProfile.DeserializeBackupProfile(property0.Value); - continue; - } - if (property0.NameEquals("provisioningState")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new PhpWorkloadProvisioningState(property0.Value.GetString()); - continue; - } - } - continue; - } - } - return new PhpWorkloadResourceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, kind, sku.Value, identity.Value, Optional.ToNullable(appLocation), managedResourceGroupConfiguration.Value, adminUserProfile.Value, webNodesProfile.Value, controllerProfile.Value, networkProfile.Value, databaseProfile.Value, siteProfile.Value, fileshareProfile.Value, phpProfile.Value, searchProfile.Value, cacheProfile.Value, backupProfile.Value, Optional.ToNullable(provisioningState)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceIdentity.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceIdentity.Serialization.cs deleted file mode 100644 index 10a453d1d2647..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceIdentity.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class PhpWorkloadResourceIdentity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("type"); - writer.WriteStringValue(ManagedServiceIdentityType.ToString()); - if (Optional.IsCollectionDefined(UserAssignedIdentities)) - { - writer.WritePropertyName("userAssignedIdentities"); - writer.WriteStartObject(); - foreach (var item in UserAssignedIdentities) - { - writer.WritePropertyName(item.Key); - JsonSerializer.Serialize(writer, item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static PhpWorkloadResourceIdentity DeserializePhpWorkloadResourceIdentity(JsonElement element) - { - ManagedServiceIdentityType type = default; - Optional> userAssignedIdentities = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type")) - { - type = new ManagedServiceIdentityType(property.Value.GetString()); - continue; - } - if (property.NameEquals("userAssignedIdentities")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, JsonSerializer.Deserialize(property0.Value.GetRawText())); - } - userAssignedIdentities = dictionary; - continue; - } - } - return new PhpWorkloadResourceIdentity(type, Optional.ToDictionary(userAssignedIdentities)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceIdentity.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceIdentity.cs deleted file mode 100644 index 651166f9aa210..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceIdentity.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Identity for the resource. Currently not supported. - public partial class PhpWorkloadResourceIdentity : UserAssignedServiceIdentity - { - /// Initializes a new instance of PhpWorkloadResourceIdentity. - /// Type of manage identity. - public PhpWorkloadResourceIdentity(ManagedServiceIdentityType managedServiceIdentityType) : base(managedServiceIdentityType) - { - } - - /// Initializes a new instance of PhpWorkloadResourceIdentity. - /// Type of manage identity. - /// User assigned identities dictionary. - internal PhpWorkloadResourceIdentity(ManagedServiceIdentityType managedServiceIdentityType, IDictionary userAssignedIdentities) : base(managedServiceIdentityType, userAssignedIdentities) - { - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceList.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceList.cs deleted file mode 100644 index d6226f39a175d..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceList.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Workloads; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Php workload resource list. - internal partial class PhpWorkloadResourceList - { - /// Initializes a new instance of PhpWorkloadResourceList. - internal PhpWorkloadResourceList() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of PhpWorkloadResourceList. - /// List of resources in current page. - /// Link to next page of resources. - internal PhpWorkloadResourceList(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of resources in current page. - public IReadOnlyList Value { get; } - /// Link to next page of resources. - public string NextLink { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourcePatch.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourcePatch.Serialization.cs deleted file mode 100644 index 45cf125f33a96..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourcePatch.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class PhpWorkloadResourcePatch : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - writer.WriteObjectValue(Identity); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourcePatch.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourcePatch.cs deleted file mode 100644 index 703f8621f2cfb..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourcePatch.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Resource patch request body. - public partial class PhpWorkloadResourcePatch - { - /// Initializes a new instance of PhpWorkloadResourcePatch. - public PhpWorkloadResourcePatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Resource tags. - public IDictionary Tags { get; } - /// Gets or sets the identity. - public PatchResourceRequestBodyIdentity Identity { get; set; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusHAClusterProviderInstanceProperties.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusHAClusterProviderInstanceProperties.Serialization.cs index 69122a1d7464a..78e61513453d3 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusHAClusterProviderInstanceProperties.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusHAClusterProviderInstanceProperties.Serialization.cs @@ -36,6 +36,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("clusterName"); writer.WriteStringValue(ClusterName); } + if (Optional.IsDefined(SslPreference)) + { + writer.WritePropertyName("sslPreference"); + writer.WriteStringValue(SslPreference.Value.ToString()); + } + if (Optional.IsDefined(SslCertificateUri)) + { + writer.WritePropertyName("sslCertificateUri"); + writer.WriteStringValue(SslCertificateUri.AbsoluteUri); + } writer.WritePropertyName("providerType"); writer.WriteStringValue(ProviderType); writer.WriteEndObject(); @@ -47,6 +57,8 @@ internal static PrometheusHAClusterProviderInstanceProperties DeserializePrometh Optional hostname = default; Optional sid = default; Optional clusterName = default; + Optional sslPreference = default; + Optional sslCertificateUri = default; string providerType = default; foreach (var property in element.EnumerateObject()) { @@ -75,13 +87,33 @@ internal static PrometheusHAClusterProviderInstanceProperties DeserializePrometh clusterName = property.Value.GetString(); continue; } + if (property.NameEquals("sslPreference")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sslPreference = new SslPreference(property.Value.GetString()); + continue; + } + if (property.NameEquals("sslCertificateUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sslCertificateUri = null; + continue; + } + sslCertificateUri = new Uri(property.Value.GetString()); + continue; + } if (property.NameEquals("providerType")) { providerType = property.Value.GetString(); continue; } } - return new PrometheusHAClusterProviderInstanceProperties(providerType, prometheusUrl.Value, hostname.Value, sid.Value, clusterName.Value); + return new PrometheusHAClusterProviderInstanceProperties(providerType, prometheusUrl.Value, hostname.Value, sid.Value, clusterName.Value, Optional.ToNullable(sslPreference), sslCertificateUri.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusHAClusterProviderInstanceProperties.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusHAClusterProviderInstanceProperties.cs index 19535a537583f..7dde038aaae79 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusHAClusterProviderInstanceProperties.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusHAClusterProviderInstanceProperties.cs @@ -24,12 +24,16 @@ public PrometheusHAClusterProviderInstanceProperties() /// Gets or sets the target machine name. /// Gets or sets the cluster sid. /// Gets or sets the clusterName. - internal PrometheusHAClusterProviderInstanceProperties(string providerType, Uri prometheusUri, string hostname, string sid, string clusterName) : base(providerType) + /// Gets or sets certificate preference if secure communication is enabled. + /// Gets or sets the blob URI to SSL certificate for the HA cluster exporter. + internal PrometheusHAClusterProviderInstanceProperties(string providerType, Uri prometheusUri, string hostname, string sid, string clusterName, SslPreference? sslPreference, Uri sslCertificateUri) : base(providerType) { PrometheusUri = prometheusUri; Hostname = hostname; Sid = sid; ClusterName = clusterName; + SslPreference = sslPreference; + SslCertificateUri = sslCertificateUri; ProviderType = providerType ?? "PrometheusHaCluster"; } @@ -41,5 +45,9 @@ internal PrometheusHAClusterProviderInstanceProperties(string providerType, Uri public string Sid { get; set; } /// Gets or sets the clusterName. public string ClusterName { get; set; } + /// Gets or sets certificate preference if secure communication is enabled. + public SslPreference? SslPreference { get; set; } + /// Gets or sets the blob URI to SSL certificate for the HA cluster exporter. + public Uri SslCertificateUri { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusOSProviderInstanceProperties.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusOSProviderInstanceProperties.Serialization.cs index 6323a71c8291e..c5f2427b832f4 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusOSProviderInstanceProperties.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusOSProviderInstanceProperties.Serialization.cs @@ -21,6 +21,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("prometheusUrl"); writer.WriteStringValue(PrometheusUri.AbsoluteUri); } + if (Optional.IsDefined(SslPreference)) + { + writer.WritePropertyName("sslPreference"); + writer.WriteStringValue(SslPreference.Value.ToString()); + } + if (Optional.IsDefined(SslCertificateUri)) + { + writer.WritePropertyName("sslCertificateUri"); + writer.WriteStringValue(SslCertificateUri.AbsoluteUri); + } + if (Optional.IsDefined(SapSid)) + { + writer.WritePropertyName("sapSid"); + writer.WriteStringValue(SapSid); + } writer.WritePropertyName("providerType"); writer.WriteStringValue(ProviderType); writer.WriteEndObject(); @@ -29,6 +44,9 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static PrometheusOSProviderInstanceProperties DeserializePrometheusOSProviderInstanceProperties(JsonElement element) { Optional prometheusUrl = default; + Optional sslPreference = default; + Optional sslCertificateUri = default; + Optional sapSid = default; string providerType = default; foreach (var property in element.EnumerateObject()) { @@ -42,13 +60,38 @@ internal static PrometheusOSProviderInstanceProperties DeserializePrometheusOSPr prometheusUrl = new Uri(property.Value.GetString()); continue; } + if (property.NameEquals("sslPreference")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sslPreference = new SslPreference(property.Value.GetString()); + continue; + } + if (property.NameEquals("sslCertificateUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sslCertificateUri = null; + continue; + } + sslCertificateUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("sapSid")) + { + sapSid = property.Value.GetString(); + continue; + } if (property.NameEquals("providerType")) { providerType = property.Value.GetString(); continue; } } - return new PrometheusOSProviderInstanceProperties(providerType, prometheusUrl.Value); + return new PrometheusOSProviderInstanceProperties(providerType, prometheusUrl.Value, Optional.ToNullable(sslPreference), sslCertificateUri.Value, sapSid.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusOSProviderInstanceProperties.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusOSProviderInstanceProperties.cs index 8f8e994e7e261..cac72fa8de292 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusOSProviderInstanceProperties.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PrometheusOSProviderInstanceProperties.cs @@ -21,13 +21,25 @@ public PrometheusOSProviderInstanceProperties() /// Initializes a new instance of PrometheusOSProviderInstanceProperties. /// The provider type. For example, the value can be SapHana. /// URL of the Node Exporter endpoint. - internal PrometheusOSProviderInstanceProperties(string providerType, Uri prometheusUri) : base(providerType) + /// Gets or sets certificate preference if secure communication is enabled. + /// Gets or sets the blob URI to SSL certificate for the prometheus node exporter. + /// Gets or sets the SAP System Identifier. + internal PrometheusOSProviderInstanceProperties(string providerType, Uri prometheusUri, SslPreference? sslPreference, Uri sslCertificateUri, string sapSid) : base(providerType) { PrometheusUri = prometheusUri; + SslPreference = sslPreference; + SslCertificateUri = sslCertificateUri; + SapSid = sapSid; ProviderType = providerType ?? "PrometheusOS"; } /// URL of the Node Exporter endpoint. public Uri PrometheusUri { get; set; } + /// Gets or sets certificate preference if secure communication is enabled. + public SslPreference? SslPreference { get; set; } + /// Gets or sets the blob URI to SSL certificate for the prometheus node exporter. + public Uri SslCertificateUri { get; set; } + /// Gets or sets the SAP System Identifier. + public string SapSid { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RedisCacheFamily.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RedisCacheFamily.cs deleted file mode 100644 index 4fde4b2b13b6f..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RedisCacheFamily.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.Workloads.Models -{ - /// Cache family. - public readonly partial struct RedisCacheFamily : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RedisCacheFamily(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CValue = "C"; - private const string PValue = "P"; - - /// C. - public static RedisCacheFamily C { get; } = new RedisCacheFamily(CValue); - /// P. - public static RedisCacheFamily P { get; } = new RedisCacheFamily(PValue); - /// Determines if two values are the same. - public static bool operator ==(RedisCacheFamily left, RedisCacheFamily right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RedisCacheFamily left, RedisCacheFamily right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RedisCacheFamily(string value) => new RedisCacheFamily(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RedisCacheFamily other && Equals(other); - /// - public bool Equals(RedisCacheFamily other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RestrictionInfo.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RestrictionInfo.Serialization.cs deleted file mode 100644 index 93372c1a70b17..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RestrictionInfo.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class RestrictionInfo - { - internal static RestrictionInfo DeserializeRestrictionInfo(JsonElement element) - { - Optional> locations = default; - Optional> zones = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("locations")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new AzureLocation(item.GetString())); - } - locations = array; - continue; - } - if (property.NameEquals("zones")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - zones = array; - continue; - } - } - return new RestrictionInfo(Optional.ToList(locations), Optional.ToList(zones)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RestrictionInfo.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RestrictionInfo.cs deleted file mode 100644 index 86d9f03ff5055..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/RestrictionInfo.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// The SKU restriction information. - public partial class RestrictionInfo - { - /// Initializes a new instance of RestrictionInfo. - internal RestrictionInfo() - { - Locations = new ChangeTrackingList(); - Zones = new ChangeTrackingList(); - } - - /// Initializes a new instance of RestrictionInfo. - /// The restriction locations. - /// The restriction zones. - internal RestrictionInfo(IReadOnlyList locations, IReadOnlyList zones) - { - Locations = locations; - Zones = zones; - } - - /// The restriction locations. - public IReadOnlyList Locations { get; } - /// The restriction zones. - public IReadOnlyList Zones { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapApplicationServerInstanceData.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapApplicationServerInstanceData.Serialization.cs index c89255877d8bb..69565b64be094 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapApplicationServerInstanceData.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapApplicationServerInstanceData.Serialization.cs @@ -9,6 +9,7 @@ using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; using Azure.ResourceManager.Workloads.Models; namespace Azure.ResourceManager.Workloads @@ -54,7 +55,8 @@ internal static SapApplicationServerInstanceData DeserializeSapApplicationServer Optional gatewayPort = default; Optional icmHttpPort = default; Optional icmHttpsPort = default; - Optional virtualMachineId = default; + Optional loadBalancerDetails = default; + Optional> vmDetails = default; Optional status = default; Optional health = default; Optional provisioningState = default; @@ -180,14 +182,29 @@ internal static SapApplicationServerInstanceData DeserializeSapApplicationServer icmHttpsPort = property0.Value.GetInt64(); continue; } - if (property0.NameEquals("virtualMachineId")) + if (property0.NameEquals("loadBalancerDetails")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } - virtualMachineId = new ResourceIdentifier(property0.Value.GetString()); + loadBalancerDetails = JsonSerializer.Deserialize(property0.Value.GetRawText()); + continue; + } + if (property0.NameEquals("vmDetails")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(ApplicationServerVmDetails.DeserializeApplicationServerVmDetails(item)); + } + vmDetails = array; continue; } if (property0.NameEquals("status")) @@ -234,7 +251,7 @@ internal static SapApplicationServerInstanceData DeserializeSapApplicationServer continue; } } - return new SapApplicationServerInstanceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, instanceNo.Value, subnet.Value, hostname.Value, kernelVersion.Value, kernelPatch.Value, ipAddress.Value, Optional.ToNullable(gatewayPort), Optional.ToNullable(icmHttpPort), Optional.ToNullable(icmHttpsPort), virtualMachineId.Value, Optional.ToNullable(status), Optional.ToNullable(health), Optional.ToNullable(provisioningState), errors.Value); + return new SapApplicationServerInstanceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, instanceNo.Value, subnet.Value, hostname.Value, kernelVersion.Value, kernelPatch.Value, ipAddress.Value, Optional.ToNullable(gatewayPort), Optional.ToNullable(icmHttpPort), Optional.ToNullable(icmHttpsPort), loadBalancerDetails, Optional.ToList(vmDetails), Optional.ToNullable(status), Optional.ToNullable(health), Optional.ToNullable(provisioningState), errors.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapApplicationServerInstanceList.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapApplicationServerInstanceList.cs index 2e8f7406990ff..e1237ad446eb5 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapApplicationServerInstanceList.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapApplicationServerInstanceList.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Workloads.Models { - /// Defines the collection of SAP Application Server Instances. + /// Defines the collection of SAP Application Server Instance resources. internal partial class SapApplicationServerInstanceList { /// Initializes a new instance of SapApplicationServerInstanceList. @@ -21,7 +21,7 @@ internal SapApplicationServerInstanceList() } /// Initializes a new instance of SapApplicationServerInstanceList. - /// Gets the list of SAP Application Server instances. + /// Gets the list of SAP Application Server instance resources. /// Gets the value of next link. internal SapApplicationServerInstanceList(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal SapApplicationServerInstanceList(IReadOnlyList Gets the list of SAP Application Server instances. + /// Gets the list of SAP Application Server instance resources. public IReadOnlyList Value { get; } /// Gets the value of next link. public string NextLink { get; } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapCentralInstanceList.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapCentralInstanceList.cs index 50c81f0ab6fb8..5dd98cf4bfbbf 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapCentralInstanceList.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapCentralInstanceList.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Workloads.Models { - /// Defines the collection of SAP Central Instances. + /// Defines the collection of SAP Central Services Instance resources. internal partial class SapCentralInstanceList { /// Initializes a new instance of SapCentralInstanceList. @@ -21,7 +21,7 @@ internal SapCentralInstanceList() } /// Initializes a new instance of SapCentralInstanceList. - /// Gets the list of SAP central instances. + /// Gets the list of SAP central services instance resources. /// Gets the value of next link. internal SapCentralInstanceList(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal SapCentralInstanceList(IReadOnlyList valu NextLink = nextLink; } - /// Gets the list of SAP central instances. + /// Gets the list of SAP central services instance resources. public IReadOnlyList Value { get; } /// Gets the value of next link. public string NextLink { get; } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapCentralServerInstanceData.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapCentralServerInstanceData.Serialization.cs index ce78bec29fa18..59c3d40481f9a 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapCentralServerInstanceData.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapCentralServerInstanceData.Serialization.cs @@ -9,6 +9,7 @@ using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; using Azure.ResourceManager.Workloads.Models; namespace Azure.ResourceManager.Workloads @@ -73,6 +74,7 @@ internal static SapCentralServerInstanceData DeserializeSapCentralServerInstance Optional enqueueReplicationServerProperties = default; Optional kernelVersion = default; Optional kernelPatch = default; + Optional loadBalancerDetails = default; Optional> vmDetails = default; Optional status = default; Optional health = default; @@ -209,6 +211,16 @@ internal static SapCentralServerInstanceData DeserializeSapCentralServerInstance kernelPatch = property0.Value.GetString(); continue; } + if (property0.NameEquals("loadBalancerDetails")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property0.Value.GetRawText()); + continue; + } if (property0.NameEquals("vmDetails")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -268,7 +280,7 @@ internal static SapCentralServerInstanceData DeserializeSapCentralServerInstance continue; } } - return new SapCentralServerInstanceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, instanceNo.Value, subnet.Value, messageServerProperties.Value, enqueueServerProperties.Value, gatewayServerProperties.Value, enqueueReplicationServerProperties.Value, kernelVersion.Value, kernelPatch.Value, Optional.ToList(vmDetails), Optional.ToNullable(status), Optional.ToNullable(health), Optional.ToNullable(provisioningState), errors.Value); + return new SapCentralServerInstanceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, instanceNo.Value, subnet.Value, messageServerProperties.Value, enqueueServerProperties.Value, gatewayServerProperties.Value, enqueueReplicationServerProperties.Value, kernelVersion.Value, kernelPatch.Value, loadBalancerDetails, Optional.ToList(vmDetails), Optional.ToNullable(status), Optional.ToNullable(health), Optional.ToNullable(provisioningState), errors.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDatabaseInstanceData.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDatabaseInstanceData.Serialization.cs index e9633523c8430..82793c9364bdd 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDatabaseInstanceData.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDatabaseInstanceData.Serialization.cs @@ -9,6 +9,7 @@ using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; using Azure.ResourceManager.Workloads.Models; namespace Azure.ResourceManager.Workloads @@ -49,6 +50,7 @@ internal static SapDatabaseInstanceData DeserializeSapDatabaseInstanceData(JsonE Optional databaseSid = default; Optional databaseType = default; Optional ipAddress = default; + Optional loadBalancerDetails = default; Optional> vmDetails = default; Optional status = default; Optional provisioningState = default; @@ -134,6 +136,16 @@ internal static SapDatabaseInstanceData DeserializeSapDatabaseInstanceData(JsonE ipAddress = property0.Value.GetString(); continue; } + if (property0.NameEquals("loadBalancerDetails")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + loadBalancerDetails = JsonSerializer.Deserialize(property0.Value.GetRawText()); + continue; + } if (property0.NameEquals("vmDetails")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -183,7 +195,7 @@ internal static SapDatabaseInstanceData DeserializeSapDatabaseInstanceData(JsonE continue; } } - return new SapDatabaseInstanceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, subnet.Value, databaseSid.Value, databaseType.Value, ipAddress.Value, Optional.ToList(vmDetails), Optional.ToNullable(status), Optional.ToNullable(provisioningState), errors.Value); + return new SapDatabaseInstanceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, subnet.Value, databaseSid.Value, databaseType.Value, ipAddress.Value, loadBalancerDetails, Optional.ToList(vmDetails), Optional.ToNullable(status), Optional.ToNullable(provisioningState), errors.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDeploymentType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDeploymentType.cs index 8477355b07bd4..8f44835dadc4d 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDeploymentType.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDeploymentType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Workloads.Models { - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. public readonly partial struct SapDeploymentType : IEquatable { private readonly string _value; diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfiguration.Serialization.cs index fe9fc49cea76a..88030559ea4d4 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfiguration.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfiguration.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -14,72 +15,37 @@ public partial class SapDiskConfiguration { internal static SapDiskConfiguration DeserializeSapDiskConfiguration(JsonElement element) { - Optional volume = default; - Optional diskType = default; - Optional diskCount = default; - Optional diskSizeGB = default; - Optional diskIopsReadWrite = default; - Optional diskMBpsReadWrite = default; - Optional diskStorageType = default; + Optional recommendedConfiguration = default; + Optional> supportedConfigurations = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("volume")) - { - volume = property.Value.GetString(); - continue; - } - if (property.NameEquals("diskType")) - { - diskType = property.Value.GetString(); - continue; - } - if (property.NameEquals("diskCount")) + if (property.NameEquals("recommendedConfiguration")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - diskCount = property.Value.GetInt64(); + recommendedConfiguration = DiskVolumeConfiguration.DeserializeDiskVolumeConfiguration(property.Value); continue; } - if (property.NameEquals("diskSizeGB")) + if (property.NameEquals("supportedConfigurations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - diskSizeGB = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("diskIopsReadWrite")) - { - if (property.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) { - property.ThrowNonNullablePropertyIsNull(); - continue; + array.Add(DiskDetails.DeserializeDiskDetails(item)); } - diskIopsReadWrite = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("diskMBpsReadWrite")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - diskMBpsReadWrite = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("diskStorageType")) - { - diskStorageType = property.Value.GetString(); + supportedConfigurations = array; continue; } } - return new SapDiskConfiguration(volume.Value, diskType.Value, Optional.ToNullable(diskCount), Optional.ToNullable(diskSizeGB), Optional.ToNullable(diskIopsReadWrite), Optional.ToNullable(diskMBpsReadWrite), diskStorageType.Value); + return new SapDiskConfiguration(recommendedConfiguration.Value, Optional.ToList(supportedConfigurations)); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfiguration.cs index fb2190f4a811f..7862369daa97e 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfiguration.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfiguration.cs @@ -5,48 +5,32 @@ #nullable disable +using System.Collections.Generic; +using Azure.Core; + namespace Azure.ResourceManager.Workloads.Models { - /// The SAP Disk Configuration. + /// The SAP Disk Configuration contains 'recommended disk' details and list of supported disks detail for a volume type. public partial class SapDiskConfiguration { /// Initializes a new instance of SapDiskConfiguration. internal SapDiskConfiguration() { + SupportedConfigurations = new ChangeTrackingList(); } /// Initializes a new instance of SapDiskConfiguration. - /// The volume name. - /// The disk type. - /// The disk count. - /// The disk size in GB. - /// The disk Iops. - /// The disk provisioned throughput in MBps. - /// The disk storage type. - internal SapDiskConfiguration(string volume, string diskType, long? diskCount, long? diskSizeGB, long? diskIopsReadWrite, long? diskMBpsReadWrite, string diskStorageType) + /// The recommended disk details for a given VM Sku. + /// The list of supported disks for a given VM Sku. + internal SapDiskConfiguration(DiskVolumeConfiguration recommendedConfiguration, IReadOnlyList supportedConfigurations) { - Volume = volume; - DiskType = diskType; - DiskCount = diskCount; - DiskSizeGB = diskSizeGB; - DiskIopsReadWrite = diskIopsReadWrite; - DiskMBpsReadWrite = diskMBpsReadWrite; - DiskStorageType = diskStorageType; + RecommendedConfiguration = recommendedConfiguration; + SupportedConfigurations = supportedConfigurations; } - /// The volume name. - public string Volume { get; } - /// The disk type. - public string DiskType { get; } - /// The disk count. - public long? DiskCount { get; } - /// The disk size in GB. - public long? DiskSizeGB { get; } - /// The disk Iops. - public long? DiskIopsReadWrite { get; } - /// The disk provisioned throughput in MBps. - public long? DiskMBpsReadWrite { get; } - /// The disk storage type. - public string DiskStorageType { get; } + /// The recommended disk details for a given VM Sku. + public DiskVolumeConfiguration RecommendedConfiguration { get; } + /// The list of supported disks for a given VM Sku. + public IReadOnlyList SupportedConfigurations { get; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs index a93b096967692..90d2e9901e9ea 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfigurationsResult.Serialization.cs @@ -15,26 +15,26 @@ public partial class SapDiskConfigurationsResult { internal static SapDiskConfigurationsResult DeserializeSapDiskConfigurationsResult(JsonElement element) { - Optional> diskConfigurations = default; + Optional> volumeConfigurations = default; foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("diskConfigurations")) + if (property.NameEquals("volumeConfigurations")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) { - array.Add(SapDiskConfiguration.DeserializeSapDiskConfiguration(item)); + dictionary.Add(property0.Name, SapDiskConfiguration.DeserializeSapDiskConfiguration(property0.Value)); } - diskConfigurations = array; + volumeConfigurations = dictionary; continue; } } - return new SapDiskConfigurationsResult(Optional.ToList(diskConfigurations)); + return new SapDiskConfigurationsResult(Optional.ToDictionary(volumeConfigurations)); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfigurationsResult.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfigurationsResult.cs index 85b6bfe848663..99347819a8863 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfigurationsResult.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapDiskConfigurationsResult.cs @@ -16,17 +16,17 @@ public partial class SapDiskConfigurationsResult /// Initializes a new instance of SapDiskConfigurationsResult. internal SapDiskConfigurationsResult() { - DiskConfigurations = new ChangeTrackingList(); + VolumeConfigurations = new ChangeTrackingDictionary(); } /// Initializes a new instance of SapDiskConfigurationsResult. - /// Gets the list of Disk Configurations. - internal SapDiskConfigurationsResult(IReadOnlyList diskConfigurations) + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + internal SapDiskConfigurationsResult(IReadOnlyDictionary volumeConfigurations) { - DiskConfigurations = diskConfigurations; + VolumeConfigurations = volumeConfigurations; } - /// Gets the list of Disk Configurations. - public IReadOnlyList DiskConfigurations { get; } + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IReadOnlyDictionary VolumeConfigurations { get; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapHealthState.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapHealthState.cs index e86574ccbab44..100bb9901e090 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapHealthState.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapHealthState.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Workloads.Models { - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. public readonly partial struct SapHealthState : IEquatable { private readonly string _value; diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceData.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorData.Serialization.cs similarity index 61% rename from sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceData.Serialization.cs rename to sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorData.Serialization.cs index cf9ed353c3280..d9872832d9fd8 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceData.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorData.Serialization.cs @@ -5,7 +5,7 @@ #nullable disable -using System; +using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Models; @@ -13,43 +13,41 @@ namespace Azure.ResourceManager.Workloads { - public partial class WordPressInstanceResourceData : IUtf8JsonSerializable + public partial class SapLandscapeMonitorData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); writer.WritePropertyName("properties"); writer.WriteStartObject(); - if (Optional.IsDefined(Version)) + if (Optional.IsDefined(Grouping)) { - writer.WritePropertyName("version"); - writer.WriteStringValue(Version.Value.ToString()); + writer.WritePropertyName("grouping"); + writer.WriteObjectValue(Grouping); } - if (Optional.IsDefined(DatabaseName)) + if (Optional.IsCollectionDefined(TopMetricsThresholds)) { - writer.WritePropertyName("databaseName"); - writer.WriteStringValue(DatabaseName); - } - if (Optional.IsDefined(DatabaseUser)) - { - writer.WritePropertyName("databaseUser"); - writer.WriteStringValue(DatabaseUser); + writer.WritePropertyName("topMetricsThresholds"); + writer.WriteStartArray(); + foreach (var item in TopMetricsThresholds) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); } writer.WriteEndObject(); writer.WriteEndObject(); } - internal static WordPressInstanceResourceData DeserializeWordPressInstanceResourceData(JsonElement element) + internal static SapLandscapeMonitorData DeserializeSapLandscapeMonitorData(JsonElement element) { ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional systemData = default; - Optional version = default; - Optional databaseName = default; - Optional databaseUser = default; - Optional siteUrl = default; - Optional provisioningState = default; + Optional provisioningState = default; + Optional grouping = default; + Optional> topMetricsThresholds = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) @@ -86,51 +84,46 @@ internal static WordPressInstanceResourceData DeserializeWordPressInstanceResour } foreach (var property0 in property.Value.EnumerateObject()) { - if (property0.NameEquals("version")) + if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } - version = new WordPressVersion(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("databaseName")) - { - databaseName = property0.Value.GetString(); + provisioningState = new SapLandscapeMonitorProvisioningState(property0.Value.GetString()); continue; } - if (property0.NameEquals("databaseUser")) - { - databaseUser = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("siteUrl")) + if (property0.NameEquals("grouping")) { if (property0.Value.ValueKind == JsonValueKind.Null) { - siteUrl = null; + property0.ThrowNonNullablePropertyIsNull(); continue; } - siteUrl = new Uri(property0.Value.GetString()); + grouping = SapLandscapeMonitorPropertiesGrouping.DeserializeSapLandscapeMonitorPropertiesGrouping(property0.Value); continue; } - if (property0.NameEquals("provisioningState")) + if (property0.NameEquals("topMetricsThresholds")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } - provisioningState = new ApplicationProvisioningState(property0.Value.GetString()); + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(SapLandscapeMonitorMetricThresholds.DeserializeSapLandscapeMonitorMetricThresholds(item)); + } + topMetricsThresholds = array; continue; } } continue; } } - return new WordPressInstanceResourceData(id, name, type, systemData.Value, Optional.ToNullable(version), databaseName.Value, databaseUser.Value, siteUrl.Value, Optional.ToNullable(provisioningState)); + return new SapLandscapeMonitorData(id, name, type, systemData.Value, Optional.ToNullable(provisioningState), grouping.Value, Optional.ToList(topMetricsThresholds)); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceList.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorListResult.Serialization.cs similarity index 68% rename from sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceList.Serialization.cs rename to sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorListResult.Serialization.cs index 9a76bd14bea0e..5e89b50de727e 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/PhpWorkloadResourceList.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorListResult.Serialization.cs @@ -12,11 +12,11 @@ namespace Azure.ResourceManager.Workloads.Models { - internal partial class PhpWorkloadResourceList + internal partial class SapLandscapeMonitorListResult { - internal static PhpWorkloadResourceList DeserializePhpWorkloadResourceList(JsonElement element) + internal static SapLandscapeMonitorListResult DeserializeSapLandscapeMonitorListResult(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -27,10 +27,10 @@ internal static PhpWorkloadResourceList DeserializePhpWorkloadResourceList(JsonE property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(item)); + array.Add(SapLandscapeMonitorData.DeserializeSapLandscapeMonitorData(item)); } value = array; continue; @@ -41,7 +41,7 @@ internal static PhpWorkloadResourceList DeserializePhpWorkloadResourceList(JsonE continue; } } - return new PhpWorkloadResourceList(Optional.ToList(value), nextLink.Value); + return new SapLandscapeMonitorListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorListResult.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorListResult.cs new file mode 100644 index 0000000000000..7d162e1bf572a --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorListResult.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Workloads; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The response from the List SAP Landscape Monitor Dashboard operation. + internal partial class SapLandscapeMonitorListResult + { + /// Initializes a new instance of SapLandscapeMonitorListResult. + internal SapLandscapeMonitorListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of SapLandscapeMonitorListResult. + /// The list of Sap Landscape Monitor configuration. + /// The URL to get the next set of SAP Landscape Monitor Dashboard. + internal SapLandscapeMonitorListResult(IReadOnlyList value, string nextLink) + { + Value = value; + NextLink = nextLink; + } + + /// The list of Sap Landscape Monitor configuration. + public IReadOnlyList Value { get; } + /// The URL to get the next set of SAP Landscape Monitor Dashboard. + public string NextLink { get; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorMetricThresholds.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorMetricThresholds.Serialization.cs new file mode 100644 index 0000000000000..320fd48789c39 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorMetricThresholds.Serialization.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class SapLandscapeMonitorMetricThresholds : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Green)) + { + writer.WritePropertyName("green"); + writer.WriteNumberValue(Green.Value); + } + if (Optional.IsDefined(Yellow)) + { + writer.WritePropertyName("yellow"); + writer.WriteNumberValue(Yellow.Value); + } + if (Optional.IsDefined(Red)) + { + writer.WritePropertyName("red"); + writer.WriteNumberValue(Red.Value); + } + writer.WriteEndObject(); + } + + internal static SapLandscapeMonitorMetricThresholds DeserializeSapLandscapeMonitorMetricThresholds(JsonElement element) + { + Optional name = default; + Optional green = default; + Optional yellow = default; + Optional red = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("green")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + green = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("yellow")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + yellow = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("red")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + red = property.Value.GetSingle(); + continue; + } + } + return new SapLandscapeMonitorMetricThresholds(name.Value, Optional.ToNullable(green), Optional.ToNullable(yellow), Optional.ToNullable(red)); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorMetricThresholds.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorMetricThresholds.cs new file mode 100644 index 0000000000000..3154b08452bd1 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorMetricThresholds.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// Gets or sets the Threshold Values for Top Metrics Health. + public partial class SapLandscapeMonitorMetricThresholds + { + /// Initializes a new instance of SapLandscapeMonitorMetricThresholds. + public SapLandscapeMonitorMetricThresholds() + { + } + + /// Initializes a new instance of SapLandscapeMonitorMetricThresholds. + /// Gets or sets the name of the threshold. + /// Gets or sets the threshold value for Green. + /// Gets or sets the threshold value for Yellow. + /// Gets or sets the threshold value for Red. + internal SapLandscapeMonitorMetricThresholds(string name, float? green, float? yellow, float? red) + { + Name = name; + Green = green; + Yellow = yellow; + Red = red; + } + + /// Gets or sets the name of the threshold. + public string Name { get; set; } + /// Gets or sets the threshold value for Green. + public float? Green { get; set; } + /// Gets or sets the threshold value for Yellow. + public float? Yellow { get; set; } + /// Gets or sets the threshold value for Red. + public float? Red { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorPropertiesGrouping.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorPropertiesGrouping.Serialization.cs new file mode 100644 index 0000000000000..e23f2c4fca23d --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorPropertiesGrouping.Serialization.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class SapLandscapeMonitorPropertiesGrouping : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Landscape)) + { + writer.WritePropertyName("landscape"); + writer.WriteStartArray(); + foreach (var item in Landscape) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SapApplication)) + { + writer.WritePropertyName("sapApplication"); + writer.WriteStartArray(); + foreach (var item in SapApplication) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static SapLandscapeMonitorPropertiesGrouping DeserializeSapLandscapeMonitorPropertiesGrouping(JsonElement element) + { + Optional> landscape = default; + Optional> sapApplication = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("landscape")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapLandscapeMonitorSidMapping.DeserializeSapLandscapeMonitorSidMapping(item)); + } + landscape = array; + continue; + } + if (property.NameEquals("sapApplication")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SapLandscapeMonitorSidMapping.DeserializeSapLandscapeMonitorSidMapping(item)); + } + sapApplication = array; + continue; + } + } + return new SapLandscapeMonitorPropertiesGrouping(Optional.ToList(landscape), Optional.ToList(sapApplication)); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorPropertiesGrouping.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorPropertiesGrouping.cs new file mode 100644 index 0000000000000..f959a3ba87752 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorPropertiesGrouping.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// Gets or sets the SID groupings by landscape and Environment. + public partial class SapLandscapeMonitorPropertiesGrouping + { + /// Initializes a new instance of SapLandscapeMonitorPropertiesGrouping. + public SapLandscapeMonitorPropertiesGrouping() + { + Landscape = new ChangeTrackingList(); + SapApplication = new ChangeTrackingList(); + } + + /// Initializes a new instance of SapLandscapeMonitorPropertiesGrouping. + /// Gets or sets the list of landscape to SID mappings. + /// Gets or sets the list of Sap Applications to SID mappings. + internal SapLandscapeMonitorPropertiesGrouping(IList landscape, IList sapApplication) + { + Landscape = landscape; + SapApplication = sapApplication; + } + + /// Gets or sets the list of landscape to SID mappings. + public IList Landscape { get; } + /// Gets or sets the list of Sap Applications to SID mappings. + public IList SapApplication { get; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorProvisioningState.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorProvisioningState.cs new file mode 100644 index 0000000000000..04c7a1762d2bc --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorProvisioningState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// State of provisioning of the SAP monitor. + public readonly partial struct SapLandscapeMonitorProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SapLandscapeMonitorProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AcceptedValue = "Accepted"; + private const string CreatedValue = "Created"; + private const string FailedValue = "Failed"; + private const string SucceededValue = "Succeeded"; + private const string CanceledValue = "Canceled"; + + /// Accepted. + public static SapLandscapeMonitorProvisioningState Accepted { get; } = new SapLandscapeMonitorProvisioningState(AcceptedValue); + /// Created. + public static SapLandscapeMonitorProvisioningState Created { get; } = new SapLandscapeMonitorProvisioningState(CreatedValue); + /// Failed. + public static SapLandscapeMonitorProvisioningState Failed { get; } = new SapLandscapeMonitorProvisioningState(FailedValue); + /// Succeeded. + public static SapLandscapeMonitorProvisioningState Succeeded { get; } = new SapLandscapeMonitorProvisioningState(SucceededValue); + /// Canceled. + public static SapLandscapeMonitorProvisioningState Canceled { get; } = new SapLandscapeMonitorProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(SapLandscapeMonitorProvisioningState left, SapLandscapeMonitorProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SapLandscapeMonitorProvisioningState left, SapLandscapeMonitorProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SapLandscapeMonitorProvisioningState(string value) => new SapLandscapeMonitorProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SapLandscapeMonitorProvisioningState other && Equals(other); + /// + public bool Equals(SapLandscapeMonitorProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorSidMapping.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorSidMapping.Serialization.cs new file mode 100644 index 0000000000000..8da27ec1f9e5e --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorSidMapping.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class SapLandscapeMonitorSidMapping : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsCollectionDefined(TopSid)) + { + writer.WritePropertyName("topSid"); + writer.WriteStartArray(); + foreach (var item in TopSid) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + internal static SapLandscapeMonitorSidMapping DeserializeSapLandscapeMonitorSidMapping(JsonElement element) + { + Optional name = default; + Optional> topSid = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("topSid")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + topSid = array; + continue; + } + } + return new SapLandscapeMonitorSidMapping(name.Value, Optional.ToList(topSid)); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorSidMapping.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorSidMapping.cs new file mode 100644 index 0000000000000..1c9128696aad4 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapLandscapeMonitorSidMapping.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// Gets or sets the mapping for SID to Environment/Applications. + public partial class SapLandscapeMonitorSidMapping + { + /// Initializes a new instance of SapLandscapeMonitorSidMapping. + public SapLandscapeMonitorSidMapping() + { + TopSid = new ChangeTrackingList(); + } + + /// Initializes a new instance of SapLandscapeMonitorSidMapping. + /// Gets or sets the name of the grouping. + /// Gets or sets the list of SID's. + internal SapLandscapeMonitorSidMapping(string name, IList topSid) + { + Name = name; + TopSid = topSid; + } + + /// Gets or sets the name of the grouping. + public string Name { get; set; } + /// Gets or sets the list of SID's. + public IList TopSid { get; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorData.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorData.Serialization.cs index bc920d87ae613..2220028883e9a 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorData.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorData.Serialization.cs @@ -19,6 +19,11 @@ public partial class SapMonitorData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"); @@ -44,6 +49,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("routingPreference"); writer.WriteStringValue(RoutingPreference.Value.ToString()); } + if (Optional.IsDefined(ZoneRedundancyPreference)) + { + writer.WritePropertyName("zoneRedundancyPreference"); + writer.WriteStringValue(ZoneRedundancyPreference); + } if (Optional.IsDefined(ManagedResourceGroupConfiguration)) { writer.WritePropertyName("managedResourceGroupConfiguration"); @@ -65,6 +75,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static SapMonitorData DeserializeSapMonitorData(JsonElement element) { + Optional identity = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -75,12 +86,24 @@ internal static SapMonitorData DeserializeSapMonitorData(JsonElement element) Optional errors = default; Optional appLocation = default; Optional routingPreference = default; + Optional zoneRedundancyPreference = default; Optional managedResourceGroupConfiguration = default; Optional logAnalyticsWorkspaceArmId = default; Optional monitorSubnet = default; Optional msiArmId = default; + Optional storageAccountArmId = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = UserAssignedServiceIdentity.DeserializeUserAssignedServiceIdentity(property.Value); + continue; + } if (property.NameEquals("tags")) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -175,6 +198,11 @@ internal static SapMonitorData DeserializeSapMonitorData(JsonElement element) routingPreference = new RoutingPreference(property0.Value.GetString()); continue; } + if (property0.NameEquals("zoneRedundancyPreference")) + { + zoneRedundancyPreference = property0.Value.GetString(); + continue; + } if (property0.NameEquals("managedResourceGroupConfiguration")) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -215,11 +243,16 @@ internal static SapMonitorData DeserializeSapMonitorData(JsonElement element) msiArmId = new ResourceIdentifier(property0.Value.GetString()); continue; } + if (property0.NameEquals("storageAccountArmId")) + { + storageAccountArmId = property0.Value.GetString(); + continue; + } } continue; } } - return new SapMonitorData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, Optional.ToNullable(provisioningState), errors.Value, Optional.ToNullable(appLocation), Optional.ToNullable(routingPreference), managedResourceGroupConfiguration.Value, logAnalyticsWorkspaceArmId.Value, monitorSubnet.Value, msiArmId.Value); + return new SapMonitorData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity.Value, Optional.ToNullable(provisioningState), errors.Value, Optional.ToNullable(appLocation), Optional.ToNullable(routingPreference), zoneRedundancyPreference.Value, managedResourceGroupConfiguration.Value, logAnalyticsWorkspaceArmId.Value, monitorSubnet.Value, msiArmId.Value, storageAccountArmId.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorPatch.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorPatch.Serialization.cs index fe1cf82d7722f..04c421c149efe 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorPatch.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorPatch.Serialization.cs @@ -26,6 +26,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } writer.WriteEndObject(); } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorPatch.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorPatch.cs index a783c0e091c02..0e09a8a2526e6 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorPatch.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapMonitorPatch.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Workloads.Models { - /// Tags field of the resource. + /// Defines the request body for updating SAP monitor resource. public partial class SapMonitorPatch { /// Initializes a new instance of SapMonitorPatch. @@ -19,7 +19,9 @@ public SapMonitorPatch() Tags = new ChangeTrackingDictionary(); } - /// Tags field of the resource. + /// Gets or sets the Resource tags. public IDictionary Tags { get; } + /// Managed service identity (user assigned identities). + public UserAssignedServiceIdentity Identity { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapNetWeaverProviderInstanceProperties.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapNetWeaverProviderInstanceProperties.Serialization.cs index ee912375a535b..fa123615aa5a8 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapNetWeaverProviderInstanceProperties.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapNetWeaverProviderInstanceProperties.Serialization.cs @@ -67,10 +67,15 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("sapPortNumber"); writer.WriteStringValue(SapPortNumber); } - if (Optional.IsDefined(SapSslCertificateUri)) + if (Optional.IsDefined(SslCertificateUri)) { - writer.WritePropertyName("sapSslCertificateUri"); - writer.WriteStringValue(SapSslCertificateUri.AbsoluteUri); + writer.WritePropertyName("sslCertificateUri"); + writer.WriteStringValue(SslCertificateUri.AbsoluteUri); + } + if (Optional.IsDefined(SslPreference)) + { + writer.WritePropertyName("sslPreference"); + writer.WriteStringValue(SslPreference.Value.ToString()); } writer.WritePropertyName("providerType"); writer.WriteStringValue(ProviderType); @@ -88,7 +93,8 @@ internal static SapNetWeaverProviderInstanceProperties DeserializeSapNetWeaverPr Optional sapPasswordUri = default; Optional sapClientId = default; Optional sapPortNumber = default; - Optional sapSslCertificateUri = default; + Optional sslCertificateUri = default; + Optional sslPreference = default; string providerType = default; foreach (var property in element.EnumerateObject()) { @@ -152,14 +158,24 @@ internal static SapNetWeaverProviderInstanceProperties DeserializeSapNetWeaverPr sapPortNumber = property.Value.GetString(); continue; } - if (property.NameEquals("sapSslCertificateUri")) + if (property.NameEquals("sslCertificateUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sslCertificateUri = null; + continue; + } + sslCertificateUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("sslPreference")) { if (property.Value.ValueKind == JsonValueKind.Null) { - sapSslCertificateUri = null; + property.ThrowNonNullablePropertyIsNull(); continue; } - sapSslCertificateUri = new Uri(property.Value.GetString()); + sslPreference = new SslPreference(property.Value.GetString()); continue; } if (property.NameEquals("providerType")) @@ -168,7 +184,7 @@ internal static SapNetWeaverProviderInstanceProperties DeserializeSapNetWeaverPr continue; } } - return new SapNetWeaverProviderInstanceProperties(providerType, sapSid.Value, sapHostname.Value, sapInstanceNr.Value, Optional.ToList(sapHostFileEntries), sapUsername.Value, sapPassword.Value, sapPasswordUri.Value, sapClientId.Value, sapPortNumber.Value, sapSslCertificateUri.Value); + return new SapNetWeaverProviderInstanceProperties(providerType, sapSid.Value, sapHostname.Value, sapInstanceNr.Value, Optional.ToList(sapHostFileEntries), sapUsername.Value, sapPassword.Value, sapPasswordUri.Value, sapClientId.Value, sapPortNumber.Value, sslCertificateUri.Value, Optional.ToNullable(sslPreference)); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapNetWeaverProviderInstanceProperties.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapNetWeaverProviderInstanceProperties.cs index 3cc3f8723c3e1..416a1c1339d61 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapNetWeaverProviderInstanceProperties.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapNetWeaverProviderInstanceProperties.cs @@ -32,8 +32,9 @@ public SapNetWeaverProviderInstanceProperties() /// Gets or sets the key vault URI to secret with the SAP password. /// Gets or sets the SAP Client ID. /// Gets or sets the SAP HTTP port number. - /// Gets or sets the blob URI to SSL certificate for the SAP system. - internal SapNetWeaverProviderInstanceProperties(string providerType, string sapSid, string sapHostname, string sapInstanceNr, IList sapHostFileEntries, string sapUsername, string sapPassword, Uri sapPasswordUri, string sapClientId, string sapPortNumber, Uri sapSslCertificateUri) : base(providerType) + /// Gets or sets the blob URI to SSL certificate for the SAP system. + /// Gets or sets certificate preference if secure communication is enabled. + internal SapNetWeaverProviderInstanceProperties(string providerType, string sapSid, string sapHostname, string sapInstanceNr, IList sapHostFileEntries, string sapUsername, string sapPassword, Uri sapPasswordUri, string sapClientId, string sapPortNumber, Uri sslCertificateUri, SslPreference? sslPreference) : base(providerType) { SapSid = sapSid; SapHostname = sapHostname; @@ -44,7 +45,8 @@ internal SapNetWeaverProviderInstanceProperties(string providerType, string sapS SapPasswordUri = sapPasswordUri; SapClientId = sapClientId; SapPortNumber = sapPortNumber; - SapSslCertificateUri = sapSslCertificateUri; + SslCertificateUri = sslCertificateUri; + SslPreference = sslPreference; ProviderType = providerType ?? "SapNetWeaver"; } @@ -67,6 +69,8 @@ internal SapNetWeaverProviderInstanceProperties(string providerType, string sapS /// Gets or sets the SAP HTTP port number. public string SapPortNumber { get; set; } /// Gets or sets the blob URI to SSL certificate for the SAP system. - public Uri SapSslCertificateUri { get; set; } + public Uri SslCertificateUri { get; set; } + /// Gets or sets certificate preference if secure communication is enabled. + public SslPreference? SslPreference { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapProviderInstanceData.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapProviderInstanceData.Serialization.cs index 82fd3a432af8f..4dd3290ac7326 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapProviderInstanceData.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapProviderInstanceData.Serialization.cs @@ -18,6 +18,11 @@ public partial class SapProviderInstanceData : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } writer.WritePropertyName("properties"); writer.WriteStartObject(); if (Optional.IsDefined(ProviderSettings)) @@ -31,6 +36,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static SapProviderInstanceData DeserializeSapProviderInstanceData(JsonElement element) { + Optional identity = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -40,6 +46,16 @@ internal static SapProviderInstanceData DeserializeSapProviderInstanceData(JsonE Optional providerSettings = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = UserAssignedServiceIdentity.DeserializeUserAssignedServiceIdentity(property.Value); + continue; + } if (property.NameEquals("id")) { id = new ResourceIdentifier(property.Value.GetString()); @@ -108,7 +124,7 @@ internal static SapProviderInstanceData DeserializeSapProviderInstanceData(JsonE continue; } } - return new SapProviderInstanceData(id, name, type, systemData.Value, Optional.ToNullable(provisioningState), errors.Value, providerSettings.Value); + return new SapProviderInstanceData(id, name, type, systemData.Value, identity.Value, Optional.ToNullable(provisioningState), errors.Value, providerSettings.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapSizingRecommendationResult.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapSizingRecommendationResult.cs index c63030a72dfb3..dd645154240f5 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapSizingRecommendationResult.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapSizingRecommendationResult.cs @@ -20,13 +20,13 @@ protected SapSizingRecommendationResult() } /// Initializes a new instance of SapSizingRecommendationResult. - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. internal SapSizingRecommendationResult(SapDeploymentType deploymentType) { DeploymentType = deploymentType; } - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. internal SapDeploymentType DeploymentType { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapSoftwareInstallationType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapSoftwareInstallationType.cs index d1da74e391929..6a53b8a4b7ac4 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapSoftwareInstallationType.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapSoftwareInstallationType.cs @@ -24,11 +24,14 @@ public SapSoftwareInstallationType(string value) private const string ServiceInitiatedValue = "ServiceInitiated"; private const string SapInstallWithoutOSConfigValue = "SAPInstallWithoutOSConfig"; + private const string ExternalValue = "External"; /// ServiceInitiated. public static SapSoftwareInstallationType ServiceInitiated { get; } = new SapSoftwareInstallationType(ServiceInitiatedValue); /// SAPInstallWithoutOSConfig. public static SapSoftwareInstallationType SapInstallWithoutOSConfig { get; } = new SapSoftwareInstallationType(SapInstallWithoutOSConfigValue); + /// External. + public static SapSoftwareInstallationType External { get; } = new SapSoftwareInstallationType(ExternalValue); /// Determines if two values are the same. public static bool operator ==(SapSoftwareInstallationType left, SapSoftwareInstallationType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceList.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceList.cs index 22e0cd6be2972..6f627f0668dc7 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceList.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceList.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Workloads.Models { - /// Defines the collection of Virtual Instance for SAP. + /// Defines the collection of Virtual Instance for SAP solutions resources. internal partial class SapVirtualInstanceList { /// Initializes a new instance of SapVirtualInstanceList. @@ -21,7 +21,7 @@ internal SapVirtualInstanceList() } /// Initializes a new instance of SapVirtualInstanceList. - /// Gets the list of Virtual Instances for SAP. + /// Gets the list of Virtual Instances for SAP solutions resources. /// Gets the value of next link. internal SapVirtualInstanceList(IReadOnlyList value, string nextLink) { @@ -29,7 +29,7 @@ internal SapVirtualInstanceList(IReadOnlyList value, str NextLink = nextLink; } - /// Gets the list of Virtual Instances for SAP. + /// Gets the list of Virtual Instances for SAP solutions resources. public IReadOnlyList Value { get; } /// Gets the value of next link. public string NextLink { get; } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceState.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceState.cs index 42723d7125597..7cce650841cf7 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceState.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceState.cs @@ -28,6 +28,8 @@ public SapVirtualInstanceState(string value) private const string SoftwareInstallationPendingValue = "SoftwareInstallationPending"; private const string SoftwareInstallationInProgressValue = "SoftwareInstallationInProgress"; private const string SoftwareInstallationFailedValue = "SoftwareInstallationFailed"; + private const string SoftwareDetectionInProgressValue = "SoftwareDetectionInProgress"; + private const string SoftwareDetectionFailedValue = "SoftwareDetectionFailed"; private const string DiscoveryPendingValue = "DiscoveryPending"; private const string DiscoveryInProgressValue = "DiscoveryInProgress"; private const string DiscoveryFailedValue = "DiscoveryFailed"; @@ -45,6 +47,10 @@ public SapVirtualInstanceState(string value) public static SapVirtualInstanceState SoftwareInstallationInProgress { get; } = new SapVirtualInstanceState(SoftwareInstallationInProgressValue); /// SoftwareInstallationFailed. public static SapVirtualInstanceState SoftwareInstallationFailed { get; } = new SapVirtualInstanceState(SoftwareInstallationFailedValue); + /// SoftwareDetectionInProgress. + public static SapVirtualInstanceState SoftwareDetectionInProgress { get; } = new SapVirtualInstanceState(SoftwareDetectionInProgressValue); + /// SoftwareDetectionFailed. + public static SapVirtualInstanceState SoftwareDetectionFailed { get; } = new SapVirtualInstanceState(SoftwareDetectionFailedValue); /// DiscoveryPending. public static SapVirtualInstanceState DiscoveryPending { get; } = new SapVirtualInstanceState(DiscoveryPendingValue); /// DiscoveryInProgress. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceStatus.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceStatus.cs index 8042c3cd4748e..2bc3d479ed1dc 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceStatus.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SapVirtualInstanceStatus.cs @@ -28,6 +28,7 @@ public SapVirtualInstanceStatus(string value) private const string OfflineValue = "Offline"; private const string PartiallyRunningValue = "PartiallyRunning"; private const string UnavailableValue = "Unavailable"; + private const string SoftShutdownValue = "SoftShutdown"; /// Starting. public static SapVirtualInstanceStatus Starting { get; } = new SapVirtualInstanceStatus(StartingValue); @@ -41,6 +42,8 @@ public SapVirtualInstanceStatus(string value) public static SapVirtualInstanceStatus PartiallyRunning { get; } = new SapVirtualInstanceStatus(PartiallyRunningValue); /// Unavailable. public static SapVirtualInstanceStatus Unavailable { get; } = new SapVirtualInstanceStatus(UnavailableValue); + /// SoftShutdown. + public static SapVirtualInstanceStatus SoftShutdown { get; } = new SapVirtualInstanceStatus(SoftShutdownValue); /// Determines if two values are the same. public static bool operator ==(SapVirtualInstanceStatus left, SapVirtualInstanceStatus right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchProfile.Serialization.cs deleted file mode 100644 index a0d7310a9ac13..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchProfile.Serialization.cs +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class SearchProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("searchType"); - writer.WriteStringValue(SearchType.ToString()); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("nodeSku"); - writer.WriteStringValue(NodeSku); - writer.WritePropertyName("osImage"); - writer.WriteObjectValue(OSImage); - writer.WritePropertyName("osDisk"); - writer.WriteObjectValue(OSDisk); - if (Optional.IsCollectionDefined(DataDisks)) - { - writer.WritePropertyName("dataDisks"); - writer.WriteStartArray(); - foreach (var item in DataDisks) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static SearchProfile DeserializeSearchProfile(JsonElement element) - { - SearchType searchType = default; - Optional name = default; - string nodeSku = default; - OSImageProfile osImage = default; - DiskInfo osDisk = default; - Optional> dataDisks = default; - Optional> nodeResourceIds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("searchType")) - { - searchType = new SearchType(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("nodeSku")) - { - nodeSku = property.Value.GetString(); - continue; - } - if (property.NameEquals("osImage")) - { - osImage = OSImageProfile.DeserializeOSImageProfile(property.Value); - continue; - } - if (property.NameEquals("osDisk")) - { - osDisk = DiskInfo.DeserializeDiskInfo(property.Value); - continue; - } - if (property.NameEquals("dataDisks")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiskInfo.DeserializeDiskInfo(item)); - } - dataDisks = array; - continue; - } - if (property.NameEquals("nodeResourceIds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new ResourceIdentifier(item.GetString())); - } - nodeResourceIds = array; - continue; - } - } - return new SearchProfile(name.Value, nodeSku, osImage, osDisk, Optional.ToList(dataDisks), Optional.ToList(nodeResourceIds), searchType); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchProfile.cs deleted file mode 100644 index 9c8489f843f30..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchProfile.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.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Search profile. - public partial class SearchProfile : NodeProfile - { - /// Initializes a new instance of SearchProfile. - /// VM SKU for node(s). - /// OS image used for creating the nodes. - /// OS disk details. - /// Search type. - /// , or is null. - public SearchProfile(string nodeSku, OSImageProfile osImage, DiskInfo osDisk, SearchType searchType) : base(nodeSku, osImage, osDisk) - { - Argument.AssertNotNull(nodeSku, nameof(nodeSku)); - Argument.AssertNotNull(osImage, nameof(osImage)); - Argument.AssertNotNull(osDisk, nameof(osDisk)); - - SearchType = searchType; - } - - /// Initializes a new instance of SearchProfile. - /// VM or VMSS name. - /// VM SKU for node(s). - /// OS image used for creating the nodes. - /// OS disk details. - /// Data disks details. This property is not in use right now. - /// VM/VMSS resource ARM Ids. - /// Search type. - internal SearchProfile(string name, string nodeSku, OSImageProfile osImage, DiskInfo osDisk, IList dataDisks, IReadOnlyList nodeResourceIds, SearchType searchType) : base(name, nodeSku, osImage, osDisk, dataDisks, nodeResourceIds) - { - SearchType = searchType; - } - - /// Search type. - public SearchType SearchType { get; set; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchType.cs deleted file mode 100644 index e55cc5f08d9bd..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SearchType.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.Workloads.Models -{ - /// Search type. - public readonly partial struct SearchType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SearchType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ElasticValue = "Elastic"; - - /// Elastic. - public static SearchType Elastic { get; } = new SearchType(ElasticValue); - /// Determines if two values are the same. - public static bool operator ==(SearchType left, SearchType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SearchType left, SearchType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SearchType(string value) => new SearchType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SearchType other && Equals(other); - /// - public bool Equals(SearchType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SharedStorageResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SharedStorageResourceNames.Serialization.cs new file mode 100644 index 0000000000000..a871ed0ce581c --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SharedStorageResourceNames.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class SharedStorageResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SharedStorageAccountName)) + { + writer.WritePropertyName("sharedStorageAccountName"); + writer.WriteStringValue(SharedStorageAccountName); + } + if (Optional.IsDefined(SharedStorageAccountPrivateEndPointName)) + { + writer.WritePropertyName("sharedStorageAccountPrivateEndPointName"); + writer.WriteStringValue(SharedStorageAccountPrivateEndPointName); + } + writer.WriteEndObject(); + } + + internal static SharedStorageResourceNames DeserializeSharedStorageResourceNames(JsonElement element) + { + Optional sharedStorageAccountName = default; + Optional sharedStorageAccountPrivateEndPointName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sharedStorageAccountName")) + { + sharedStorageAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sharedStorageAccountPrivateEndPointName")) + { + sharedStorageAccountPrivateEndPointName = property.Value.GetString(); + continue; + } + } + return new SharedStorageResourceNames(sharedStorageAccountName.Value, sharedStorageAccountPrivateEndPointName.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SharedStorageResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SharedStorageResourceNames.cs new file mode 100644 index 0000000000000..9ff1399660049 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SharedStorageResourceNames.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The resource names object for shared storage. + public partial class SharedStorageResourceNames + { + /// Initializes a new instance of SharedStorageResourceNames. + public SharedStorageResourceNames() + { + } + + /// Initializes a new instance of SharedStorageResourceNames. + /// The full name of the shared storage account. If it is not provided, it will be defaulted to {SID}nfs{guid of 15 chars}. + /// The full name of private end point for the shared storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe. + internal SharedStorageResourceNames(string sharedStorageAccountName, string sharedStorageAccountPrivateEndPointName) + { + SharedStorageAccountName = sharedStorageAccountName; + SharedStorageAccountPrivateEndPointName = sharedStorageAccountPrivateEndPointName; + } + + /// The full name of the shared storage account. If it is not provided, it will be defaulted to {SID}nfs{guid of 15 chars}. + public string SharedStorageAccountName { get; set; } + /// The full name of private end point for the shared storage account. If it is not provided, it will be defaulted to {storageAccountName}_pe. + public string SharedStorageAccountPrivateEndPointName { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerConfiguration.Serialization.cs index 9a470031a1cd8..e36043dbb3127 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerConfiguration.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerConfiguration.Serialization.cs @@ -29,6 +29,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(SubnetId); writer.WritePropertyName("virtualMachineConfiguration"); writer.WriteObjectValue(VirtualMachineConfiguration); + if (Optional.IsDefined(DBDiskConfiguration)) + { + writer.WritePropertyName("dbDiskConfiguration"); + writer.WriteObjectValue(DBDiskConfiguration); + } + if (Optional.IsDefined(CustomResourceNames)) + { + writer.WritePropertyName("customResourceNames"); + writer.WriteObjectValue(CustomResourceNames); + } writer.WritePropertyName("deploymentType"); writer.WriteStringValue(DeploymentType.ToString()); writer.WritePropertyName("appResourceGroup"); @@ -42,6 +52,8 @@ internal static SingleServerConfiguration DeserializeSingleServerConfiguration(J Optional databaseType = default; ResourceIdentifier subnetId = default; VirtualMachineConfiguration virtualMachineConfiguration = default; + Optional dbDiskConfiguration = default; + Optional customResourceNames = default; SapDeploymentType deploymentType = default; string appResourceGroup = default; foreach (var property in element.EnumerateObject()) @@ -76,6 +88,26 @@ internal static SingleServerConfiguration DeserializeSingleServerConfiguration(J virtualMachineConfiguration = VirtualMachineConfiguration.DeserializeVirtualMachineConfiguration(property.Value); continue; } + if (property.NameEquals("dbDiskConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + dbDiskConfiguration = DiskConfiguration.DeserializeDiskConfiguration(property.Value); + continue; + } + if (property.NameEquals("customResourceNames")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + customResourceNames = SingleServerCustomResourceNames.DeserializeSingleServerCustomResourceNames(property.Value); + continue; + } if (property.NameEquals("deploymentType")) { deploymentType = new SapDeploymentType(property.Value.GetString()); @@ -87,7 +119,7 @@ internal static SingleServerConfiguration DeserializeSingleServerConfiguration(J continue; } } - return new SingleServerConfiguration(deploymentType, appResourceGroup, networkConfiguration.Value, Optional.ToNullable(databaseType), subnetId, virtualMachineConfiguration); + return new SingleServerConfiguration(deploymentType, appResourceGroup, networkConfiguration.Value, Optional.ToNullable(databaseType), subnetId, virtualMachineConfiguration, dbDiskConfiguration.Value, customResourceNames.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerConfiguration.cs index 9c3cf6b903be7..58d4a6b9f3817 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerConfiguration.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerConfiguration.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; using Azure.Core; namespace Azure.ResourceManager.Workloads.Models @@ -30,24 +31,32 @@ public SingleServerConfiguration(string appResourceGroup, ResourceIdentifier sub } /// Initializes a new instance of SingleServerConfiguration. - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. /// The application resource group where SAP system resources will be deployed. /// Network configuration for the server. /// The database type. /// The subnet id. /// Gets or sets the virtual machine configuration. - internal SingleServerConfiguration(SapDeploymentType deploymentType, string appResourceGroup, NetworkConfiguration networkConfiguration, SapDatabaseType? databaseType, ResourceIdentifier subnetId, VirtualMachineConfiguration virtualMachineConfiguration) : base(deploymentType, appResourceGroup) + /// Gets or sets the disk configuration. + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal SingleServerConfiguration(SapDeploymentType deploymentType, string appResourceGroup, NetworkConfiguration networkConfiguration, SapDatabaseType? databaseType, ResourceIdentifier subnetId, VirtualMachineConfiguration virtualMachineConfiguration, DiskConfiguration dbDiskConfiguration, SingleServerCustomResourceNames customResourceNames) : base(deploymentType, appResourceGroup) { NetworkConfiguration = networkConfiguration; DatabaseType = databaseType; SubnetId = subnetId; VirtualMachineConfiguration = virtualMachineConfiguration; + DBDiskConfiguration = dbDiskConfiguration; + CustomResourceNames = customResourceNames; DeploymentType = deploymentType; } /// Network configuration for the server. internal NetworkConfiguration NetworkConfiguration { get; set; } - /// Specifies whether a secondary IP address should be added to the network interface on all VMs. + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. public bool? IsSecondaryIPEnabled { get => NetworkConfiguration is null ? default : NetworkConfiguration.IsSecondaryIPEnabled; @@ -65,5 +74,24 @@ public bool? IsSecondaryIPEnabled public ResourceIdentifier SubnetId { get; set; } /// Gets or sets the virtual machine configuration. public VirtualMachineConfiguration VirtualMachineConfiguration { get; set; } + /// Gets or sets the disk configuration. + internal DiskConfiguration DBDiskConfiguration { get; set; } + /// The disk configuration for the db volume. For HANA, Required volumes are: ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os'], Optional volume : ['backup']. + public IDictionary DiskVolumeConfigurations + { + get + { + if (DBDiskConfiguration is null) + DBDiskConfiguration = new DiskConfiguration(); + return DBDiskConfiguration.DiskVolumeConfigurations; + } + } + + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public SingleServerCustomResourceNames CustomResourceNames { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs new file mode 100644 index 0000000000000..8c94d7df51c04 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerCustomResourceNames.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class SingleServerCustomResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("namingPatternType"); + writer.WriteStringValue(NamingPatternType.ToString()); + writer.WriteEndObject(); + } + + internal static SingleServerCustomResourceNames DeserializeSingleServerCustomResourceNames(JsonElement element) + { + if (element.TryGetProperty("namingPatternType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FullResourceName": return SingleServerFullResourceNames.DeserializeSingleServerFullResourceNames(element); + } + } + return UnknownSingleServerCustomResourceNames.DeserializeUnknownSingleServerCustomResourceNames(element); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerCustomResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerCustomResourceNames.cs new file mode 100644 index 0000000000000..15d51ae945c50 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerCustomResourceNames.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// + /// The resource-names input to specify custom names for underlying azure resources that are part of a single server SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class SingleServerCustomResourceNames + { + /// Initializes a new instance of SingleServerCustomResourceNames. + protected SingleServerCustomResourceNames() + { + } + + /// Initializes a new instance of SingleServerCustomResourceNames. + /// The pattern type to be used for resource naming. + internal SingleServerCustomResourceNames(NamingPatternType namingPatternType) + { + NamingPatternType = namingPatternType; + } + + /// The pattern type to be used for resource naming. + internal NamingPatternType NamingPatternType { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs new file mode 100644 index 0000000000000..0fb8320f58291 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerFullResourceNames.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class SingleServerFullResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VirtualMachine)) + { + writer.WritePropertyName("virtualMachine"); + writer.WriteObjectValue(VirtualMachine); + } + writer.WritePropertyName("namingPatternType"); + writer.WriteStringValue(NamingPatternType.ToString()); + writer.WriteEndObject(); + } + + internal static SingleServerFullResourceNames DeserializeSingleServerFullResourceNames(JsonElement element) + { + Optional virtualMachine = default; + NamingPatternType namingPatternType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachine")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + virtualMachine = VirtualMachineResourceNames.DeserializeVirtualMachineResourceNames(property.Value); + continue; + } + if (property.NameEquals("namingPatternType")) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + } + return new SingleServerFullResourceNames(namingPatternType, virtualMachine.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerFullResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerFullResourceNames.cs new file mode 100644 index 0000000000000..622f9f5aa1d51 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerFullResourceNames.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The resource name object where the specified values will be full resource names of the corresponding resources in a single server SAP system. + public partial class SingleServerFullResourceNames : SingleServerCustomResourceNames + { + /// Initializes a new instance of SingleServerFullResourceNames. + public SingleServerFullResourceNames() + { + NamingPatternType = NamingPatternType.FullResourceName; + } + + /// Initializes a new instance of SingleServerFullResourceNames. + /// The pattern type to be used for resource naming. + /// The resource names object for virtual machine and related resources. + internal SingleServerFullResourceNames(NamingPatternType namingPatternType, VirtualMachineResourceNames virtualMachine) : base(namingPatternType) + { + VirtualMachine = virtualMachine; + NamingPatternType = namingPatternType; + } + + /// The resource names object for virtual machine and related resources. + public VirtualMachineResourceNames VirtualMachine { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerRecommendationResult.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerRecommendationResult.cs index d63de2e57cf28..60cd60474b4ef 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerRecommendationResult.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SingleServerRecommendationResult.cs @@ -17,7 +17,7 @@ internal SingleServerRecommendationResult() } /// Initializes a new instance of SingleServerRecommendationResult. - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. /// The recommended VM SKU for single server. internal SingleServerRecommendationResult(SapDeploymentType deploymentType, string vmSku) : base(deploymentType) { diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SiteProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SiteProfile.Serialization.cs deleted file mode 100644 index 5b272b6ac9a5f..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SiteProfile.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - internal partial class SiteProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DomainName)) - { - writer.WritePropertyName("domainName"); - writer.WriteStringValue(DomainName); - } - writer.WriteEndObject(); - } - - internal static SiteProfile DeserializeSiteProfile(JsonElement element) - { - Optional domainName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("domainName")) - { - domainName = property.Value.GetString(); - continue; - } - } - return new SiteProfile(domainName.Value); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SiteProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SiteProfile.cs deleted file mode 100644 index 11f9986283885..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SiteProfile.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Workload website profile. - internal partial class SiteProfile - { - /// Initializes a new instance of SiteProfile. - public SiteProfile() - { - } - - /// Initializes a new instance of SiteProfile. - /// Domain name for the application site URL. - internal SiteProfile(string domainName) - { - DomainName = domainName; - } - - /// Domain name for the application site URL. - public string DomainName { get; set; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs new file mode 100644 index 0000000000000..e12e5dd85d2da --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkipFileShareConfiguration.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class SkipFileShareConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("configurationType"); + writer.WriteStringValue(ConfigurationType.ToString()); + writer.WriteEndObject(); + } + + internal static SkipFileShareConfiguration DeserializeSkipFileShareConfiguration(JsonElement element) + { + ConfigurationType configurationType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType")) + { + configurationType = new ConfigurationType(property.Value.GetString()); + continue; + } + } + return new SkipFileShareConfiguration(configurationType); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkipFileShareConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkipFileShareConfiguration.cs new file mode 100644 index 0000000000000..ea371e1736b5b --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkipFileShareConfiguration.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// Gets or sets the skip file share configuration. + public partial class SkipFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of SkipFileShareConfiguration. + public SkipFileShareConfiguration() + { + ConfigurationType = ConfigurationType.Skip; + } + + /// Initializes a new instance of SkipFileShareConfiguration. + /// The type of file share config. + internal SkipFileShareConfiguration(ConfigurationType configurationType) : base(configurationType) + { + ConfigurationType = configurationType; + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCapability.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCapability.Serialization.cs deleted file mode 100644 index 30fa6ce8dfa67..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCapability.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class SkuCapability - { - internal static SkuCapability DeserializeSkuCapability(JsonElement element) - { - Optional name = default; - Optional value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - } - return new SkuCapability(name.Value, value.Value); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCapability.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCapability.cs deleted file mode 100644 index 559bde31a2822..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCapability.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Workloads.Models -{ - /// The SKU capability definition. - public partial class SkuCapability - { - /// Initializes a new instance of SkuCapability. - internal SkuCapability() - { - } - - /// Initializes a new instance of SkuCapability. - /// The capability name. - /// The capability value. - internal SkuCapability(string name, string value) - { - Name = name; - Value = value; - } - - /// The capability name. - public string Name { get; } - /// The capability value. - public string Value { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCost.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCost.Serialization.cs deleted file mode 100644 index c6673ce752210..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCost.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class SkuCost - { - internal static SkuCost DeserializeSkuCost(JsonElement element) - { - Optional meterId = default; - Optional quantity = default; - Optional extendedUnit = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("meterId")) - { - meterId = property.Value.GetString(); - continue; - } - if (property.NameEquals("quantity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - quantity = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("extendedUnit")) - { - extendedUnit = property.Value.GetString(); - continue; - } - } - return new SkuCost(meterId.Value, Optional.ToNullable(quantity), extendedUnit.Value); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCost.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCost.cs deleted file mode 100644 index 61ec7ffcbc9c0..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuCost.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Workloads.Models -{ - /// The SKU cost definition. - public partial class SkuCost - { - /// Initializes a new instance of SkuCost. - internal SkuCost() - { - } - - /// Initializes a new instance of SkuCost. - /// Billing meter id. - /// The quantity. - /// The extended unit. - internal SkuCost(string meterId, int? quantity, string extendedUnit) - { - MeterId = meterId; - Quantity = quantity; - ExtendedUnit = extendedUnit; - } - - /// Billing meter id. - public string MeterId { get; } - /// The quantity. - public int? Quantity { get; } - /// The extended unit. - public string ExtendedUnit { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuDefinition.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuDefinition.Serialization.cs deleted file mode 100644 index 45f23199ef1b0..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuDefinition.Serialization.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class SkuDefinition - { - internal static SkuDefinition DeserializeSkuDefinition(JsonElement element) - { - string name = default; - Optional resourceType = default; - Optional tier = default; - Optional size = default; - Optional family = default; - Optional kind = default; - Optional> locations = default; - Optional> locationInfo = default; - Optional capacity = default; - Optional> costs = default; - Optional> capabilities = default; - Optional> restrictions = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceType")) - { - resourceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("tier")) - { - tier = property.Value.GetString(); - continue; - } - if (property.NameEquals("size")) - { - size = property.Value.GetString(); - continue; - } - if (property.NameEquals("family")) - { - family = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind")) - { - kind = property.Value.GetString(); - continue; - } - if (property.NameEquals("locations")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new AzureLocation(item.GetString())); - } - locations = array; - continue; - } - if (property.NameEquals("locationInfo")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SkuLocationAndZones.DeserializeSkuLocationAndZones(item)); - } - locationInfo = array; - continue; - } - if (property.NameEquals("capacity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - capacity = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("costs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SkuCost.DeserializeSkuCost(item)); - } - costs = array; - continue; - } - if (property.NameEquals("capabilities")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SkuCapability.DeserializeSkuCapability(item)); - } - capabilities = array; - continue; - } - if (property.NameEquals("restrictions")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SkuRestriction.DeserializeSkuRestriction(item)); - } - restrictions = array; - continue; - } - } - return new SkuDefinition(name, resourceType.Value, tier.Value, size.Value, family.Value, kind.Value, Optional.ToList(locations), Optional.ToList(locationInfo), capacity.Value, Optional.ToList(costs), Optional.ToList(capabilities), Optional.ToList(restrictions)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuDefinition.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuDefinition.cs deleted file mode 100644 index 90d524e32cfc3..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuDefinition.cs +++ /dev/null @@ -1,115 +0,0 @@ -// 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.Workloads.Models -{ - /// The SKU definition. - public partial class SkuDefinition - { - /// Initializes a new instance of SkuDefinition. - /// The name of the SKU. - /// is null. - internal SkuDefinition(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - Locations = new ChangeTrackingList(); - LocationInfo = new ChangeTrackingList(); - Costs = new ChangeTrackingList(); - Capabilities = new ChangeTrackingList(); - Restrictions = new ChangeTrackingList(); - } - - /// Initializes a new instance of SkuDefinition. - /// The name of the SKU. - /// Resource type the SKU applicable for. - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// If the service has different kinds of hardware, for the same SKU, then that can be captured here. - /// List of locations where this SKU is available. - /// List of locations where this SKU is available. - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. - /// The SKU costs. - /// The SKU capabilities. - /// The SKU restrictions. - internal SkuDefinition(string name, string resourceType, string tier, string size, string family, string kind, IReadOnlyList locations, IReadOnlyList locationInfo, BinaryData capacity, IReadOnlyList costs, IReadOnlyList capabilities, IReadOnlyList restrictions) - { - Name = name; - ResourceType = resourceType; - Tier = tier; - Size = size; - Family = family; - Kind = kind; - Locations = locations; - LocationInfo = locationInfo; - Capacity = capacity; - Costs = costs; - Capabilities = capabilities; - Restrictions = restrictions; - } - - /// The name of the SKU. - public string Name { get; } - /// Resource type the SKU applicable for. - public string ResourceType { get; } - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - public string Tier { get; } - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - public string Size { get; } - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - public string Family { get; } - /// If the service has different kinds of hardware, for the same SKU, then that can be captured here. - public string Kind { get; } - /// List of locations where this SKU is available. - public IReadOnlyList Locations { get; } - /// List of locations where this SKU is available. - public IReadOnlyList LocationInfo { get; } - /// - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated 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" }. - /// - /// - /// - /// - public BinaryData Capacity { get; } - /// The SKU costs. - public IReadOnlyList Costs { get; } - /// The SKU capabilities. - public IReadOnlyList Capabilities { get; } - /// The SKU restrictions. - public IReadOnlyList Restrictions { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuLocationAndZones.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuLocationAndZones.Serialization.cs deleted file mode 100644 index 8df9d828bbe7b..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuLocationAndZones.Serialization.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class SkuLocationAndZones - { - internal static SkuLocationAndZones DeserializeSkuLocationAndZones(JsonElement element) - { - Optional location = default; - Optional> zones = default; - Optional> zoneDetails = default; - Optional> extendedLocations = default; - Optional type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("location")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("zones")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - zones = array; - continue; - } - if (property.NameEquals("zoneDetails")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SkuZoneDetail.DeserializeSkuZoneDetail(item)); - } - zoneDetails = array; - continue; - } - if (property.NameEquals("extendedLocations")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - extendedLocations = array; - continue; - } - if (property.NameEquals("type")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - type = new LocationType(property.Value.GetString()); - continue; - } - } - return new SkuLocationAndZones(Optional.ToNullable(location), Optional.ToList(zones), Optional.ToList(zoneDetails), Optional.ToList(extendedLocations), Optional.ToNullable(type)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuLocationAndZones.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuLocationAndZones.cs deleted file mode 100644 index 2700d3a39a731..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuLocationAndZones.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// The SKU location and zone. - public partial class SkuLocationAndZones - { - /// Initializes a new instance of SkuLocationAndZones. - internal SkuLocationAndZones() - { - Zones = new ChangeTrackingList(); - ZoneDetails = new ChangeTrackingList(); - ExtendedLocations = new ChangeTrackingList(); - } - - /// Initializes a new instance of SkuLocationAndZones. - /// The location of the SKU. - /// The availability zones of SKU location. - /// The availability zone details of the SKU location. - /// The extended locations of SKU. - /// Type of the extended location. - internal SkuLocationAndZones(AzureLocation? location, IReadOnlyList zones, IReadOnlyList zoneDetails, IReadOnlyList extendedLocations, LocationType? locationType) - { - Location = location; - Zones = zones; - ZoneDetails = zoneDetails; - ExtendedLocations = extendedLocations; - LocationType = locationType; - } - - /// The location of the SKU. - public AzureLocation? Location { get; } - /// The availability zones of SKU location. - public IReadOnlyList Zones { get; } - /// The availability zone details of the SKU location. - public IReadOnlyList ZoneDetails { get; } - /// The extended locations of SKU. - public IReadOnlyList ExtendedLocations { get; } - /// Type of the extended location. - public LocationType? LocationType { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestriction.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestriction.cs deleted file mode 100644 index 8537edd90496b..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestriction.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// The SKU restriction definition. - public partial class SkuRestriction - { - /// Initializes a new instance of SkuRestriction. - internal SkuRestriction() - { - Values = new ChangeTrackingList(); - } - - /// Initializes a new instance of SkuRestriction. - /// The SKU restriction type. - /// Restriction values. - /// The restriction information. - /// The SKU restriction reason code. - internal SkuRestriction(SkuRestrictionType? restrictionType, IReadOnlyList values, RestrictionInfo restrictionInfo, SkuRestrictionReasonCode? reasonCode) - { - RestrictionType = restrictionType; - Values = values; - RestrictionInfo = restrictionInfo; - ReasonCode = reasonCode; - } - - /// The SKU restriction type. - public SkuRestrictionType? RestrictionType { get; } - /// Restriction values. - public IReadOnlyList Values { get; } - /// The restriction information. - public RestrictionInfo RestrictionInfo { get; } - /// The SKU restriction reason code. - public SkuRestrictionReasonCode? ReasonCode { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestrictionReasonCode.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestrictionReasonCode.cs deleted file mode 100644 index ea0df3a1c9ff2..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestrictionReasonCode.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.Workloads.Models -{ - /// The SKU restriction reason code. - public readonly partial struct SkuRestrictionReasonCode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SkuRestrictionReasonCode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotSpecifiedValue = "NotSpecified"; - private const string QuotaIdValue = "QuotaId"; - private const string NotAvailableForSubscriptionValue = "NotAvailableForSubscription"; - - /// NotSpecified. - public static SkuRestrictionReasonCode NotSpecified { get; } = new SkuRestrictionReasonCode(NotSpecifiedValue); - /// QuotaId. - public static SkuRestrictionReasonCode QuotaId { get; } = new SkuRestrictionReasonCode(QuotaIdValue); - /// NotAvailableForSubscription. - public static SkuRestrictionReasonCode NotAvailableForSubscription { get; } = new SkuRestrictionReasonCode(NotAvailableForSubscriptionValue); - /// Determines if two values are the same. - public static bool operator ==(SkuRestrictionReasonCode left, SkuRestrictionReasonCode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SkuRestrictionReasonCode left, SkuRestrictionReasonCode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SkuRestrictionReasonCode(string value) => new SkuRestrictionReasonCode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SkuRestrictionReasonCode other && Equals(other); - /// - public bool Equals(SkuRestrictionReasonCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestrictionType.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestrictionType.cs deleted file mode 100644 index aeeda142ff923..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuRestrictionType.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.Workloads.Models -{ - /// The SKU restriction type. - public readonly partial struct SkuRestrictionType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SkuRestrictionType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotSpecifiedValue = "NotSpecified"; - private const string LocationValue = "Location"; - private const string ZoneValue = "Zone"; - - /// NotSpecified. - public static SkuRestrictionType NotSpecified { get; } = new SkuRestrictionType(NotSpecifiedValue); - /// Location. - public static SkuRestrictionType Location { get; } = new SkuRestrictionType(LocationValue); - /// Zone. - public static SkuRestrictionType Zone { get; } = new SkuRestrictionType(ZoneValue); - /// Determines if two values are the same. - public static bool operator ==(SkuRestrictionType left, SkuRestrictionType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SkuRestrictionType left, SkuRestrictionType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SkuRestrictionType(string value) => new SkuRestrictionType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SkuRestrictionType other && Equals(other); - /// - public bool Equals(SkuRestrictionType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuZoneDetail.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuZoneDetail.Serialization.cs deleted file mode 100644 index 3628a40feef5a..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuZoneDetail.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class SkuZoneDetail - { - internal static SkuZoneDetail DeserializeSkuZoneDetail(JsonElement element) - { - Optional> zones = default; - Optional> capabilities = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("zones")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - zones = array; - continue; - } - if (property.NameEquals("capabilities")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SkuCapability.DeserializeSkuCapability(item)); - } - capabilities = array; - continue; - } - } - return new SkuZoneDetail(Optional.ToList(zones), Optional.ToList(capabilities)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuZoneDetail.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuZoneDetail.cs deleted file mode 100644 index 8cd84e89b006b..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkuZoneDetail.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// The SKU zone details. - public partial class SkuZoneDetail - { - /// Initializes a new instance of SkuZoneDetail. - internal SkuZoneDetail() - { - Zones = new ChangeTrackingList(); - Capabilities = new ChangeTrackingList(); - } - - /// Initializes a new instance of SkuZoneDetail. - /// The physical zones. - /// The capabilities. - internal SkuZoneDetail(IReadOnlyList zones, IReadOnlyList capabilities) - { - Zones = zones; - Capabilities = capabilities; - } - - /// The physical zones. - public IReadOnlyList Zones { get; } - /// The capabilities. - public IReadOnlyList Capabilities { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkusListResult.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkusListResult.Serialization.cs deleted file mode 100644 index cfe48fc106c19..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkusListResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - internal partial class SkusListResult - { - internal static SkusListResult DeserializeSkusListResult(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SkuDefinition.DeserializeSkuDefinition(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new SkusListResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkusListResult.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkusListResult.cs deleted file mode 100644 index 33cc7fd5a6543..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SkusListResult.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// A list of SKUs supported by an Azure Resource Provider. - internal partial class SkusListResult - { - /// Initializes a new instance of SkusListResult. - internal SkusListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of SkusListResult. - /// List of SKUs supported by the resource provider. - /// URL to get the next set of SKU list results (if there are any). - internal SkusListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of SKUs supported by the resource provider. - public IReadOnlyList Value { get; } - /// URL to get the next set of SKU list results (if there are any). - public string NextLink { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SoftwareConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SoftwareConfiguration.Serialization.cs index 0a84bb9d7e92d..16ec249fc4c55 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SoftwareConfiguration.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SoftwareConfiguration.Serialization.cs @@ -26,6 +26,7 @@ internal static SoftwareConfiguration DeserializeSoftwareConfiguration(JsonEleme { switch (discriminator.GetString()) { + case "External": return ExternalInstallationSoftwareConfiguration.DeserializeExternalInstallationSoftwareConfiguration(element); case "SAPInstallWithoutOSConfig": return SapInstallWithoutOSConfigSoftwareConfiguration.DeserializeSapInstallWithoutOSConfigSoftwareConfiguration(element); case "ServiceInitiated": return ServiceInitiatedSoftwareConfiguration.DeserializeServiceInitiatedSoftwareConfiguration(element); } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SoftwareConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SoftwareConfiguration.cs index e6c7448ff2771..7be7e00a76dd3 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SoftwareConfiguration.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SoftwareConfiguration.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Workloads.Models /// /// The SAP Software configuration Input. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include and . + /// The available derived classes include , and . /// public abstract partial class SoftwareConfiguration { diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SslPreference.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SslPreference.cs new file mode 100644 index 0000000000000..4887d0b0ee31a --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/SslPreference.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.Workloads.Models +{ + /// Gets or sets certificate preference if secure communication is enabled. + public readonly partial struct SslPreference : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SslPreference(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string RootCertificateValue = "RootCertificate"; + private const string ServerCertificateValue = "ServerCertificate"; + + /// Disabled. + public static SslPreference Disabled { get; } = new SslPreference(DisabledValue); + /// RootCertificate. + public static SslPreference RootCertificate { get; } = new SslPreference(RootCertificateValue); + /// ServerCertificate. + public static SslPreference ServerCertificate { get; } = new SslPreference(ServerCertificateValue); + /// Determines if two values are the same. + public static bool operator ==(SslPreference left, SslPreference right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SslPreference left, SslPreference right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SslPreference(string value) => new SslPreference(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SslPreference other && Equals(other); + /// + public bool Equals(SslPreference other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopContent.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopContent.cs deleted file mode 100644 index 4d934df55434e..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopContent.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Workloads.Models -{ - /// Stop SAP Request. - public partial class StopContent - { - /// Initializes a new instance of StopContent. - public StopContent() - { - } - - /// A boolean to specify if the SAP system should be hard-stopped. - public bool? HardStop { get; set; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopContent.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopRequest.Serialization.cs similarity index 62% rename from sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopContent.Serialization.cs rename to sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopRequest.Serialization.cs index 497b4d4eb7a80..a58074da2130e 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopContent.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopRequest.Serialization.cs @@ -10,15 +10,15 @@ namespace Azure.ResourceManager.Workloads.Models { - public partial class StopContent : IUtf8JsonSerializable + public partial class StopRequest : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); - if (Optional.IsDefined(HardStop)) + if (Optional.IsDefined(SoftStopTimeoutSeconds)) { - writer.WritePropertyName("hardStop"); - writer.WriteBooleanValue(HardStop.Value); + writer.WritePropertyName("softStopTimeoutSeconds"); + writer.WriteNumberValue(SoftStopTimeoutSeconds.Value); } writer.WriteEndObject(); } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopRequest.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopRequest.cs new file mode 100644 index 0000000000000..2c4617ec9bdf9 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StopRequest.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// Stop SAP instance(s) request body. + public partial class StopRequest + { + /// Initializes a new instance of StopRequest. + public StopRequest() + { + } + + /// This parameter defines how long (in seconds) the soft shutdown waits until the RFC/HTTP clients no longer consider the server for calls with load balancing. Value 0 means that the kernel does not wait, but goes directly into the next shutdown state, i.e. hard stop. + public long? SoftStopTimeoutSeconds { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StorageConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StorageConfiguration.Serialization.cs new file mode 100644 index 0000000000000..2a0828831a350 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StorageConfiguration.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + internal partial class StorageConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(TransportFileShareConfiguration)) + { + writer.WritePropertyName("transportFileShareConfiguration"); + writer.WriteObjectValue(TransportFileShareConfiguration); + } + writer.WriteEndObject(); + } + + internal static StorageConfiguration DeserializeStorageConfiguration(JsonElement element) + { + Optional transportFileShareConfiguration = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("transportFileShareConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + transportFileShareConfiguration = FileShareConfiguration.DeserializeFileShareConfiguration(property.Value); + continue; + } + } + return new StorageConfiguration(transportFileShareConfiguration.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StorageConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StorageConfiguration.cs new file mode 100644 index 0000000000000..a1eed03b68804 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/StorageConfiguration.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// Gets or sets the storage configuration. + internal partial class StorageConfiguration + { + /// Initializes a new instance of StorageConfiguration. + public StorageConfiguration() + { + } + + /// Initializes a new instance of StorageConfiguration. + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + internal StorageConfiguration(FileShareConfiguration transportFileShareConfiguration) + { + TransportFileShareConfiguration = transportFileShareConfiguration; + } + + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public FileShareConfiguration TransportFileShareConfiguration { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierConfiguration.Serialization.cs index c464d57c1d9ea..9c1c54396e92b 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierConfiguration.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierConfiguration.Serialization.cs @@ -31,6 +31,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("highAvailabilityConfig"); writer.WriteObjectValue(HighAvailabilityConfig); } + if (Optional.IsDefined(StorageConfiguration)) + { + writer.WritePropertyName("storageConfiguration"); + writer.WriteObjectValue(StorageConfiguration); + } + if (Optional.IsDefined(CustomResourceNames)) + { + writer.WritePropertyName("customResourceNames"); + writer.WriteObjectValue(CustomResourceNames); + } writer.WritePropertyName("deploymentType"); writer.WriteStringValue(DeploymentType.ToString()); writer.WritePropertyName("appResourceGroup"); @@ -45,6 +55,8 @@ internal static ThreeTierConfiguration DeserializeThreeTierConfiguration(JsonEle ApplicationServerConfiguration applicationServer = default; DatabaseConfiguration databaseServer = default; Optional highAvailabilityConfig = default; + Optional storageConfiguration = default; + Optional customResourceNames = default; SapDeploymentType deploymentType = default; string appResourceGroup = default; foreach (var property in element.EnumerateObject()) @@ -84,6 +96,26 @@ internal static ThreeTierConfiguration DeserializeThreeTierConfiguration(JsonEle highAvailabilityConfig = HighAvailabilityConfiguration.DeserializeHighAvailabilityConfiguration(property.Value); continue; } + if (property.NameEquals("storageConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + storageConfiguration = StorageConfiguration.DeserializeStorageConfiguration(property.Value); + continue; + } + if (property.NameEquals("customResourceNames")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + customResourceNames = ThreeTierCustomResourceNames.DeserializeThreeTierCustomResourceNames(property.Value); + continue; + } if (property.NameEquals("deploymentType")) { deploymentType = new SapDeploymentType(property.Value.GetString()); @@ -95,7 +127,7 @@ internal static ThreeTierConfiguration DeserializeThreeTierConfiguration(JsonEle continue; } } - return new ThreeTierConfiguration(deploymentType, appResourceGroup, networkConfiguration.Value, centralServer, applicationServer, databaseServer, highAvailabilityConfig.Value); + return new ThreeTierConfiguration(deploymentType, appResourceGroup, networkConfiguration.Value, centralServer, applicationServer, databaseServer, highAvailabilityConfig.Value, storageConfiguration.Value, customResourceNames.Value); } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierConfiguration.cs index 076e631d3bc1c..776caf7ae446a 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierConfiguration.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierConfiguration.cs @@ -33,26 +33,34 @@ public ThreeTierConfiguration(string appResourceGroup, CentralServerConfiguratio } /// Initializes a new instance of ThreeTierConfiguration. - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. /// The application resource group where SAP system resources will be deployed. /// Network configuration common to all servers. /// The central server configuration. /// The application server configuration. /// The database configuration. /// The high availability configuration. - internal ThreeTierConfiguration(SapDeploymentType deploymentType, string appResourceGroup, NetworkConfiguration networkConfiguration, CentralServerConfiguration centralServer, ApplicationServerConfiguration applicationServer, DatabaseConfiguration databaseServer, HighAvailabilityConfiguration highAvailabilityConfig) : base(deploymentType, appResourceGroup) + /// The storage configuration. + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal ThreeTierConfiguration(SapDeploymentType deploymentType, string appResourceGroup, NetworkConfiguration networkConfiguration, CentralServerConfiguration centralServer, ApplicationServerConfiguration applicationServer, DatabaseConfiguration databaseServer, HighAvailabilityConfiguration highAvailabilityConfig, StorageConfiguration storageConfiguration, ThreeTierCustomResourceNames customResourceNames) : base(deploymentType, appResourceGroup) { NetworkConfiguration = networkConfiguration; CentralServer = centralServer; ApplicationServer = applicationServer; DatabaseServer = databaseServer; HighAvailabilityConfig = highAvailabilityConfig; + StorageConfiguration = storageConfiguration; + CustomResourceNames = customResourceNames; DeploymentType = deploymentType; } /// Network configuration common to all servers. internal NetworkConfiguration NetworkConfiguration { get; set; } - /// Specifies whether a secondary IP address should be added to the network interface on all VMs. + /// Specifies whether a secondary IP address should be added to the network interface on all VMs of the SAP system being deployed. public bool? IsSecondaryIPEnabled { get => NetworkConfiguration is null ? default : NetworkConfiguration.IsSecondaryIPEnabled; @@ -81,5 +89,32 @@ public SapHighAvailabilityType? HighAvailabilityType HighAvailabilityConfig = value.HasValue ? new HighAvailabilityConfiguration(value.Value) : null; } } + + /// The storage configuration. + internal StorageConfiguration StorageConfiguration { get; set; } + /// + /// The properties of the transport directory attached to the VIS. The default for transportFileShareConfiguration is the createAndMount flow if storage configuration is missing. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public FileShareConfiguration StorageTransportFileShareConfiguration + { + get => StorageConfiguration is null ? default : StorageConfiguration.TransportFileShareConfiguration; + set + { + if (StorageConfiguration is null) + StorageConfiguration = new StorageConfiguration(); + StorageConfiguration.TransportFileShareConfiguration = value; + } + } + + /// + /// The set of custom names to be used for underlying azure resources that are part of the SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public ThreeTierCustomResourceNames CustomResourceNames { get; set; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs new file mode 100644 index 0000000000000..06e836bc91aea --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierCustomResourceNames.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class ThreeTierCustomResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("namingPatternType"); + writer.WriteStringValue(NamingPatternType.ToString()); + writer.WriteEndObject(); + } + + internal static ThreeTierCustomResourceNames DeserializeThreeTierCustomResourceNames(JsonElement element) + { + if (element.TryGetProperty("namingPatternType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "FullResourceName": return ThreeTierFullResourceNames.DeserializeThreeTierFullResourceNames(element); + } + } + return UnknownThreeTierCustomResourceNames.DeserializeUnknownThreeTierCustomResourceNames(element); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierCustomResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierCustomResourceNames.cs new file mode 100644 index 0000000000000..cd855abc49cf1 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierCustomResourceNames.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// + /// The resource-names input to specify custom names for underlying azure resources that are part of a three tier SAP system. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class ThreeTierCustomResourceNames + { + /// Initializes a new instance of ThreeTierCustomResourceNames. + protected ThreeTierCustomResourceNames() + { + } + + /// Initializes a new instance of ThreeTierCustomResourceNames. + /// The pattern type to be used for resource naming. + internal ThreeTierCustomResourceNames(NamingPatternType namingPatternType) + { + NamingPatternType = namingPatternType; + } + + /// The pattern type to be used for resource naming. + internal NamingPatternType NamingPatternType { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs new file mode 100644 index 0000000000000..988af98cfa434 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierFullResourceNames.Serialization.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class ThreeTierFullResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CentralServer)) + { + writer.WritePropertyName("centralServer"); + writer.WriteObjectValue(CentralServer); + } + if (Optional.IsDefined(ApplicationServer)) + { + writer.WritePropertyName("applicationServer"); + writer.WriteObjectValue(ApplicationServer); + } + if (Optional.IsDefined(DatabaseServer)) + { + writer.WritePropertyName("databaseServer"); + writer.WriteObjectValue(DatabaseServer); + } + if (Optional.IsDefined(SharedStorage)) + { + writer.WritePropertyName("sharedStorage"); + writer.WriteObjectValue(SharedStorage); + } + writer.WritePropertyName("namingPatternType"); + writer.WriteStringValue(NamingPatternType.ToString()); + writer.WriteEndObject(); + } + + internal static ThreeTierFullResourceNames DeserializeThreeTierFullResourceNames(JsonElement element) + { + Optional centralServer = default; + Optional applicationServer = default; + Optional databaseServer = default; + Optional sharedStorage = default; + NamingPatternType namingPatternType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("centralServer")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + centralServer = CentralServerFullResourceNames.DeserializeCentralServerFullResourceNames(property.Value); + continue; + } + if (property.NameEquals("applicationServer")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + applicationServer = ApplicationServerFullResourceNames.DeserializeApplicationServerFullResourceNames(property.Value); + continue; + } + if (property.NameEquals("databaseServer")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + databaseServer = DatabaseServerFullResourceNames.DeserializeDatabaseServerFullResourceNames(property.Value); + continue; + } + if (property.NameEquals("sharedStorage")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sharedStorage = SharedStorageResourceNames.DeserializeSharedStorageResourceNames(property.Value); + continue; + } + if (property.NameEquals("namingPatternType")) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + } + return new ThreeTierFullResourceNames(namingPatternType, centralServer.Value, applicationServer.Value, databaseServer.Value, sharedStorage.Value); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierFullResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierFullResourceNames.cs new file mode 100644 index 0000000000000..cbacc37522afb --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierFullResourceNames.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The resource name object where the specified values will be full resource names of the corresponding resources in a three tier SAP system. + public partial class ThreeTierFullResourceNames : ThreeTierCustomResourceNames + { + /// Initializes a new instance of ThreeTierFullResourceNames. + public ThreeTierFullResourceNames() + { + NamingPatternType = NamingPatternType.FullResourceName; + } + + /// Initializes a new instance of ThreeTierFullResourceNames. + /// The pattern type to be used for resource naming. + /// The full resource names object for central server layer resources. + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + /// The resource names object for shared storage. + internal ThreeTierFullResourceNames(NamingPatternType namingPatternType, CentralServerFullResourceNames centralServer, ApplicationServerFullResourceNames applicationServer, DatabaseServerFullResourceNames databaseServer, SharedStorageResourceNames sharedStorage) : base(namingPatternType) + { + CentralServer = centralServer; + ApplicationServer = applicationServer; + DatabaseServer = databaseServer; + SharedStorage = sharedStorage; + NamingPatternType = namingPatternType; + } + + /// The full resource names object for central server layer resources. + public CentralServerFullResourceNames CentralServer { get; set; } + /// The full resource names object for application layer resources. The number of entries in this list should be equal to the number VMs to be created for application layer. + public ApplicationServerFullResourceNames ApplicationServer { get; set; } + /// The full resource names object for database layer resources. The number of entries in this list should be equal to the number VMs to be created for database layer. + public DatabaseServerFullResourceNames DatabaseServer { get; set; } + /// The resource names object for shared storage. + public SharedStorageResourceNames SharedStorage { get; set; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierRecommendationResult.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierRecommendationResult.cs index 9ea1a766febc1..ed83d24afd7a1 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierRecommendationResult.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/ThreeTierRecommendationResult.cs @@ -17,7 +17,7 @@ internal ThreeTierRecommendationResult() } /// Initializes a new instance of ThreeTierRecommendationResult. - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. /// The database VM SKU. /// The database server instance count. /// The central server VM SKU. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs new file mode 100644 index 0000000000000..0992547b52392 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownFileShareConfiguration.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + internal partial class UnknownFileShareConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("configurationType"); + writer.WriteStringValue(ConfigurationType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownFileShareConfiguration DeserializeUnknownFileShareConfiguration(JsonElement element) + { + ConfigurationType configurationType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configurationType")) + { + configurationType = new ConfigurationType(property.Value.GetString()); + continue; + } + } + return new UnknownFileShareConfiguration(configurationType); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownFileShareConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownFileShareConfiguration.cs new file mode 100644 index 0000000000000..9a62c8f724ff5 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownFileShareConfiguration.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The UnknownFileShareConfiguration. + internal partial class UnknownFileShareConfiguration : FileShareConfiguration + { + /// Initializes a new instance of UnknownFileShareConfiguration. + /// The type of file share config. + internal UnknownFileShareConfiguration(ConfigurationType configurationType) : base(configurationType) + { + ConfigurationType = configurationType; + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownInfrastructureConfiguration.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownInfrastructureConfiguration.cs index bce18c16d2166..36149690fc164 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownInfrastructureConfiguration.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownInfrastructureConfiguration.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Workloads.Models internal partial class UnknownInfrastructureConfiguration : InfrastructureConfiguration { /// Initializes a new instance of UnknownInfrastructureConfiguration. - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. /// The application resource group where SAP system resources will be deployed. internal UnknownInfrastructureConfiguration(SapDeploymentType deploymentType, string appResourceGroup) : base(deploymentType, appResourceGroup) { diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSapSizingRecommendationResult.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSapSizingRecommendationResult.cs index a418e9b6a7864..44baa0145c445 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSapSizingRecommendationResult.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSapSizingRecommendationResult.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.Workloads.Models internal partial class UnknownSapSizingRecommendationResult : SapSizingRecommendationResult { /// Initializes a new instance of UnknownSapSizingRecommendationResult. - /// The deployment Type. + /// The type of SAP deployment, single server or Three tier. internal UnknownSapSizingRecommendationResult(SapDeploymentType deploymentType) : base(deploymentType) { DeploymentType = deploymentType; diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs new file mode 100644 index 0000000000000..a5da3c172a280 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSingleServerCustomResourceNames.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + internal partial class UnknownSingleServerCustomResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("namingPatternType"); + writer.WriteStringValue(NamingPatternType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownSingleServerCustomResourceNames DeserializeUnknownSingleServerCustomResourceNames(JsonElement element) + { + NamingPatternType namingPatternType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namingPatternType")) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + } + return new UnknownSingleServerCustomResourceNames(namingPatternType); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs new file mode 100644 index 0000000000000..fe0b2ee5e70e2 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownSingleServerCustomResourceNames.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The UnknownSingleServerCustomResourceNames. + internal partial class UnknownSingleServerCustomResourceNames : SingleServerCustomResourceNames + { + /// Initializes a new instance of UnknownSingleServerCustomResourceNames. + /// The pattern type to be used for resource naming. + internal UnknownSingleServerCustomResourceNames(NamingPatternType namingPatternType) : base(namingPatternType) + { + NamingPatternType = namingPatternType; + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs new file mode 100644 index 0000000000000..b03aa207ed745 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownThreeTierCustomResourceNames.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + internal partial class UnknownThreeTierCustomResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("namingPatternType"); + writer.WriteStringValue(NamingPatternType.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownThreeTierCustomResourceNames DeserializeUnknownThreeTierCustomResourceNames(JsonElement element) + { + NamingPatternType namingPatternType = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("namingPatternType")) + { + namingPatternType = new NamingPatternType(property.Value.GetString()); + continue; + } + } + return new UnknownThreeTierCustomResourceNames(namingPatternType); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs new file mode 100644 index 0000000000000..70aa9362c1377 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UnknownThreeTierCustomResourceNames.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The UnknownThreeTierCustomResourceNames. + internal partial class UnknownThreeTierCustomResourceNames : ThreeTierCustomResourceNames + { + /// Initializes a new instance of UnknownThreeTierCustomResourceNames. + /// The pattern type to be used for resource naming. + internal UnknownThreeTierCustomResourceNames(NamingPatternType namingPatternType) : base(namingPatternType) + { + NamingPatternType = namingPatternType; + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UserProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UserProfile.Serialization.cs deleted file mode 100644 index 41bb332ad86b3..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UserProfile.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class UserProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("userName"); - writer.WriteStringValue(UserName); - writer.WritePropertyName("sshPublicKey"); - writer.WriteStringValue(SshPublicKey); - writer.WriteEndObject(); - } - - internal static UserProfile DeserializeUserProfile(JsonElement element) - { - string userName = default; - string sshPublicKey = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("userName")) - { - userName = property.Value.GetString(); - continue; - } - if (property.NameEquals("sshPublicKey")) - { - sshPublicKey = property.Value.GetString(); - continue; - } - } - return new UserProfile(userName, sshPublicKey); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UserProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UserProfile.cs deleted file mode 100644 index d5d5f9e2a6fc7..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/UserProfile.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// User profile to configure on a compute resources such as VM, VMSS. - public partial class UserProfile - { - /// Initializes a new instance of UserProfile. - /// User name. - /// SSH public key data. - /// or is null. - public UserProfile(string userName, string sshPublicKey) - { - Argument.AssertNotNull(userName, nameof(userName)); - Argument.AssertNotNull(sshPublicKey, nameof(sshPublicKey)); - - UserName = userName; - SshPublicKey = sshPublicKey; - } - - /// User name. - public string UserName { get; set; } - /// SSH public key data. - public string SshPublicKey { get; set; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs new file mode 100644 index 0000000000000..7ad4dfb48c98f --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VirtualMachineResourceNames.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + public partial class VirtualMachineResourceNames : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VmName)) + { + writer.WritePropertyName("vmName"); + writer.WriteStringValue(VmName); + } + if (Optional.IsDefined(HostName)) + { + writer.WritePropertyName("hostName"); + writer.WriteStringValue(HostName); + } + if (Optional.IsCollectionDefined(NetworkInterfaces)) + { + writer.WritePropertyName("networkInterfaces"); + writer.WriteStartArray(); + foreach (var item in NetworkInterfaces) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(OSDiskName)) + { + writer.WritePropertyName("osDiskName"); + writer.WriteStringValue(OSDiskName); + } + if (Optional.IsCollectionDefined(DataDiskNames)) + { + writer.WritePropertyName("dataDiskNames"); + writer.WriteStartObject(); + foreach (var item in DataDiskNames) + { + writer.WritePropertyName(item.Key); + writer.WriteStartArray(); + foreach (var item0 in item.Value) + { + writer.WriteStringValue(item0); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static VirtualMachineResourceNames DeserializeVirtualMachineResourceNames(JsonElement element) + { + Optional vmName = default; + Optional hostName = default; + Optional> networkInterfaces = default; + Optional osDiskName = default; + Optional>> dataDiskNames = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmName")) + { + vmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostName")) + { + hostName = property.Value.GetString(); + continue; + } + if (property.NameEquals("networkInterfaces")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkInterfaceResourceNames.DeserializeNetworkInterfaceResourceNames(item)); + } + networkInterfaces = array; + continue; + } + if (property.NameEquals("osDiskName")) + { + osDiskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataDiskNames")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary> dictionary = new Dictionary>(); + foreach (var property0 in property.Value.EnumerateObject()) + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dictionary.Add(property0.Name, array); + } + dataDiskNames = dictionary; + continue; + } + } + return new VirtualMachineResourceNames(vmName.Value, hostName.Value, Optional.ToList(networkInterfaces), osDiskName.Value, Optional.ToDictionary(dataDiskNames)); + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VirtualMachineResourceNames.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VirtualMachineResourceNames.cs new file mode 100644 index 0000000000000..4cf1c93c0b966 --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VirtualMachineResourceNames.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Workloads.Models +{ + /// The resource names object for virtual machine and related resources. + public partial class VirtualMachineResourceNames + { + /// Initializes a new instance of VirtualMachineResourceNames. + public VirtualMachineResourceNames() + { + NetworkInterfaces = new ChangeTrackingList(); + DataDiskNames = new ChangeTrackingDictionary>(); + } + + /// Initializes a new instance of VirtualMachineResourceNames. + /// The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. + /// The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName will be used as host name. + /// The list of network interface name objects for the selected virtual machine. Currently, only one network interface is supported per virtual machine. + /// The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached per Virtual Machine. + /// The full resource names for virtual machine data disks. This is a dictionary containing list of names of data disks per volume. Currently supported volumes for database layer are ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported. + internal VirtualMachineResourceNames(string vmName, string hostName, IList networkInterfaces, string osDiskName, IDictionary> dataDiskNames) + { + VmName = vmName; + HostName = hostName; + NetworkInterfaces = networkInterfaces; + OSDiskName = osDiskName; + DataDiskNames = dataDiskNames; + } + + /// The full name for virtual machine. The length of this field can be upto 64 characters. If name is not provided, service uses a default name based on the deployment type. For SingleServer, default name is {SID}vm. In case of HA-AvZone systems, default name will be {SID}{app/ascs/db}z{a/b}vm with an incrementor at the end in case of more than 1 vm per layer. For distributed and HA-AvSet systems, default name will be {SID}{app/ascs/db}vm with an incrementor at the end in case of more than 1 vm per layer. + public string VmName { get; set; } + /// The full name for virtual-machine's host (computer name). Currently, ACSS only supports host names which are less than or equal to 13 characters long. If this value is not provided, vmName will be used as host name. + public string HostName { get; set; } + /// The list of network interface name objects for the selected virtual machine. Currently, only one network interface is supported per virtual machine. + public IList NetworkInterfaces { get; } + /// The full name for OS disk attached to the VM. If this value is not provided, it will be named by ARM as per its default naming standards (prefixed with vm name). There is only one OS disk attached per Virtual Machine. + public string OSDiskName { get; set; } + /// The full resource names for virtual machine data disks. This is a dictionary containing list of names of data disks per volume. Currently supported volumes for database layer are ['hana/data', 'hana/log', hana/shared', 'usr/sap', 'os', 'backup']. For application and cs layers, only 'default' volume is supported. + public IDictionary> DataDiskNames { get; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VmssNodesProfile.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VmssNodesProfile.Serialization.cs deleted file mode 100644 index 3371a02b9148b..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VmssNodesProfile.Serialization.cs +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class VmssNodesProfile : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AutoScaleMinCount)) - { - writer.WritePropertyName("autoScaleMinCount"); - writer.WriteNumberValue(AutoScaleMinCount.Value); - } - if (Optional.IsDefined(AutoScaleMaxCount)) - { - writer.WritePropertyName("autoScaleMaxCount"); - writer.WriteNumberValue(AutoScaleMaxCount.Value); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("nodeSku"); - writer.WriteStringValue(NodeSku); - writer.WritePropertyName("osImage"); - writer.WriteObjectValue(OSImage); - writer.WritePropertyName("osDisk"); - writer.WriteObjectValue(OSDisk); - if (Optional.IsCollectionDefined(DataDisks)) - { - writer.WritePropertyName("dataDisks"); - writer.WriteStartArray(); - foreach (var item in DataDisks) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - writer.WriteEndObject(); - } - - internal static VmssNodesProfile DeserializeVmssNodesProfile(JsonElement element) - { - Optional autoScaleMinCount = default; - Optional autoScaleMaxCount = default; - Optional name = default; - string nodeSku = default; - OSImageProfile osImage = default; - DiskInfo osDisk = default; - Optional> dataDisks = default; - Optional> nodeResourceIds = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("autoScaleMinCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - autoScaleMinCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("autoScaleMaxCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - autoScaleMaxCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("nodeSku")) - { - nodeSku = property.Value.GetString(); - continue; - } - if (property.NameEquals("osImage")) - { - osImage = OSImageProfile.DeserializeOSImageProfile(property.Value); - continue; - } - if (property.NameEquals("osDisk")) - { - osDisk = DiskInfo.DeserializeDiskInfo(property.Value); - continue; - } - if (property.NameEquals("dataDisks")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiskInfo.DeserializeDiskInfo(item)); - } - dataDisks = array; - continue; - } - if (property.NameEquals("nodeResourceIds")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new ResourceIdentifier(item.GetString())); - } - nodeResourceIds = array; - continue; - } - } - return new VmssNodesProfile(name.Value, nodeSku, osImage, osDisk, Optional.ToList(dataDisks), Optional.ToList(nodeResourceIds), Optional.ToNullable(autoScaleMinCount), Optional.ToNullable(autoScaleMaxCount)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VmssNodesProfile.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VmssNodesProfile.cs deleted file mode 100644 index 80bad32e8d1ca..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/VmssNodesProfile.cs +++ /dev/null @@ -1,49 +0,0 @@ -// 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.Workloads.Models -{ - /// VMSS profile. - public partial class VmssNodesProfile : NodeProfile - { - /// Initializes a new instance of VmssNodesProfile. - /// VM SKU for node(s). - /// OS image used for creating the nodes. - /// OS disk details. - /// , or is null. - public VmssNodesProfile(string nodeSku, OSImageProfile osImage, DiskInfo osDisk) : base(nodeSku, osImage, osDisk) - { - Argument.AssertNotNull(nodeSku, nameof(nodeSku)); - Argument.AssertNotNull(osImage, nameof(osImage)); - Argument.AssertNotNull(osDisk, nameof(osDisk)); - } - - /// Initializes a new instance of VmssNodesProfile. - /// VM or VMSS name. - /// VM SKU for node(s). - /// OS image used for creating the nodes. - /// OS disk details. - /// Data disks details. This property is not in use right now. - /// VM/VMSS resource ARM Ids. - /// Minimum number of nodes for autoscale. - /// Maximum number of nodes for autoscale. - internal VmssNodesProfile(string name, string nodeSku, OSImageProfile osImage, DiskInfo osDisk, IList dataDisks, IReadOnlyList nodeResourceIds, int? autoScaleMinCount, int? autoScaleMaxCount) : base(name, nodeSku, osImage, osDisk, dataDisks, nodeResourceIds) - { - AutoScaleMinCount = autoScaleMinCount; - AutoScaleMaxCount = autoScaleMaxCount; - } - - /// Minimum number of nodes for autoscale. - public int? AutoScaleMinCount { get; set; } - /// Maximum number of nodes for autoscale. - public int? AutoScaleMaxCount { get; set; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceList.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceList.Serialization.cs deleted file mode 100644 index c88b1bf09d3f9..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceList.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.Workloads; - -namespace Azure.ResourceManager.Workloads.Models -{ - internal partial class WordPressInstanceResourceList - { - internal static WordPressInstanceResourceList DeserializeWordPressInstanceResourceList(JsonElement element) - { - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(WordPressInstanceResourceData.DeserializeWordPressInstanceResourceData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink")) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new WordPressInstanceResourceList(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceList.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceList.cs deleted file mode 100644 index 6f9def14b96a0..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressInstanceResourceList.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Workloads; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// WordPress instance resource list. - internal partial class WordPressInstanceResourceList - { - /// Initializes a new instance of WordPressInstanceResourceList. - internal WordPressInstanceResourceList() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of WordPressInstanceResourceList. - /// List of resources in current page. - /// Link to next page of resources. - internal WordPressInstanceResourceList(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// List of resources in current page. - public IReadOnlyList Value { get; } - /// Link to next page of resources. - public string NextLink { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressVersion.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressVersion.cs deleted file mode 100644 index 6e4bf80642d53..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WordPressVersion.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.Workloads.Models -{ - /// Application version. - public readonly partial struct WordPressVersion : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WordPressVersion(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string V5_4_3Value = "5.4.3"; - private const string V5_4_2Value = "5.4.2"; - private const string V5_4_1Value = "5.4.1"; - private const string V5_4_0Value = "5.4"; - /// Determines if two values are the same. - public static bool operator ==(WordPressVersion left, WordPressVersion right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WordPressVersion left, WordPressVersion right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WordPressVersion(string value) => new WordPressVersion(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WordPressVersion other && Equals(other); - /// - public bool Equals(WordPressVersion other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadKind.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadKind.cs deleted file mode 100644 index 5d6799532f390..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadKind.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.Workloads.Models -{ - /// Indicates which kind of php workload this resource represent e.g WordPress. - public readonly partial struct WorkloadKind : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WorkloadKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string WordPressValue = "WordPress"; - - /// WordPress. - public static WorkloadKind WordPress { get; } = new WorkloadKind(WordPressValue); - /// Determines if two values are the same. - public static bool operator ==(WorkloadKind left, WorkloadKind right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WorkloadKind left, WorkloadKind right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WorkloadKind(string value) => new WorkloadKind(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WorkloadKind other && Equals(other); - /// - public bool Equals(WorkloadKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSku.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSku.Serialization.cs deleted file mode 100644 index 1389fa3481bc9..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSku.Serialization.cs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - public partial class WorkloadsSku : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Tier)) - { - writer.WritePropertyName("tier"); - writer.WriteStringValue(Tier.Value.ToSerialString()); - } - if (Optional.IsDefined(Size)) - { - writer.WritePropertyName("size"); - writer.WriteStringValue(Size); - } - if (Optional.IsDefined(Family)) - { - writer.WritePropertyName("family"); - writer.WriteStringValue(Family); - } - if (Optional.IsDefined(Capacity)) - { - writer.WritePropertyName("capacity"); - writer.WriteNumberValue(Capacity.Value); - } - writer.WriteEndObject(); - } - - internal static WorkloadsSku DeserializeWorkloadsSku(JsonElement element) - { - string name = default; - Optional tier = default; - Optional size = default; - Optional family = default; - Optional capacity = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("tier")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - tier = property.Value.GetString().ToWorkloadsSkuTier(); - continue; - } - if (property.NameEquals("size")) - { - size = property.Value.GetString(); - continue; - } - if (property.NameEquals("family")) - { - family = property.Value.GetString(); - continue; - } - if (property.NameEquals("capacity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - capacity = property.Value.GetInt32(); - continue; - } - } - return new WorkloadsSku(name, Optional.ToNullable(tier), size.Value, family.Value, Optional.ToNullable(capacity)); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSku.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSku.cs deleted file mode 100644 index 4dd887952b57e..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSku.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.Workloads.Models -{ - /// The resource model definition representing SKU. - public partial class WorkloadsSku - { - /// Initializes a new instance of WorkloadsSku. - /// The name of the SKU. Ex - P3. It is typically a letter+number code. - /// is null. - public WorkloadsSku(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of WorkloadsSku. - /// The name of the SKU. Ex - P3. It is typically a letter+number code. - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. - internal WorkloadsSku(string name, WorkloadsSkuTier? tier, string size, string family, int? capacity) - { - Name = name; - Tier = tier; - Size = size; - Family = family; - Capacity = capacity; - } - - /// The name of the SKU. Ex - P3. It is typically a letter+number code. - public string Name { get; set; } - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - public WorkloadsSkuTier? Tier { get; set; } - /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. - public string Size { get; set; } - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. - public string Family { get; set; } - /// If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. - public int? Capacity { get; set; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSkuTier.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSkuTier.Serialization.cs deleted file mode 100644 index d05f9712173be..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSkuTier.Serialization.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.Workloads.Models -{ - internal static partial class WorkloadsSkuTierExtensions - { - public static string ToSerialString(this WorkloadsSkuTier value) => value switch - { - WorkloadsSkuTier.Free => "Free", - WorkloadsSkuTier.Basic => "Basic", - WorkloadsSkuTier.Standard => "Standard", - WorkloadsSkuTier.Premium => "Premium", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WorkloadsSkuTier value.") - }; - - public static WorkloadsSkuTier ToWorkloadsSkuTier(this string value) - { - if (string.Equals(value, "Free", StringComparison.InvariantCultureIgnoreCase)) return WorkloadsSkuTier.Free; - if (string.Equals(value, "Basic", StringComparison.InvariantCultureIgnoreCase)) return WorkloadsSkuTier.Basic; - if (string.Equals(value, "Standard", StringComparison.InvariantCultureIgnoreCase)) return WorkloadsSkuTier.Standard; - if (string.Equals(value, "Premium", StringComparison.InvariantCultureIgnoreCase)) return WorkloadsSkuTier.Premium; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown WorkloadsSkuTier value."); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSkuTier.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSkuTier.cs deleted file mode 100644 index c6f7bc25189b9..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/Models/WorkloadsSkuTier.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Workloads.Models -{ - /// This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. - public enum WorkloadsSkuTier - { - /// Free. - Free, - /// Basic. - Basic, - /// Standard. - Standard, - /// Premium. - Premium - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResource.cs deleted file mode 100644 index 21ea8d7490d7e..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResource.cs +++ /dev/null @@ -1,611 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; -using Azure.ResourceManager.Workloads.Models; - -namespace Azure.ResourceManager.Workloads -{ - /// - /// A Class representing a PhpWorkloadResource 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 GetPhpWorkloadResource method. - /// Otherwise you can get one from its parent resource using the GetPhpWorkloadResource method. - /// - public partial class PhpWorkloadResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string phpWorkloadName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _phpWorkloadResourcePhpWorkloadsClientDiagnostics; - private readonly PhpWorkloadsRestOperations _phpWorkloadResourcePhpWorkloadsRestClient; - private readonly PhpWorkloadResourceData _data; - - /// Initializes a new instance of the class for mocking. - protected PhpWorkloadResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal PhpWorkloadResource(ArmClient client, PhpWorkloadResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// 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 PhpWorkloadResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _phpWorkloadResourcePhpWorkloadsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Workloads", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string phpWorkloadResourcePhpWorkloadsApiVersion); - _phpWorkloadResourcePhpWorkloadsRestClient = new PhpWorkloadsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, phpWorkloadResourcePhpWorkloadsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Workloads/phpWorkloads"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual PhpWorkloadResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// Gets an object representing a WordPressInstanceResource along with the instance operations that can be performed on it in the PhpWorkloadResource. - /// Returns a object. - public virtual WordPressInstanceResource GetWordPressInstanceResource() - { - return new WordPressInstanceResource(Client, new ResourceIdentifier(Id.ToString() + "/wordpressInstances/default")); - } - - /// - /// Gets the PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.Get"); - scope.Start(); - try - { - var response = await _phpWorkloadResourcePhpWorkloadsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PhpWorkloadResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.Get"); - scope.Start(); - try - { - var response = _phpWorkloadResourcePhpWorkloadsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PhpWorkloadResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Delete - /// - /// - /// - /// 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. - /// Whether to delete infra along with workload resource. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, string deleteInfra = null, CancellationToken cancellationToken = default) - { - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.Delete"); - scope.Start(); - try - { - var response = await _phpWorkloadResourcePhpWorkloadsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deleteInfra, cancellationToken).ConfigureAwait(false); - var operation = new WorkloadsArmOperation(_phpWorkloadResourcePhpWorkloadsClientDiagnostics, Pipeline, _phpWorkloadResourcePhpWorkloadsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deleteInfra).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Delete - /// - /// - /// - /// 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. - /// Whether to delete infra along with workload resource. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, string deleteInfra = null, CancellationToken cancellationToken = default) - { - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.Delete"); - scope.Start(); - try - { - var response = _phpWorkloadResourcePhpWorkloadsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deleteInfra, cancellationToken); - var operation = new WorkloadsArmOperation(_phpWorkloadResourcePhpWorkloadsClientDiagnostics, Pipeline, _phpWorkloadResourcePhpWorkloadsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, deleteInfra).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Update - /// - /// - /// - /// Workload resource update data. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(PhpWorkloadResourcePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.Update"); - scope.Start(); - try - { - var response = await _phpWorkloadResourcePhpWorkloadsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PhpWorkloadResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Update - /// - /// - /// - /// Workload resource update data. - /// The cancellation token to use. - /// is null. - public virtual Response Update(PhpWorkloadResourcePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.Update"); - scope.Start(); - try - { - var response = _phpWorkloadResourcePhpWorkloadsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); - return Response.FromValue(new PhpWorkloadResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// The key for the tag. - /// 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) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - 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 _phpWorkloadResourcePhpWorkloadsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PhpWorkloadResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PhpWorkloadResourcePatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _phpWorkloadResourcePhpWorkloadsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new PhpWorkloadResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PhpWorkloadResourcePatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// 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) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - 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 _phpWorkloadResourcePhpWorkloadsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PhpWorkloadResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PhpWorkloadResourcePatch(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _phpWorkloadResourcePhpWorkloadsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new PhpWorkloadResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PhpWorkloadResourcePatch(); - patch.Tags.ReplaceWith(tags); - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - 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 _phpWorkloadResourcePhpWorkloadsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new PhpWorkloadResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PhpWorkloadResourcePatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _phpWorkloadResourcePhpWorkloadsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new PhpWorkloadResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PhpWorkloadResourcePatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResourceCollection.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResourceCollection.cs deleted file mode 100644 index 2daa2c08fd403..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResourceCollection.cs +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.Workloads -{ - /// - /// 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 GetPhpWorkloadResources method from an instance of . - /// - public partial class PhpWorkloadResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _phpWorkloadResourcePhpWorkloadsClientDiagnostics; - private readonly PhpWorkloadsRestOperations _phpWorkloadResourcePhpWorkloadsRestClient; - - /// Initializes a new instance of the class for mocking. - protected PhpWorkloadResourceCollection() - { - } - - /// 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 PhpWorkloadResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _phpWorkloadResourcePhpWorkloadsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Workloads", PhpWorkloadResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(PhpWorkloadResource.ResourceType, out string phpWorkloadResourcePhpWorkloadsApiVersion); - _phpWorkloadResourcePhpWorkloadsRestClient = new PhpWorkloadsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, phpWorkloadResourcePhpWorkloadsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Create or updated PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_CreateOrUpdate - /// - /// - /// - /// 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. - /// Php workload name. - /// Resource create or update request payload. - /// 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 phpWorkloadName, PhpWorkloadResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _phpWorkloadResourcePhpWorkloadsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, phpWorkloadName, data, cancellationToken).ConfigureAwait(false); - var operation = new WorkloadsArmOperation(new PhpWorkloadResourceOperationSource(Client), _phpWorkloadResourcePhpWorkloadsClientDiagnostics, Pipeline, _phpWorkloadResourcePhpWorkloadsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, phpWorkloadName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or updated PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_CreateOrUpdate - /// - /// - /// - /// 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. - /// Php workload name. - /// Resource create or update request payload. - /// 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 phpWorkloadName, PhpWorkloadResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _phpWorkloadResourcePhpWorkloadsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, phpWorkloadName, data, cancellationToken); - var operation = new WorkloadsArmOperation(new PhpWorkloadResourceOperationSource(Client), _phpWorkloadResourcePhpWorkloadsClientDiagnostics, Pipeline, _phpWorkloadResourcePhpWorkloadsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, phpWorkloadName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// Php workload name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string phpWorkloadName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResourceCollection.Get"); - scope.Start(); - try - { - var response = await _phpWorkloadResourcePhpWorkloadsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, phpWorkloadName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PhpWorkloadResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the PHP workload resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// Php workload name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string phpWorkloadName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResourceCollection.Get"); - scope.Start(); - try - { - var response = _phpWorkloadResourcePhpWorkloadsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, phpWorkloadName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new PhpWorkloadResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists PHP workload resources in a resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads - /// - /// - /// Operation Id - /// PhpWorkloads_ListByResourceGroup - /// - /// - /// - /// 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) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _phpWorkloadResourcePhpWorkloadsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _phpWorkloadResourcePhpWorkloadsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PhpWorkloadResource(Client, PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(e)), _phpWorkloadResourcePhpWorkloadsClientDiagnostics, Pipeline, "PhpWorkloadResourceCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Lists PHP workload resources in a resource group. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads - /// - /// - /// Operation Id - /// PhpWorkloads_ListByResourceGroup - /// - /// - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _phpWorkloadResourcePhpWorkloadsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _phpWorkloadResourcePhpWorkloadsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); - return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PhpWorkloadResource(Client, PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(e)), _phpWorkloadResourcePhpWorkloadsClientDiagnostics, Pipeline, "PhpWorkloadResourceCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// Php workload name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string phpWorkloadName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _phpWorkloadResourcePhpWorkloadsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, phpWorkloadName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName} - /// - /// - /// Operation Id - /// PhpWorkloads_Get - /// - /// - /// - /// Php workload name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string phpWorkloadName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - - using var scope = _phpWorkloadResourcePhpWorkloadsClientDiagnostics.CreateScope("PhpWorkloadResourceCollection.Exists"); - scope.Start(); - try - { - var response = _phpWorkloadResourcePhpWorkloadsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, phpWorkloadName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetAll().GetEnumerator(); - } - - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) - { - return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResourceData.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResourceData.cs deleted file mode 100644 index 81f0a51e85191..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/PhpWorkloadResourceData.cs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Workloads.Models; - -namespace Azure.ResourceManager.Workloads -{ - /// A class representing the PhpWorkloadResource data model. - public partial class PhpWorkloadResourceData : TrackedResourceData - { - /// Initializes a new instance of PhpWorkloadResourceData. - /// The location. - /// Indicates which kind of php workload this resource represent e.g WordPress. - public PhpWorkloadResourceData(AzureLocation location, WorkloadKind kind) : base(location) - { - Kind = kind; - } - - /// Initializes a new instance of PhpWorkloadResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// Indicates which kind of php workload this resource represent e.g WordPress. - /// Php workloads SKU. - /// Identity for the resource. Currently not supported. - /// The infra resources for PHP workload will be created in this location. - /// Managed resource group configuration of the workload. - /// Admin user profile used for VM and VMSS. - /// VMSS web nodes profile. - /// Controller VM profile. - /// Network profile. - /// Database profile. - /// Site profile. - /// File share profile. - /// PHP profile. - /// Search profile. - /// Cache profile. - /// Backup profile. - /// Php workload resource provisioning state. - internal PhpWorkloadResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, WorkloadKind kind, WorkloadsSku sku, PhpWorkloadResourceIdentity identity, AzureLocation? appLocation, ManagedRGConfiguration managedResourceGroupConfiguration, UserProfile adminUserProfile, VmssNodesProfile webNodesProfile, NodeProfile controllerProfile, NetworkProfile networkProfile, DatabaseProfile databaseProfile, SiteProfile siteProfile, FileshareProfile fileshareProfile, PhpProfile phpProfile, SearchProfile searchProfile, CacheProfile cacheProfile, BackupProfile backupProfile, PhpWorkloadProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) - { - Kind = kind; - Sku = sku; - Identity = identity; - AppLocation = appLocation; - ManagedResourceGroupConfiguration = managedResourceGroupConfiguration; - AdminUserProfile = adminUserProfile; - WebNodesProfile = webNodesProfile; - ControllerProfile = controllerProfile; - NetworkProfile = networkProfile; - DatabaseProfile = databaseProfile; - SiteProfile = siteProfile; - FileshareProfile = fileshareProfile; - PhpProfile = phpProfile; - SearchProfile = searchProfile; - CacheProfile = cacheProfile; - BackupProfile = backupProfile; - ProvisioningState = provisioningState; - } - - /// Indicates which kind of php workload this resource represent e.g WordPress. - public WorkloadKind Kind { get; set; } - /// Php workloads SKU. - public WorkloadsSku Sku { get; set; } - /// Identity for the resource. Currently not supported. - public PhpWorkloadResourceIdentity Identity { get; set; } - /// The infra resources for PHP workload will be created in this location. - public AzureLocation? AppLocation { get; set; } - /// Managed resource group configuration of the workload. - internal ManagedRGConfiguration ManagedResourceGroupConfiguration { get; set; } - /// Managed resource group name. - public string ManagedResourceGroupName - { - get => ManagedResourceGroupConfiguration is null ? default : ManagedResourceGroupConfiguration.Name; - set - { - if (ManagedResourceGroupConfiguration is null) - ManagedResourceGroupConfiguration = new ManagedRGConfiguration(); - ManagedResourceGroupConfiguration.Name = value; - } - } - - /// Admin user profile used for VM and VMSS. - public UserProfile AdminUserProfile { get; set; } - /// VMSS web nodes profile. - public VmssNodesProfile WebNodesProfile { get; set; } - /// Controller VM profile. - public NodeProfile ControllerProfile { get; set; } - /// Network profile. - public NetworkProfile NetworkProfile { get; set; } - /// Database profile. - public DatabaseProfile DatabaseProfile { get; set; } - /// Site profile. - internal SiteProfile SiteProfile { get; set; } - /// Domain name for the application site URL. - public string SiteDomainName - { - get => SiteProfile is null ? default : SiteProfile.DomainName; - set - { - if (SiteProfile is null) - SiteProfile = new SiteProfile(); - SiteProfile.DomainName = value; - } - } - - /// File share profile. - public FileshareProfile FileshareProfile { get; set; } - /// PHP profile. - internal PhpProfile PhpProfile { get; set; } - /// PHP version. - public PhpVersion? PhpVersion - { - get => PhpProfile is null ? default(PhpVersion?) : PhpProfile.Version; - set - { - PhpProfile = value.HasValue ? new PhpProfile(value.Value) : null; - } - } - - /// Search profile. - public SearchProfile SearchProfile { get; set; } - /// Cache profile. - public CacheProfile CacheProfile { get; set; } - /// Backup profile. - public BackupProfile BackupProfile { get; set; } - /// Php workload resource provisioning state. - public PhpWorkloadProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/MonitorsRestOperations.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/MonitorsRestOperations.cs index 58311460c3ac0..ff17529a9e748 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/MonitorsRestOperations.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/MonitorsRestOperations.cs @@ -33,7 +33,7 @@ public MonitorsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-12-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -437,7 +437,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the SAP monitor resource. - /// Request body that only contains the new Tags field. + /// The Update SAP workload monitor request body. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -468,7 +468,7 @@ public async Task> UpdateAsync(string subscriptionId, s /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// Name of the SAP monitor resource. - /// Request body that only contains the new Tags field. + /// The Update SAP workload monitor request body. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/PhpWorkloadsRestOperations.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/PhpWorkloadsRestOperations.cs deleted file mode 100644 index 81d906725729b..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/PhpWorkloadsRestOperations.cs +++ /dev/null @@ -1,644 +0,0 @@ -// 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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Workloads.Models; - -namespace Azure.ResourceManager.Workloads -{ - internal partial class PhpWorkloadsRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of PhpWorkloadsRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public PhpWorkloadsRestOperations(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 ?? "2021-12-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Workloads/phpWorkloads", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists PHP workload resources for a subscription. - /// The ID of the target subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PhpWorkloadResourceList.DeserializePhpWorkloadResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists PHP workload resources for a subscription. - /// The ID of the target subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PhpWorkloadResourceList.DeserializePhpWorkloadResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) - { - 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.Workloads/phpWorkloads", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists PHP workload resources in a resource group. - /// The ID of the target subscription. - /// 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) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PhpWorkloadResourceList.DeserializePhpWorkloadResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists PHP workload resources in a resource group. - /// The ID of the target subscription. - /// 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) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PhpWorkloadResourceList.DeserializePhpWorkloadResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string phpWorkloadName) - { - 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.Workloads/phpWorkloads/", false); - uri.AppendPath(phpWorkloadName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Gets the PHP workload resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Php workload name. - /// 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 phpWorkloadName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, phpWorkloadName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((PhpWorkloadResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Gets the PHP workload resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Php workload name. - /// 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 phpWorkloadName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, phpWorkloadName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((PhpWorkloadResourceData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string phpWorkloadName, PhpWorkloadResourceData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Workloads/phpWorkloads/", false); - uri.AppendPath(phpWorkloadName, 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); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Create or updated PHP workload resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Php workload name. - /// Resource create or update request payload. - /// 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 phpWorkloadName, PhpWorkloadResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, phpWorkloadName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create or updated PHP workload resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Php workload name. - /// Resource create or update request payload. - /// 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 phpWorkloadName, PhpWorkloadResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, phpWorkloadName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string phpWorkloadName, PhpWorkloadResourcePatch patch) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Workloads/phpWorkloads/", false); - uri.AppendPath(phpWorkloadName, 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); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update PHP workload resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Php workload name. - /// Workload resource update data. - /// 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 phpWorkloadName, PhpWorkloadResourcePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, phpWorkloadName, patch); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update PHP workload resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Php workload name. - /// Workload resource update data. - /// 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 phpWorkloadName, PhpWorkloadResourcePatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - Argument.AssertNotNull(patch, nameof(patch)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, phpWorkloadName, patch); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PhpWorkloadResourceData.DeserializePhpWorkloadResourceData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string phpWorkloadName, string deleteInfra) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Workloads/phpWorkloads/", false); - uri.AppendPath(phpWorkloadName, true); - uri.AppendQuery("api-version", _apiVersion, true); - if (deleteInfra != null) - { - uri.AppendQuery("delete-infra", deleteInfra, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Delete PHP workload resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Php workload name. - /// Whether to delete infra along with workload resource. - /// 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 phpWorkloadName, string deleteInfra = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, phpWorkloadName, deleteInfra); - 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); - } - } - - /// Delete PHP workload resource. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Php workload name. - /// Whether to delete infra along with workload resource. - /// 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 phpWorkloadName, string deleteInfra = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, phpWorkloadName, deleteInfra); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists PHP workload resources for a subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PhpWorkloadResourceList.DeserializePhpWorkloadResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists PHP workload resources for a subscription. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PhpWorkloadResourceList.DeserializePhpWorkloadResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists PHP workload resources in a resource group. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// 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) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = PhpWorkloadResourceList.DeserializePhpWorkloadResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists PHP workload resources in a resource group. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// 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) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - PhpWorkloadResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = PhpWorkloadResourceList.DeserializePhpWorkloadResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/ProviderInstancesRestOperations.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/ProviderInstancesRestOperations.cs index 42749c11f182a..9a878473489c6 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/ProviderInstancesRestOperations.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/ProviderInstancesRestOperations.cs @@ -33,7 +33,7 @@ public ProviderInstancesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-12-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPApplicationServerInstancesRestOperations.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPApplicationServerInstancesRestOperations.cs index b52a7f057bc83..4e2afe3c2d7a6 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPApplicationServerInstancesRestOperations.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPApplicationServerInstancesRestOperations.cs @@ -33,7 +33,7 @@ public SAPApplicationServerInstancesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-12-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,11 +59,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets the SAP Application Server Instance. + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The name of SAP Application Server instance. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -92,11 +92,11 @@ public async Task> GetAsync(string su } } - /// Gets the SAP Application Server Instance. + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The name of SAP Application Server instance. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -151,12 +151,12 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG return message; } - /// Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The name of SAP Application Server instance. - /// The SAP Application Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -180,12 +180,12 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } } - /// Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The name of SAP Application Server instance. - /// The SAP Application Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -235,12 +235,12 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Puts the SAP Application Server Instance. + /// Puts the SAP Application Server Instance resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The name of SAP Application Server instance. - /// The SAP Application Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -264,12 +264,12 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// Puts the SAP Application Server Instance. + /// Puts the SAP Application Server Instance resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The name of SAP Application Server instance. - /// The SAP Application Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -315,11 +315,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The name of SAP Application Server instance. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -343,11 +343,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The name of SAP Application Server instance. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -392,10 +392,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Lists the SAP Application server Instances in an SVI. + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -421,10 +421,10 @@ public async Task> ListAsync(string s } } - /// Lists the SAP Application server Instances in an SVI. + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -450,6 +450,169 @@ public Response List(string subscriptionId, st } } + internal HttpMessage CreateStartInstanceRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP Application Server Instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartInstanceAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStartInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP Application Server Instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StartInstance(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStartInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopInstanceRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopRequest body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/applicationInstances/", false); + uri.AppendPath(applicationInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Application Server Instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopInstanceAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopRequest body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStopInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Application Server Instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// The name of SAP Application Server instance resource. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StopInstance(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string applicationInstanceName, StopRequest body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(applicationInstanceName, nameof(applicationInstanceName)); + + using var message = CreateStopInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, applicationInstanceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) { var message = _pipeline.CreateMessage(); @@ -464,11 +627,11 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// Lists the SAP Application server Instances in an SVI. + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -495,11 +658,11 @@ public async Task> ListNextPageAsync( } } - /// Lists the SAP Application server Instances in an SVI. + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPCentralInstancesRestOperations.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPCentralInstancesRestOperations.cs index 6c2096ef18532..ad4da39555f4a 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPCentralInstancesRestOperations.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPCentralInstancesRestOperations.cs @@ -33,7 +33,7 @@ public SAPCentralInstancesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-12-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,11 +59,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets the SAP Central Instance. + /// Gets the SAP Central Services Instance resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Central Instance name string modeled as parameter for auto generation to work correctly. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -92,11 +92,11 @@ public async Task> GetAsync(string subscr } } - /// Gets the SAP Central Instance. + /// Gets the SAP Central Services Instance resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Central Instance name string modeled as parameter for auto generation to work correctly. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -151,12 +151,12 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG return message; } - /// Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Central Instance name string modeled as parameter for auto generation to work correctly. - /// The SAP Central Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -180,12 +180,12 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } } - /// Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Central Instance name string modeled as parameter for auto generation to work correctly. - /// The SAP Central Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -235,12 +235,12 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Updates the SAP Central Instance. <br><br>This can be used to update tags. + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Central Instance name string modeled as parameter for auto generation to work correctly. - /// The SAP Central Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance resource request body. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -264,12 +264,12 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// Updates the SAP Central Instance. <br><br>This can be used to update tags. + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Central Instance name string modeled as parameter for auto generation to work correctly. - /// The SAP Central Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance resource request body. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -315,11 +315,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Central Instance name string modeled as parameter for auto generation to work correctly. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -343,11 +343,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Central Instance name string modeled as parameter for auto generation to work correctly. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -392,10 +392,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Lists the SAP Central Instances in an SVI. + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -421,10 +421,10 @@ public async Task> ListAsync(string subscriptio } } - /// Lists the SAP Central Instances in an SVI. + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -450,6 +450,169 @@ public Response List(string subscriptionId, string resou } } + internal HttpMessage CreateStartInstanceRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Starts the SAP Central Services Instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartInstanceAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStartInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the SAP Central Services Instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StartInstance(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStartInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopInstanceRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopRequest body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/centralInstances/", false); + uri.AppendPath(centralInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the SAP Central Services Instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopInstanceAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopRequest body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStopInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the SAP Central Services Instance. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StopInstance(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string centralInstanceName, StopRequest body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(centralInstanceName, nameof(centralInstanceName)); + + using var message = CreateStopInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, centralInstanceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) { var message = _pipeline.CreateMessage(); @@ -464,11 +627,11 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// Lists the SAP Central Instances in an SVI. + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -495,11 +658,11 @@ public async Task> ListNextPageAsync(string nex } } - /// Lists the SAP Central Instances in an SVI. + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPDatabaseInstancesRestOperations.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPDatabaseInstancesRestOperations.cs index d982f6b3795a9..2d1457081f456 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPDatabaseInstancesRestOperations.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPDatabaseInstancesRestOperations.cs @@ -33,7 +33,7 @@ public SAPDatabaseInstancesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-12-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -59,11 +59,11 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets the SAP Database Instance. + /// Gets the SAP Database Instance resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Database Instance string modeled as parameter for auto generation to work correctly. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -92,11 +92,11 @@ public async Task> GetAsync(string subscriptio } } - /// Gets the SAP Database Instance. + /// Gets the SAP Database Instance resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Database Instance string modeled as parameter for auto generation to work correctly. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -151,12 +151,12 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG return message; } - /// Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Database Instance string modeled as parameter for auto generation to work correctly. - /// The SAP Database Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -180,12 +180,12 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } } - /// Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Database Instance string modeled as parameter for auto generation to work correctly. - /// The SAP Database Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -235,12 +235,12 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Puts the SAP Database Instance. + /// Updates the Database resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Database Instance string modeled as parameter for auto generation to work correctly. - /// The SAP Database Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Database resource update request body. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -264,12 +264,12 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr } } - /// Puts the SAP Database Instance. + /// Updates the Database resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Database Instance string modeled as parameter for auto generation to work correctly. - /// The SAP Database Server instance request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Database resource update request body. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -315,11 +315,11 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Database Instance string modeled as parameter for auto generation to work correctly. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -343,11 +343,11 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// Database Instance string modeled as parameter for auto generation to work correctly. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -392,10 +392,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Lists the SAP Database Instances in an SVI. + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -421,10 +421,10 @@ public async Task> ListAsync(string subscripti } } - /// Lists the SAP Database Instances in an SVI. + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -450,6 +450,169 @@ public Response List(string subscriptionId, string reso } } + internal HttpMessage CreateStartInstanceRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/start", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Starts the database instance of the SAP system. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartInstanceAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStartInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Starts the database instance of the SAP system. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StartInstance(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStartInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateStopInstanceRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopRequest body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + 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.Workloads/sapVirtualInstances/", false); + uri.AppendPath(sapVirtualInstanceName, true); + uri.AppendPath("/databaseInstances/", false); + uri.AppendPath(databaseInstanceName, true); + uri.AppendPath("/stop", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (body != null) + { + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; + } + _userAgent.Apply(message); + return message; + } + + /// Stops the database instance of the SAP system. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StopInstanceAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopRequest body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStopInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Stops the database instance of the SAP system. + /// The ID of the target subscription. + /// The name of the resource group. The name is case insensitive. + /// The name of the Virtual Instances for SAP solutions resource. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StopInstance(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, string databaseInstanceName, StopRequest body = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); + Argument.AssertNotNullOrEmpty(databaseInstanceName, nameof(databaseInstanceName)); + + using var message = CreateStopInstanceRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, databaseInstanceName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string sapVirtualInstanceName) { var message = _pipeline.CreateMessage(); @@ -464,11 +627,11 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// Lists the SAP Database Instances in an SVI. + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -495,11 +658,11 @@ public async Task> ListNextPageAsync(string ne } } - /// Lists the SAP Database Instances in an SVI. + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPVirtualInstancesRestOperations.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPVirtualInstancesRestOperations.cs index f156869877646..6a9a62e6b8218 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPVirtualInstancesRestOperations.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SAPVirtualInstancesRestOperations.cs @@ -33,7 +33,7 @@ public SAPVirtualInstancesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-12-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -61,11 +61,11 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG return message; } - /// Creates an Virtual Instance for SAP. + /// Creates a Virtual Instance for SAP solutions (VIS) resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The Virtual Instance for SAP request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -88,11 +88,11 @@ public async Task CreateAsync(string subscriptionId, string resourceGr } } - /// Creates an Virtual Instance for SAP. + /// Creates a Virtual Instance for SAP solutions (VIS) resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The Virtual Instance for SAP request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -135,10 +135,10 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Gets an Virtual Instance for SAP. + /// Gets a Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -166,10 +166,10 @@ public async Task> GetAsync(string subscription } } - /// Gets an Virtual Instance for SAP. + /// Gets a Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -221,11 +221,11 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG return message; } - /// Updates an Virtual Instance for SAP. + /// Updates a Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The Update Virtual Instance for SAP request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Request body to update a Virtual Instance for SAP solutions resource. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -252,11 +252,11 @@ public async Task> UpdateAsync(string subscript } } - /// Updates an Virtual Instance for SAP. + /// Updates a Virtual Instance for SAP solutions resource. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The Update Virtual Instance for SAP request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Request body to update a Virtual Instance for SAP solutions resource. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -303,10 +303,10 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Deletes an Virtual Instance for SAP. + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -329,10 +329,10 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } } - /// Deletes an Virtual Instance for SAP. + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -374,7 +374,7 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str return message; } - /// Gets all Virtual Instances for SAP in a resource group. + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. @@ -401,7 +401,7 @@ public async Task> ListByResourceGroupAsync(str } } - /// Gets all Virtual Instances for SAP in a resource group. + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. @@ -445,7 +445,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) return message; } - /// Gets all Virtual Instances for SAP in the subscription. + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. /// The ID of the target subscription. /// The cancellation token to use. /// is null. @@ -470,7 +470,7 @@ public async Task> ListBySubscriptionAsync(stri } } - /// Gets all Virtual Instances for SAP in the subscription. + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. /// The ID of the target subscription. /// The cancellation token to use. /// is null. @@ -516,10 +516,10 @@ internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGr return message; } - /// Starts the SAP System. + /// Starts the SAP application, that is the Central Services instance and Application server instances. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -541,10 +541,10 @@ public async Task StartAsync(string subscriptionId, string resourceGro } } - /// Starts the SAP System. + /// Starts the SAP application, that is the Central Services instance and Application server instances. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -566,7 +566,7 @@ public Response Start(string subscriptionId, string resourceGroupName, string sa } } - internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content) + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopRequest body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -583,32 +583,32 @@ internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGro uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - if (content != null) + if (body != null) { request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(body); + request.Content = content; } _userAgent.Apply(message); return message; } - /// Stops the SAP System. + /// Stops the SAP Application, that is the Application server instances and Central Services instance. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The Virtual Instances for SAP stop request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource stop request body. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task StopAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + public async Task StopAsync(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopRequest body = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); - using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, body); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -620,21 +620,21 @@ public async Task StopAsync(string subscriptionId, string resourceGrou } } - /// Stops the SAP System. + /// Stops the SAP Application, that is the Application server instances and Central Services instance. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the Virtual Instances for SAP. - /// The Virtual Instances for SAP stop request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// The Virtual Instance for SAP solutions resource stop request body. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Stop(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopContent content = null, CancellationToken cancellationToken = default) + public Response Stop(string subscriptionId, string resourceGroupName, string sapVirtualInstanceName, StopRequest body = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(sapVirtualInstanceName, nameof(sapVirtualInstanceName)); - using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, content); + using var message = CreateStopRequest(subscriptionId, resourceGroupName, sapVirtualInstanceName, body); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -660,7 +660,7 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// Gets all Virtual Instances for SAP in a resource group. + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -689,7 +689,7 @@ public async Task> ListByResourceGroupNextPageA } } - /// Gets all Virtual Instances for SAP in a resource group. + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. @@ -732,7 +732,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st return message; } - /// Gets all Virtual Instances for SAP in the subscription. + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. /// The URL to the next page of results. /// The ID of the target subscription. /// The cancellation token to use. @@ -759,7 +759,7 @@ public async Task> ListBySubscriptionNextPageAs } } - /// Gets all Virtual Instances for SAP in the subscription. + /// Gets all Virtual Instances for SAP solutions resources in a Subscription. /// The URL to the next page of results. /// The ID of the target subscription. /// The cancellation token to use. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/WordpressInstancesRestOperations.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SapLandscapeMonitorRestOperations.cs similarity index 58% rename from sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/WordpressInstancesRestOperations.cs rename to sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SapLandscapeMonitorRestOperations.cs index e290b547f6ac4..23b740d920671 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/WordpressInstancesRestOperations.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SapLandscapeMonitorRestOperations.cs @@ -16,28 +16,28 @@ namespace Azure.ResourceManager.Workloads { - internal partial class WordpressInstancesRestOperations + internal partial class SapLandscapeMonitorRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; private readonly string _apiVersion; - /// Initializes a new instance of WordpressInstancesRestOperations. + /// Initializes a new instance of SapLandscapeMonitorRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. /// server parameter. /// Api Version. /// or is null. - public WordpressInstancesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + public SapLandscapeMonitorRestOperations(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 ?? "2021-12-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string phpWorkloadName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -48,9 +48,9 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Workloads/phpWorkloads/", false); - uri.AppendPath(phpWorkloadName, true); - uri.AppendPath("/wordpressInstances", false); + uri.AppendPath("/providers/Microsoft.Workloads/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/sapLandscapeMonitor/default", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -58,335 +58,358 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Lists WordPress instance resources under a phpWorkload resource. + /// Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource group, and resource name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Php workload name. + /// Name of the SAP monitor resource. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string phpWorkloadName, 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 monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, phpWorkloadName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WordPressInstanceResourceList value = default; + SapLandscapeMonitorData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WordPressInstanceResourceList.DeserializeWordPressInstanceResourceList(document.RootElement); + value = SapLandscapeMonitorData.DeserializeSapLandscapeMonitorData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((SapLandscapeMonitorData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Lists WordPress instance resources under a phpWorkload resource. + /// Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource group, and resource name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Php workload name. + /// Name of the SAP monitor resource. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string phpWorkloadName, 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 monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, phpWorkloadName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WordPressInstanceResourceList value = default; + SapLandscapeMonitorData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WordPressInstanceResourceList.DeserializeWordPressInstanceResourceList(document.RootElement); + value = SapLandscapeMonitorData.DeserializeSapLandscapeMonitorData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((SapLandscapeMonitorData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string phpWorkloadName) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string monitorName, SapLandscapeMonitorData 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("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Workloads/phpWorkloads/", false); - uri.AppendPath(phpWorkloadName, true); - uri.AppendPath("/wordpressInstances/default", false); + uri.AppendPath("/providers/Microsoft.Workloads/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/sapLandscapeMonitor/default", 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(data); + request.Content = content; _userAgent.Apply(message); return message; } - /// Gets the WordPress instance resource. + /// Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Php workload name. + /// Name of the SAP monitor resource. + /// Request body representing a configuration for Sap Landscape Monitor Dashboard. /// 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 phpWorkloadName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> CreateAsync(string subscriptionId, string resourceGroupName, string monitorName, SapLandscapeMonitorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, phpWorkloadName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, monitorName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: + case 201: { - WordPressInstanceResourceData value = default; + SapLandscapeMonitorData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WordPressInstanceResourceData.DeserializeWordPressInstanceResourceData(document.RootElement); + value = SapLandscapeMonitorData.DeserializeSapLandscapeMonitorData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((WordPressInstanceResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets the WordPress instance resource. + /// Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Php workload name. + /// Name of the SAP monitor resource. + /// Request body representing a configuration for Sap Landscape Monitor Dashboard. /// 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 phpWorkloadName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Create(string subscriptionId, string resourceGroupName, string monitorName, SapLandscapeMonitorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, phpWorkloadName); + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, monitorName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: + case 201: { - WordPressInstanceResourceData value = default; + SapLandscapeMonitorData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WordPressInstanceResourceData.DeserializeWordPressInstanceResourceData(document.RootElement); + value = SapLandscapeMonitorData.DeserializeSapLandscapeMonitorData(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((WordPressInstanceResourceData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string phpWorkloadName, WordPressInstanceResourceData data) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string monitorName) { 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); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Workloads/phpWorkloads/", false); - uri.AppendPath(phpWorkloadName, true); - uri.AppendPath("/wordpressInstances/default", false); + uri.AppendPath("/providers/Microsoft.Workloads/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/sapLandscapeMonitor/default", 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(data); - request.Content = content; _userAgent.Apply(message); return message; } - /// Create or updated WordPress instance resource. + /// Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Php workload name. - /// Resource create or update request payload. + /// Name of the SAP monitor resource. /// 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 phpWorkloadName, WordPressInstanceResourceData 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 monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, phpWorkloadName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 201: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Create or updated WordPress instance resource. + /// Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Php workload name. - /// Resource create or update request payload. + /// Name of the SAP monitor resource. /// 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 phpWorkloadName, WordPressInstanceResourceData 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 monitorName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, phpWorkloadName, data); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 201: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string phpWorkloadName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string monitorName, SapLandscapeMonitorData data) { 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); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Workloads/phpWorkloads/", false); - uri.AppendPath(phpWorkloadName, true); - uri.AppendPath("/wordpressInstances/default", false); + uri.AppendPath("/providers/Microsoft.Workloads/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/sapLandscapeMonitor/default", 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(data); + request.Content = content; _userAgent.Apply(message); return message; } - /// Delete WordPress instance resource. + /// Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Php workload name. + /// Name of the SAP monitor resource. + /// Request body representing a configuration for Sap Landscape Monitor Dashboard. /// 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 phpWorkloadName, 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 monitorName, SapLandscapeMonitorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, phpWorkloadName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + SapLandscapeMonitorData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = SapLandscapeMonitorData.DeserializeSapLandscapeMonitorData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Delete WordPress instance resource. + /// Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Php workload name. + /// Name of the SAP monitor resource. + /// Request body representing a configuration for Sap Landscape Monitor Dashboard. /// 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 phpWorkloadName, 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 monitorName, SapLandscapeMonitorData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, phpWorkloadName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, monitorName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 204: - return message.Response; + { + SapLandscapeMonitorData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = SapLandscapeMonitorData.DeserializeSapLandscapeMonitorData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string phpWorkloadName) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string monitorName) { var message = _pipeline.CreateMessage(); var request = message.Request; request.Method = RequestMethod.Get; 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.Workloads/monitors/", false); + uri.AppendPath(monitorName, true); + uri.AppendPath("/sapLandscapeMonitor", false); + uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Lists WordPress instance resources under a phpWorkload resource. - /// The URL to the next page of results. + /// Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource group, and resource name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Php workload name. + /// Name of the SAP monitor resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string phpWorkloadName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, phpWorkloadName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, monitorName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - WordPressInstanceResourceList value = default; + SapLandscapeMonitorListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WordPressInstanceResourceList.DeserializeWordPressInstanceResourceList(document.RootElement); + value = SapLandscapeMonitorListResult.DeserializeSapLandscapeMonitorListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -394,30 +417,28 @@ public async Task> ListNextPageAsync(str } } - /// Lists WordPress instance resources under a phpWorkload resource. - /// The URL to the next page of results. + /// Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource group, and resource name. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// Php workload name. + /// Name of the SAP monitor resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string phpWorkloadName, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(phpWorkloadName, nameof(phpWorkloadName)); + Argument.AssertNotNullOrEmpty(monitorName, nameof(monitorName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, phpWorkloadName); + using var message = CreateListRequest(subscriptionId, resourceGroupName, monitorName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - WordPressInstanceResourceList value = default; + SapLandscapeMonitorListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WordPressInstanceResourceList.DeserializeWordPressInstanceResourceList(document.RootElement); + value = SapLandscapeMonitorListResult.DeserializeSapLandscapeMonitorListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SkusRestOperations.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SkusRestOperations.cs deleted file mode 100644 index c07346a645ead..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/SkusRestOperations.cs +++ /dev/null @@ -1,175 +0,0 @@ -// 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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.Workloads.Models; - -namespace Azure.ResourceManager.Workloads -{ - internal partial class SkusRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of SkusRestOperations. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The application id to use for user agent. - /// server parameter. - /// Api Version. - /// or is null. - public SkusRestOperations(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 ?? "2021-12-01-preview"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListRequest(string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Workloads/skus", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the available SKUs under this PR. - /// The ID of the target subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SkusListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SkusListResult.DeserializeSkusListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the available SKUs under this PR. - /// The ID of the target subscription. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListRequest(subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SkusListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SkusListResult.DeserializeSkusListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Lists all the available SKUs under this PR. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - SkusListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = SkusListResult.DeserializeSkusListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Lists all the available SKUs under this PR. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListNextPageRequest(nextLink, subscriptionId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - SkusListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = SkusListResult.DeserializeSkusListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/WorkloadsRestOperations.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/WorkloadsRestOperations.cs index 69d8b3af7581a..4836c328ae00a 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/WorkloadsRestOperations.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/RestOperations/WorkloadsRestOperations.cs @@ -33,7 +33,7 @@ public WorkloadsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-12-01-preview"; + _apiVersion = apiVersion ?? "2022-11-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -63,7 +63,7 @@ internal HttpMessage CreateSapSizingRecommendationsRequest(string subscriptionId return message; } - /// Get SAP sizing recommendations. + /// Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier. /// The ID of the target subscription. /// The name of Azure region. /// SAP Sizing Recommendation Request body. @@ -90,7 +90,7 @@ public async Task> SapSizingRecommendati } } - /// Get SAP sizing recommendations. + /// Get SAP sizing recommendations by providing input SAPS for application tier and memory required for database tier. /// The ID of the target subscription. /// The name of Azure region. /// SAP Sizing Recommendation Request body. @@ -143,7 +143,7 @@ internal HttpMessage CreateSapSupportedSkuRequest(string subscriptionId, AzureLo return message; } - /// Get SAP supported SKUs. + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. /// The ID of the target subscription. /// The name of Azure region. /// SAP Supported SKU Request body. @@ -170,7 +170,7 @@ public async Task> SapSupportedSkuAsync } } - /// Get SAP supported SKUs. + /// Get a list of SAP supported SKUs for ASCS, Application and Database tier. /// The ID of the target subscription. /// The name of Azure region. /// SAP Supported SKU Request body. @@ -223,7 +223,7 @@ internal HttpMessage CreateSapDiskConfigurationsRequest(string subscriptionId, A return message; } - /// Get SAP Disk Configurations. + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. /// The ID of the target subscription. /// The name of Azure region. /// SAP Disk Configurations Request body. @@ -250,7 +250,7 @@ public async Task> SapDiskConfigurationsAs } } - /// Get SAP Disk Configurations. + /// Get the SAP Disk Configuration Layout prod/non-prod SAP System. /// The ID of the target subscription. /// The name of Azure region. /// SAP Disk Configurations Request body. @@ -303,7 +303,7 @@ internal HttpMessage CreateSapAvailabilityZoneDetailsRequest(string subscription return message; } - /// Get SAP Availability Zone Details. + /// Get the recommended SAP Availability Zone Pair Details for your region. /// The ID of the target subscription. /// The name of Azure region. /// SAP Availability Zone Details Request body. @@ -330,7 +330,7 @@ public async Task> SapAvailabilityZon } } - /// Get SAP Availability Zone Details. + /// Get the recommended SAP Availability Zone Pair Details for your region. /// The ID of the target subscription. /// The name of Azure region. /// SAP Availability Zone Details Request body. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceCollection.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceCollection.cs index 06e43473ccd8b..5cc9540ccfc2d 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceCollection.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceCollection.cs @@ -53,7 +53,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. /// /// /// Request Path @@ -66,8 +66,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of SAP Application Server instance. - /// The SAP Application Server instance request body. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -94,7 +94,7 @@ public virtual async Task> Cr } /// - /// Puts the SAP Application Server Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Puts the SAP Application Server Instance resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. /// /// /// Request Path @@ -107,8 +107,8 @@ public virtual async Task> Cr /// /// /// 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 name of SAP Application Server instance. - /// The SAP Application Server instance request body. + /// The name of SAP Application Server instance resource. + /// The SAP Application Server Instance resource request body. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -135,7 +135,7 @@ public virtual ArmOperation CreateOrUpdate } /// - /// Gets the SAP Application Server Instance. + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// - /// The name of SAP Application Server instance. + /// The name of SAP Application Server instance resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -172,7 +172,7 @@ public virtual async Task> GetAsy } /// - /// Gets the SAP Application Server Instance. + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -184,7 +184,7 @@ public virtual async Task> GetAsy /// /// /// - /// The name of SAP Application Server instance. + /// The name of SAP Application Server instance resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -209,7 +209,7 @@ public virtual Response Get(string applica } /// - /// Lists the SAP Application server Instances in an SVI. + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -231,7 +231,7 @@ public virtual AsyncPageable GetAllAsync(C } /// - /// Lists the SAP Application server Instances in an SVI. + /// Lists the SAP Application Server Instance resources for a given Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// - /// The name of SAP Application Server instance. + /// The name of SAP Application Server instance resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string applicationInstance /// /// /// - /// The name of SAP Application Server instance. + /// The name of SAP Application Server instance resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceData.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceData.cs index 937ce2fe3ab56..a3524a387f3d0 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceData.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceData.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; using Azure.ResourceManager.Workloads.Models; namespace Azure.ResourceManager.Workloads @@ -19,6 +20,7 @@ public partial class SapApplicationServerInstanceData : TrackedResourceData /// The location. public SapApplicationServerInstanceData(AzureLocation location) : base(location) { + VmDetails = new ChangeTrackingList(); } /// Initializes a new instance of SapApplicationServerInstanceData. @@ -28,21 +30,22 @@ public SapApplicationServerInstanceData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The application server instance id. - /// The application server subnet. - /// The application server SAP host name. - /// The application server SAP kernel version. - /// The application server SAP kernel patch. - /// The application server SAP IP Address. - /// The application server gateway Port. - /// The application server ICM HTTP Port. - /// The application server ICM HTTPS Port. - /// The virtual machine. + /// Application server Instance Number. + /// Application server Subnet. + /// Application server instance SAP hostname. + /// Application server instance SAP Kernel Version. + /// Application server instance SAP Kernel Patch level. + /// Application server instance SAP IP Address. + /// Application server instance gateway Port. + /// Application server instance ICM HTTP Port. + /// Application server instance ICM HTTPS Port. + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + /// The list of virtual machines. /// Defines the SAP Instance status. - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. /// Defines the provisioning states. /// Defines the Application Instance errors. - internal SapApplicationServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string instanceNo, ResourceIdentifier subnetId, string hostname, string kernelVersion, string kernelPatch, string ipAddress, long? gatewayPort, long? icmHttpPort, long? icmHttpsPort, ResourceIdentifier virtualMachineId, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors) : base(id, name, resourceType, systemData, tags, location) + internal SapApplicationServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string instanceNo, ResourceIdentifier subnetId, string hostname, string kernelVersion, string kernelPatch, string ipAddress, long? gatewayPort, long? icmHttpPort, long? icmHttpsPort, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors) : base(id, name, resourceType, systemData, tags, location) { InstanceNo = instanceNo; SubnetId = subnetId; @@ -53,36 +56,45 @@ internal SapApplicationServerInstanceData(ResourceIdentifier id, string name, Re GatewayPort = gatewayPort; IcmHttpPort = icmHttpPort; IcmHttpsPort = icmHttpsPort; - VirtualMachineId = virtualMachineId; + LoadBalancerDetails = loadBalancerDetails; + VmDetails = vmDetails; Status = status; Health = health; ProvisioningState = provisioningState; Errors = errors; } - /// The application server instance id. + /// Application server Instance Number. public string InstanceNo { get; } - /// The application server subnet. + /// Application server Subnet. public ResourceIdentifier SubnetId { get; } - /// The application server SAP host name. + /// Application server instance SAP hostname. public string Hostname { get; } - /// The application server SAP kernel version. + /// Application server instance SAP Kernel Version. public string KernelVersion { get; } - /// The application server SAP kernel patch. + /// Application server instance SAP Kernel Patch level. public string KernelPatch { get; } - /// The application server SAP IP Address. + /// Application server instance SAP IP Address. public string IPAddress { get; } - /// The application server gateway Port. + /// Application server instance gateway Port. public long? GatewayPort { get; } - /// The application server ICM HTTP Port. + /// Application server instance ICM HTTP Port. public long? IcmHttpPort { get; } - /// The application server ICM HTTPS Port. + /// Application server instance ICM HTTPS Port. public long? IcmHttpsPort { get; } - /// The virtual machine. - public ResourceIdentifier VirtualMachineId { get; } + /// The Load Balancer details such as LoadBalancer ID attached to Application Server Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines. + public IReadOnlyList VmDetails { get; } /// Defines the SAP Instance status. public SapVirtualInstanceStatus? Status { get; } - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. public SapHealthState? Health { get; } /// Defines the provisioning states. public SapVirtualInstanceProvisioningState? ProvisioningState { get; } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceResource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceResource.cs index 529193de39806..f4004c412cf93 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceResource.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceResource.cs @@ -90,7 +90,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets the SAP Application Server Instance. + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -122,7 +122,7 @@ public virtual async Task> GetAsy } /// - /// Gets the SAP Application Server Instance. + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -154,7 +154,7 @@ public virtual Response Get(CancellationTo } /// - /// Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. /// /// /// Request Path @@ -188,7 +188,7 @@ public virtual async Task> DeleteAsync(WaitU } /// - /// Deletes the SAP Application Server Instance. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the SAP Application Server Instance resource. <br><br>This operation will be used by service only. Delete by end user will return a Bad Request error. /// /// /// Request Path @@ -222,7 +222,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C } /// - /// Puts the SAP Application Server Instance. + /// Puts the SAP Application Server Instance resource. /// /// /// Request Path @@ -235,7 +235,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C /// /// /// 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 SAP Application Server instance request body. + /// The SAP Application Server Instance resource request body. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) @@ -260,7 +260,7 @@ public virtual async Task> Up } /// - /// Puts the SAP Application Server Instance. + /// Puts the SAP Application Server Instance resource. /// /// /// Request Path @@ -273,7 +273,7 @@ public virtual async Task> Up /// /// /// 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 SAP Application Server instance request body. + /// The SAP Application Server Instance resource request body. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, SapApplicationServerInstancePatch patch, CancellationToken cancellationToken = default) @@ -297,6 +297,144 @@ public virtual ArmOperation Update(WaitUnt } } + /// + /// Starts the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_StartInstance + /// + /// + /// + /// 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> StartInstanceAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceSapApplicationServerInstancesClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.StartInstance"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceSapApplicationServerInstancesRestClient.StartInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceSapApplicationServerInstancesClientDiagnostics, Pipeline, _sapApplicationServerInstanceSapApplicationServerInstancesRestClient.CreateStartInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/start + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_StartInstance + /// + /// + /// + /// 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 StartInstance(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceSapApplicationServerInstancesClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.StartInstance"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceSapApplicationServerInstancesRestClient.StartInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceSapApplicationServerInstancesClientDiagnostics, Pipeline, _sapApplicationServerInstanceSapApplicationServerInstancesRestClient.CreateStartInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_StopInstance + /// + /// + /// + /// 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. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + public virtual async Task> StopInstanceAsync(WaitUntil waitUntil, StopRequest body = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceSapApplicationServerInstancesClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.StopInstance"); + scope.Start(); + try + { + var response = await _sapApplicationServerInstanceSapApplicationServerInstancesRestClient.StopInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceSapApplicationServerInstancesClientDiagnostics, Pipeline, _sapApplicationServerInstanceSapApplicationServerInstancesRestClient.CreateStopInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Application Server Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/applicationInstances/{applicationInstanceName}/stop + /// + /// + /// Operation Id + /// SAPApplicationServerInstances_StopInstance + /// + /// + /// + /// 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. + /// SAP Application server instance stop request body. + /// The cancellation token to use. + public virtual ArmOperation StopInstance(WaitUntil waitUntil, StopRequest body = null, CancellationToken cancellationToken = default) + { + using var scope = _sapApplicationServerInstanceSapApplicationServerInstancesClientDiagnostics.CreateScope("SapApplicationServerInstanceResource.StopInstance"); + scope.Start(); + try + { + var response = _sapApplicationServerInstanceSapApplicationServerInstancesRestClient.StopInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapApplicationServerInstanceSapApplicationServerInstancesClientDiagnostics, Pipeline, _sapApplicationServerInstanceSapApplicationServerInstancesRestClient.CreateStopInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceCollection.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceCollection.cs index 06b0c4af218a0..56458095fd6a0 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceCollection.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceCollection.cs @@ -53,7 +53,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. /// /// /// Request Path @@ -66,8 +66,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Central Instance name string modeled as parameter for auto generation to work correctly. - /// The SAP Central Server instance request body. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -94,7 +94,7 @@ public virtual async Task> Create } /// - /// Puts the SAP Central Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Creates the SAP Central Services Instance resource. <br><br>This will be used by service only. PUT operation on this resource by end user will return a Bad Request error. /// /// /// Request Path @@ -107,8 +107,8 @@ public virtual async Task> Create /// /// /// 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. - /// Central Instance name string modeled as parameter for auto generation to work correctly. - /// The SAP Central Server instance request body. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. + /// The SAP Central Services Instance request body. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -135,7 +135,7 @@ public virtual ArmOperation CreateOrUpdate(Wai } /// - /// Gets the SAP Central Instance. + /// Gets the SAP Central Services Instance resource. /// /// /// Request Path @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// - /// Central Instance name string modeled as parameter for auto generation to work correctly. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -172,7 +172,7 @@ public virtual async Task> GetAsync(s } /// - /// Gets the SAP Central Instance. + /// Gets the SAP Central Services Instance resource. /// /// /// Request Path @@ -184,7 +184,7 @@ public virtual async Task> GetAsync(s /// /// /// - /// Central Instance name string modeled as parameter for auto generation to work correctly. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -209,7 +209,7 @@ public virtual Response Get(string centralInst } /// - /// Lists the SAP Central Instances in an SVI. + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -231,7 +231,7 @@ public virtual AsyncPageable GetAllAsync(Cance } /// - /// Lists the SAP Central Instances in an SVI. + /// Lists the SAP Central Services Instance resource for the given Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// - /// Central Instance name string modeled as parameter for auto generation to work correctly. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string centralInstanceName /// /// /// - /// Central Instance name string modeled as parameter for auto generation to work correctly. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceData.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceData.cs index b72ff0ad50d66..4ec1f9073127b 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceData.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceData.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; using Azure.ResourceManager.Workloads.Models; namespace Azure.ResourceManager.Workloads @@ -29,20 +30,21 @@ public SapCentralServerInstanceData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The central server instance id. - /// The central server subnet. - /// Defines the SAP message server properties. - /// Defines the SAP enqueue server properties. + /// The central services instance number. + /// The central services instance subnet. + /// Defines the SAP Message Server properties. + /// Defines the SAP Enqueue Server properties. /// Defines the SAP Gateway Server properties. - /// Defines the SAP ERS Server properties. - /// The central server kernel version. - /// The central server kernel patch. - /// The list of virtual machines. + /// Defines the SAP Enqueue Replication Server (ERS) properties. + /// The central services instance Kernel Version. + /// The central services instance Kernel Patch level. + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + /// The list of virtual machines corresponding to the Central Services instance. /// Defines the SAP Instance status. - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. /// Defines the provisioning states. - /// Defines the Central Instance errors. - internal SapCentralServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string instanceNo, ResourceIdentifier subnetId, MessageServerProperties messageServerProperties, EnqueueServerProperties enqueueServerProperties, GatewayServerProperties gatewayServerProperties, EnqueueReplicationServerProperties enqueueReplicationServerProperties, string kernelVersion, string kernelPatch, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors) : base(id, name, resourceType, systemData, tags, location) + /// Defines the errors related to SAP Central Services Instance resource. + internal SapCentralServerInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string instanceNo, ResourceIdentifier subnetId, MessageServerProperties messageServerProperties, EnqueueServerProperties enqueueServerProperties, GatewayServerProperties gatewayServerProperties, EnqueueReplicationServerProperties enqueueReplicationServerProperties, string kernelVersion, string kernelPatch, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors) : base(id, name, resourceType, systemData, tags, location) { InstanceNo = instanceNo; SubnetId = subnetId; @@ -52,6 +54,7 @@ internal SapCentralServerInstanceData(ResourceIdentifier id, string name, Resour EnqueueReplicationServerProperties = enqueueReplicationServerProperties; KernelVersion = kernelVersion; KernelPatch = kernelPatch; + LoadBalancerDetails = loadBalancerDetails; VmDetails = vmDetails; Status = status; Health = health; @@ -59,31 +62,39 @@ internal SapCentralServerInstanceData(ResourceIdentifier id, string name, Resour Errors = errors; } - /// The central server instance id. + /// The central services instance number. public string InstanceNo { get; } - /// The central server subnet. + /// The central services instance subnet. public ResourceIdentifier SubnetId { get; } - /// Defines the SAP message server properties. + /// Defines the SAP Message Server properties. public MessageServerProperties MessageServerProperties { get; set; } - /// Defines the SAP enqueue server properties. + /// Defines the SAP Enqueue Server properties. public EnqueueServerProperties EnqueueServerProperties { get; set; } /// Defines the SAP Gateway Server properties. public GatewayServerProperties GatewayServerProperties { get; set; } - /// Defines the SAP ERS Server properties. + /// Defines the SAP Enqueue Replication Server (ERS) properties. public EnqueueReplicationServerProperties EnqueueReplicationServerProperties { get; set; } - /// The central server kernel version. + /// The central services instance Kernel Version. public string KernelVersion { get; } - /// The central server kernel patch. + /// The central services instance Kernel Patch level. public string KernelPatch { get; } - /// The list of virtual machines. + /// The Load Balancer details such as LoadBalancer ID attached to ASCS Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines corresponding to the Central Services instance. public IReadOnlyList VmDetails { get; } /// Defines the SAP Instance status. public SapVirtualInstanceStatus? Status { get; } - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. public SapHealthState? Health { get; } /// Defines the provisioning states. public SapVirtualInstanceProvisioningState? ProvisioningState { get; } - /// Defines the Central Instance errors. + /// Defines the errors related to SAP Central Services Instance resource. internal SapVirtualInstanceError Errors { get; } /// The Virtual Instance for SAP error body. public SapVirtualInstanceErrorDetail ErrorsProperties diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceResource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceResource.cs index 6fc0675461226..649a4762da20e 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceResource.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceResource.cs @@ -90,7 +90,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets the SAP Central Instance. + /// Gets the SAP Central Services Instance resource. /// /// /// Request Path @@ -122,7 +122,7 @@ public virtual async Task> GetAsync(C } /// - /// Gets the SAP Central Instance. + /// Gets the SAP Central Services Instance resource. /// /// /// Request Path @@ -154,7 +154,7 @@ public virtual Response Get(CancellationToken } /// - /// Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. /// /// /// Request Path @@ -188,7 +188,7 @@ public virtual async Task> DeleteAsync(WaitU } /// - /// Deletes the SAP Central Instance. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the SAP Central Services Instance resource. <br><br>This will be used by service only. Delete operation on this resource by end user will return a Bad Request error. You can delete the parent resource, which is the Virtual Instance for SAP solutions resource, using the delete operation on it. /// /// /// Request Path @@ -222,7 +222,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C } /// - /// Updates the SAP Central Instance. <br><br>This can be used to update tags. + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. /// /// /// Request Path @@ -235,7 +235,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C /// /// /// 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 SAP Central Server instance request body. + /// The SAP Central Services Instance resource request body. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) @@ -260,7 +260,7 @@ public virtual async Task> Update } /// - /// Updates the SAP Central Instance. <br><br>This can be used to update tags. + /// Updates the SAP Central Services Instance resource. <br><br>This can be used to update tags on the resource. /// /// /// Request Path @@ -273,7 +273,7 @@ public virtual async Task> Update /// /// /// 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 SAP Central Server instance request body. + /// The SAP Central Services Instance resource request body. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, SapCentralServerInstancePatch patch, CancellationToken cancellationToken = default) @@ -297,6 +297,144 @@ public virtual ArmOperation Update(WaitUntil w } } + /// + /// Starts the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start + /// + /// + /// Operation Id + /// SAPCentralInstances_StartInstance + /// + /// + /// + /// 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> StartInstanceAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceSapCentralInstancesClientDiagnostics.CreateScope("SapCentralServerInstanceResource.StartInstance"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceSapCentralInstancesRestClient.StartInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceSapCentralInstancesClientDiagnostics, Pipeline, _sapCentralServerInstanceSapCentralInstancesRestClient.CreateStartInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/start + /// + /// + /// Operation Id + /// SAPCentralInstances_StartInstance + /// + /// + /// + /// 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 StartInstance(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceSapCentralInstancesClientDiagnostics.CreateScope("SapCentralServerInstanceResource.StartInstance"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceSapCentralInstancesRestClient.StartInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceSapCentralInstancesClientDiagnostics, Pipeline, _sapCentralServerInstanceSapCentralInstancesRestClient.CreateStartInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop + /// + /// + /// Operation Id + /// SAPCentralInstances_StopInstance + /// + /// + /// + /// 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. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + public virtual async Task> StopInstanceAsync(WaitUntil waitUntil, StopRequest body = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceSapCentralInstancesClientDiagnostics.CreateScope("SapCentralServerInstanceResource.StopInstance"); + scope.Start(); + try + { + var response = await _sapCentralServerInstanceSapCentralInstancesRestClient.StopInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceSapCentralInstancesClientDiagnostics, Pipeline, _sapCentralServerInstanceSapCentralInstancesRestClient.CreateStopInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the SAP Central Services Instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/centralInstances/{centralInstanceName}/stop + /// + /// + /// Operation Id + /// SAPCentralInstances_StopInstance + /// + /// + /// + /// 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. + /// SAP Central Services instance stop request body. + /// The cancellation token to use. + public virtual ArmOperation StopInstance(WaitUntil waitUntil, StopRequest body = null, CancellationToken cancellationToken = default) + { + using var scope = _sapCentralServerInstanceSapCentralInstancesClientDiagnostics.CreateScope("SapCentralServerInstanceResource.StopInstance"); + scope.Start(); + try + { + var response = _sapCentralServerInstanceSapCentralInstancesRestClient.StopInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapCentralServerInstanceSapCentralInstancesClientDiagnostics, Pipeline, _sapCentralServerInstanceSapCentralInstancesRestClient.CreateStopInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceCollection.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceCollection.cs index 61743d7e321a0..dc3b906640f94 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceCollection.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceCollection.cs @@ -53,7 +53,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. /// /// /// Request Path @@ -66,8 +66,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// Database Instance string modeled as parameter for auto generation to work correctly. - /// The SAP Database Server instance request body. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -94,7 +94,7 @@ public virtual async Task> CreateOrUpd } /// - /// Puts the SAP Database Instance. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. + /// Creates the Database resource corresponding to the Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. PUT by end user will return a Bad Request error. /// /// /// Request Path @@ -107,8 +107,8 @@ public virtual async Task> CreateOrUpd /// /// /// 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. - /// Database Instance string modeled as parameter for auto generation to work correctly. - /// The SAP Database Server instance request body. + /// Database resource name string modeled as parameter for auto generation to work correctly. + /// Request body of Database resource of a SAP system. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -135,7 +135,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti } /// - /// Gets the SAP Database Instance. + /// Gets the SAP Database Instance resource. /// /// /// Request Path @@ -147,7 +147,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// - /// Database Instance string modeled as parameter for auto generation to work correctly. + /// Database resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -172,7 +172,7 @@ public virtual async Task> GetAsync(string } /// - /// Gets the SAP Database Instance. + /// Gets the SAP Database Instance resource. /// /// /// Request Path @@ -184,7 +184,7 @@ public virtual async Task> GetAsync(string /// /// /// - /// Database Instance string modeled as parameter for auto generation to work correctly. + /// Database resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -209,7 +209,7 @@ public virtual Response Get(string databaseInstance } /// - /// Lists the SAP Database Instances in an SVI. + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -231,7 +231,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati } /// - /// Lists the SAP Database Instances in an SVI. + /// Lists the Database resources associated with a Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -265,7 +265,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// - /// Database Instance string modeled as parameter for auto generation to work correctly. + /// Database resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -300,7 +300,7 @@ public virtual async Task> ExistsAsync(string databaseInstanceNam /// /// /// - /// Database Instance string modeled as parameter for auto generation to work correctly. + /// Database resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceData.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceData.cs index 6d837719d0457..a3e664fda1e68 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceData.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceData.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; using Azure.ResourceManager.Workloads.Models; namespace Azure.ResourceManager.Workloads @@ -29,41 +30,51 @@ public SapDatabaseInstanceData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The database subnet. - /// The database SID. - /// The SAP database type. - /// The database IP Address. - /// The list of virtual machines. + /// Database subnet. + /// Database SID name. + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. + /// Database IP Address. + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + /// The list of virtual machines corresponding to the Database resource. /// Defines the SAP Instance status. /// Defines the provisioning states. - /// Defines the Database Instance errors. - internal SapDatabaseInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier subnetId, string databaseSid, string databaseType, string ipAddress, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors) : base(id, name, resourceType, systemData, tags, location) + /// Defines the errors related to Database resource. + internal SapDatabaseInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceIdentifier subnetId, string databaseSid, string databaseType, string ipAddress, SubResource loadBalancerDetails, IReadOnlyList vmDetails, SapVirtualInstanceStatus? status, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors) : base(id, name, resourceType, systemData, tags, location) { SubnetId = subnetId; DatabaseSid = databaseSid; DatabaseType = databaseType; IPAddress = ipAddress; + LoadBalancerDetails = loadBalancerDetails; VmDetails = vmDetails; Status = status; ProvisioningState = provisioningState; Errors = errors; } - /// The database subnet. + /// Database subnet. public ResourceIdentifier SubnetId { get; } - /// The database SID. + /// Database SID name. public string DatabaseSid { get; } - /// The SAP database type. + /// Database type, that is if the DB is HANA, DB2, Oracle, SAP ASE, Max DB or MS SQL Server. public string DatabaseType { get; } - /// The database IP Address. + /// Database IP Address. public string IPAddress { get; } - /// The list of virtual machines. + /// The Load Balancer details such as LoadBalancer ID attached to Database Virtual Machines. + internal SubResource LoadBalancerDetails { get; } + /// Gets Id. + public ResourceIdentifier LoadBalancerDetailsId + { + get => LoadBalancerDetails?.Id; + } + + /// The list of virtual machines corresponding to the Database resource. public IReadOnlyList VmDetails { get; } /// Defines the SAP Instance status. public SapVirtualInstanceStatus? Status { get; } /// Defines the provisioning states. public SapVirtualInstanceProvisioningState? ProvisioningState { get; } - /// Defines the Database Instance errors. + /// Defines the errors related to Database resource. internal SapVirtualInstanceError Errors { get; } /// The Virtual Instance for SAP error body. public SapVirtualInstanceErrorDetail ErrorsProperties diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceResource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceResource.cs index 6607334569eda..c731b572f0d14 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceResource.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceResource.cs @@ -90,7 +90,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Gets the SAP Database Instance. + /// Gets the SAP Database Instance resource. /// /// /// Request Path @@ -122,7 +122,7 @@ public virtual async Task> GetAsync(Cancel } /// - /// Gets the SAP Database Instance. + /// Gets the SAP Database Instance resource. /// /// /// Request Path @@ -154,7 +154,7 @@ public virtual Response Get(CancellationToken cance } /// - /// Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. /// /// /// Request Path @@ -188,7 +188,7 @@ public virtual async Task> DeleteAsync(WaitU } /// - /// Deletes the SAP Database Instance. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. + /// Deletes the Database resource corresponding to a Virtual Instance for SAP solutions resource. <br><br>This will be used by service only. Delete by end user will return a Bad Request error. /// /// /// Request Path @@ -222,7 +222,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C } /// - /// Puts the SAP Database Instance. + /// Updates the Database resource. /// /// /// Request Path @@ -235,7 +235,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C /// /// /// 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 SAP Database Server instance request body. + /// Database resource update request body. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(WaitUntil waitUntil, SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) @@ -260,7 +260,7 @@ public virtual async Task> UpdateAsync } /// - /// Puts the SAP Database Instance. + /// Updates the Database resource. /// /// /// Request Path @@ -273,7 +273,7 @@ public virtual async Task> UpdateAsync /// /// /// 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 SAP Database Server instance request body. + /// Database resource update request body. /// The cancellation token to use. /// is null. public virtual ArmOperation Update(WaitUntil waitUntil, SapDatabaseInstancePatch patch, CancellationToken cancellationToken = default) @@ -297,6 +297,144 @@ public virtual ArmOperation Update(WaitUntil waitUn } } + /// + /// Starts the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start + /// + /// + /// Operation Id + /// SAPDatabaseInstances_StartInstance + /// + /// + /// + /// 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> StartInstanceAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceSapDatabaseInstancesClientDiagnostics.CreateScope("SapDatabaseInstanceResource.StartInstance"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceSapDatabaseInstancesRestClient.StartInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceSapDatabaseInstancesClientDiagnostics, Pipeline, _sapDatabaseInstanceSapDatabaseInstancesRestClient.CreateStartInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/start + /// + /// + /// Operation Id + /// SAPDatabaseInstances_StartInstance + /// + /// + /// + /// 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 StartInstance(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceSapDatabaseInstancesClientDiagnostics.CreateScope("SapDatabaseInstanceResource.StartInstance"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceSapDatabaseInstancesRestClient.StartInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceSapDatabaseInstancesClientDiagnostics, Pipeline, _sapDatabaseInstanceSapDatabaseInstancesRestClient.CreateStartInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop + /// + /// + /// Operation Id + /// SAPDatabaseInstances_StopInstance + /// + /// + /// + /// 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. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + public virtual async Task> StopInstanceAsync(WaitUntil waitUntil, StopRequest body = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceSapDatabaseInstancesClientDiagnostics.CreateScope("SapDatabaseInstanceResource.StopInstance"); + scope.Start(); + try + { + var response = await _sapDatabaseInstanceSapDatabaseInstancesRestClient.StopInstanceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceSapDatabaseInstancesClientDiagnostics, Pipeline, _sapDatabaseInstanceSapDatabaseInstancesRestClient.CreateStopInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops the database instance of the SAP system. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/sapVirtualInstances/{sapVirtualInstanceName}/databaseInstances/{databaseInstanceName}/stop + /// + /// + /// Operation Id + /// SAPDatabaseInstances_StopInstance + /// + /// + /// + /// 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. + /// Stop request for the database instance of the SAP system. + /// The cancellation token to use. + public virtual ArmOperation StopInstance(WaitUntil waitUntil, StopRequest body = null, CancellationToken cancellationToken = default) + { + using var scope = _sapDatabaseInstanceSapDatabaseInstancesClientDiagnostics.CreateScope("SapDatabaseInstanceResource.StopInstance"); + scope.Start(); + try + { + var response = _sapDatabaseInstanceSapDatabaseInstancesRestClient.StopInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapDatabaseInstanceSapDatabaseInstancesClientDiagnostics, Pipeline, _sapDatabaseInstanceSapDatabaseInstancesRestClient.CreateStopInstanceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorData.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorData.cs new file mode 100644 index 0000000000000..a9b168177a2be --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorData.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Workloads.Models; + +namespace Azure.ResourceManager.Workloads +{ + /// A class representing the SapLandscapeMonitor data model. + public partial class SapLandscapeMonitorData : ResourceData + { + /// Initializes a new instance of SapLandscapeMonitorData. + public SapLandscapeMonitorData() + { + TopMetricsThresholds = new ChangeTrackingList(); + } + + /// Initializes a new instance of SapLandscapeMonitorData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// State of provisioning of the SAP monitor. + /// Gets or sets the SID groupings by landscape and Environment. + /// Gets or sets the list Top Metric Thresholds for SAP Landscape Monitor Dashboard. + internal SapLandscapeMonitorData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SapLandscapeMonitorProvisioningState? provisioningState, SapLandscapeMonitorPropertiesGrouping grouping, IList topMetricsThresholds) : base(id, name, resourceType, systemData) + { + ProvisioningState = provisioningState; + Grouping = grouping; + TopMetricsThresholds = topMetricsThresholds; + } + + /// State of provisioning of the SAP monitor. + public SapLandscapeMonitorProvisioningState? ProvisioningState { get; } + /// Gets or sets the SID groupings by landscape and Environment. + public SapLandscapeMonitorPropertiesGrouping Grouping { get; set; } + /// Gets or sets the list Top Metric Thresholds for SAP Landscape Monitor Dashboard. + public IList TopMetricsThresholds { get; } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorResource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorResource.cs new file mode 100644 index 0000000000000..dfbd00f7b6dbd --- /dev/null +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorResource.cs @@ -0,0 +1,365 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Workloads +{ + /// + /// A Class representing a SapLandscapeMonitor 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 GetSapLandscapeMonitorResource method. + /// Otherwise you can get one from its parent resource using the GetSapLandscapeMonitor method. + /// + public partial class SapLandscapeMonitorResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string monitorName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/sapLandscapeMonitor/default"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sapLandscapeMonitorClientDiagnostics; + private readonly SapLandscapeMonitorRestOperations _sapLandscapeMonitorRestClient; + private readonly SapLandscapeMonitorData _data; + + /// Initializes a new instance of the class for mocking. + protected SapLandscapeMonitorResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SapLandscapeMonitorResource(ArmClient client, SapLandscapeMonitorData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// 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 SapLandscapeMonitorResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sapLandscapeMonitorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Workloads", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sapLandscapeMonitorApiVersion); + _sapLandscapeMonitorRestClient = new SapLandscapeMonitorRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sapLandscapeMonitorApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Workloads/monitors/sapLandscapeMonitor"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual SapLandscapeMonitorData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource group, and resource name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/sapLandscapeMonitor/default + /// + /// + /// Operation Id + /// SapLandscapeMonitor_Get + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sapLandscapeMonitorClientDiagnostics.CreateScope("SapLandscapeMonitorResource.Get"); + scope.Start(); + try + { + var response = await _sapLandscapeMonitorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapLandscapeMonitorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets configuration values for Single Pane Of Glass for SAP monitor for the specified subscription, resource group, and resource name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/sapLandscapeMonitor/default + /// + /// + /// Operation Id + /// SapLandscapeMonitor_Get + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sapLandscapeMonitorClientDiagnostics.CreateScope("SapLandscapeMonitorResource.Get"); + scope.Start(); + try + { + var response = _sapLandscapeMonitorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SapLandscapeMonitorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/sapLandscapeMonitor/default + /// + /// + /// Operation Id + /// SapLandscapeMonitor_Delete + /// + /// + /// + /// 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 DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapLandscapeMonitorClientDiagnostics.CreateScope("SapLandscapeMonitorResource.Delete"); + scope.Start(); + try + { + var response = await _sapLandscapeMonitorRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadsArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a SAP Landscape Monitor Dashboard with the specified subscription, resource group, and SAP monitor name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/sapLandscapeMonitor/default + /// + /// + /// Operation Id + /// SapLandscapeMonitor_Delete + /// + /// + /// + /// 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 Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _sapLandscapeMonitorClientDiagnostics.CreateScope("SapLandscapeMonitorResource.Delete"); + scope.Start(); + try + { + var response = _sapLandscapeMonitorRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); + var operation = new WorkloadsArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/sapLandscapeMonitor/default + /// + /// + /// Operation Id + /// SapLandscapeMonitor_Update + /// + /// + /// + /// Request body representing a configuration for Sap Landscape Monitor Dashboard. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(SapLandscapeMonitorData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapLandscapeMonitorClientDiagnostics.CreateScope("SapLandscapeMonitorResource.Update"); + scope.Start(); + try + { + var response = await _sapLandscapeMonitorRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SapLandscapeMonitorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Patches the SAP Landscape Monitor Dashboard for the specified subscription, resource group, and SAP monitor name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/sapLandscapeMonitor/default + /// + /// + /// Operation Id + /// SapLandscapeMonitor_Update + /// + /// + /// + /// Request body representing a configuration for Sap Landscape Monitor Dashboard. + /// The cancellation token to use. + /// is null. + public virtual Response Update(SapLandscapeMonitorData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapLandscapeMonitorClientDiagnostics.CreateScope("SapLandscapeMonitorResource.Update"); + scope.Start(); + try + { + var response = _sapLandscapeMonitorRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + return Response.FromValue(new SapLandscapeMonitorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/sapLandscapeMonitor/default + /// + /// + /// Operation Id + /// SapLandscapeMonitor_Create + /// + /// + /// + /// 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. + /// Request body representing a configuration for Sap Landscape Monitor Dashboard. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, SapLandscapeMonitorData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapLandscapeMonitorClientDiagnostics.CreateScope("SapLandscapeMonitorResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _sapLandscapeMonitorRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadsArmOperation(Response.FromValue(new SapLandscapeMonitorResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a SAP Landscape Monitor Dashboard for the specified subscription, resource group, and resource name. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/monitors/{monitorName}/sapLandscapeMonitor/default + /// + /// + /// Operation Id + /// SapLandscapeMonitor_Create + /// + /// + /// + /// 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. + /// Request body representing a configuration for Sap Landscape Monitor Dashboard. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, SapLandscapeMonitorData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _sapLandscapeMonitorClientDiagnostics.CreateScope("SapLandscapeMonitorResource.CreateOrUpdate"); + scope.Start(); + try + { + var response = _sapLandscapeMonitorRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); + var operation = new WorkloadsArmOperation(Response.FromValue(new SapLandscapeMonitorResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorData.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorData.cs index 88acb62646275..9e401c25fd61f 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorData.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorData.cs @@ -29,26 +29,34 @@ public SapMonitorData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. + /// Managed service identity (user assigned identities). /// State of provisioning of the SAP monitor. /// Defines the SAP monitor errors. /// The SAP monitor resources will be deployed in the SAP monitoring region. The subnet region should be same as the SAP monitoring region. /// Sets the routing preference of the SAP monitor. By default only RFC1918 traffic is routed to the customer VNET. + /// Sets the preference for zone redundancy on resources created for the SAP monitor. By default resources will be created which do not support zone redundancy. /// Managed resource group configuration. /// The ARM ID of the Log Analytics Workspace that is used for SAP monitoring. /// The subnet which the SAP monitor will be deployed in. /// The ARM ID of the MSI used for SAP monitoring. - internal SapMonitorData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, WorkloadMonitorProvisioningState? provisioningState, ResponseError errors, AzureLocation? appLocation, RoutingPreference? routingPreference, ManagedRGConfiguration managedResourceGroupConfiguration, ResourceIdentifier logAnalyticsWorkspaceArmId, ResourceIdentifier monitorSubnetId, ResourceIdentifier msiArmId) : base(id, name, resourceType, systemData, tags, location) + /// The ARM ID of the Storage account used for SAP monitoring. + internal SapMonitorData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, UserAssignedServiceIdentity identity, WorkloadMonitorProvisioningState? provisioningState, ResponseError errors, AzureLocation? appLocation, RoutingPreference? routingPreference, string zoneRedundancyPreference, ManagedRGConfiguration managedResourceGroupConfiguration, ResourceIdentifier logAnalyticsWorkspaceArmId, ResourceIdentifier monitorSubnetId, ResourceIdentifier msiArmId, string storageAccountArmId) : base(id, name, resourceType, systemData, tags, location) { + Identity = identity; ProvisioningState = provisioningState; Errors = errors; AppLocation = appLocation; RoutingPreference = routingPreference; + ZoneRedundancyPreference = zoneRedundancyPreference; ManagedResourceGroupConfiguration = managedResourceGroupConfiguration; LogAnalyticsWorkspaceArmId = logAnalyticsWorkspaceArmId; MonitorSubnetId = monitorSubnetId; MsiArmId = msiArmId; + StorageAccountArmId = storageAccountArmId; } + /// Managed service identity (user assigned identities). + public UserAssignedServiceIdentity Identity { get; set; } /// State of provisioning of the SAP monitor. public WorkloadMonitorProvisioningState? ProvisioningState { get; } /// Defines the SAP monitor errors. @@ -57,6 +65,8 @@ internal SapMonitorData(ResourceIdentifier id, string name, ResourceType resourc public AzureLocation? AppLocation { get; set; } /// Sets the routing preference of the SAP monitor. By default only RFC1918 traffic is routed to the customer VNET. public RoutingPreference? RoutingPreference { get; set; } + /// Sets the preference for zone redundancy on resources created for the SAP monitor. By default resources will be created which do not support zone redundancy. + public string ZoneRedundancyPreference { get; set; } /// Managed resource group configuration. internal ManagedRGConfiguration ManagedResourceGroupConfiguration { get; set; } /// Managed resource group name. @@ -77,5 +87,7 @@ public string ManagedResourceGroupName public ResourceIdentifier MonitorSubnetId { get; set; } /// The ARM ID of the MSI used for SAP monitoring. public ResourceIdentifier MsiArmId { get; } + /// The ARM ID of the Storage account used for SAP monitoring. + public string StorageAccountArmId { get; } } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorResource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorResource.cs index fc687643222cb..d565cb80f17a6 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorResource.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorResource.cs @@ -143,6 +143,13 @@ public virtual Response GetSapProviderInstance(stri return GetSapProviderInstances().Get(providerInstanceName, cancellationToken); } + /// Gets an object representing a SapLandscapeMonitorResource along with the instance operations that can be performed on it in the SapMonitor. + /// Returns a object. + public virtual SapLandscapeMonitorResource GetSapLandscapeMonitor() + { + return new SapLandscapeMonitorResource(Client, new ResourceIdentifier(Id.ToString() + "/sapLandscapeMonitor/default")); + } + /// /// Gets properties of a SAP monitor for the specified subscription, resource group, and resource name. /// @@ -229,7 +236,7 @@ public virtual async Task> DeleteAsync(WaitU try { var response = await _sapMonitormonitorsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapMonitormonitorsClientDiagnostics, Pipeline, _sapMonitormonitorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapMonitormonitorsClientDiagnostics, Pipeline, _sapMonitormonitorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -263,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C try { var response = _sapMonitormonitorsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapMonitormonitorsClientDiagnostics, Pipeline, _sapMonitormonitorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapMonitormonitorsClientDiagnostics, Pipeline, _sapMonitormonitorsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -288,7 +295,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C /// /// /// - /// Request body that only contains the new Tags field. + /// The Update SAP workload monitor request body. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(SapMonitorPatch patch, CancellationToken cancellationToken = default) @@ -322,7 +329,7 @@ public virtual async Task> UpdateAsync(SapMonitorPa /// /// /// - /// Request body that only contains the new Tags field. + /// The Update SAP workload monitor request body. /// The cancellation token to use. /// is null. public virtual Response Update(SapMonitorPatch patch, CancellationToken cancellationToken = default) diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceData.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceData.cs index affd444f2a0e4..2e124d191c0c5 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceData.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceData.cs @@ -25,6 +25,7 @@ public SapProviderInstanceData() /// The name. /// The resourceType. /// The systemData. + /// Managed service identity (user assigned identities). /// State of provisioning of the provider instance. /// Defines the provider instance errors. /// @@ -32,13 +33,16 @@ public SapProviderInstanceData() /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , , , , and . /// - internal SapProviderInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkloadMonitorProvisioningState? provisioningState, ResponseError errors, ProviderSpecificProperties providerSettings) : base(id, name, resourceType, systemData) + internal SapProviderInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, UserAssignedServiceIdentity identity, WorkloadMonitorProvisioningState? provisioningState, ResponseError errors, ProviderSpecificProperties providerSettings) : base(id, name, resourceType, systemData) { + Identity = identity; ProvisioningState = provisioningState; Errors = errors; ProviderSettings = providerSettings; } + /// Managed service identity (user assigned identities). + public UserAssignedServiceIdentity Identity { get; set; } /// State of provisioning of the provider instance. public WorkloadMonitorProvisioningState? ProvisioningState { get; } /// Defines the provider instance errors. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceResource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceResource.cs index 3d850b0fd9ed2..f54988bb684b6 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceResource.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceResource.cs @@ -173,7 +173,7 @@ public virtual async Task> DeleteAsync(WaitU try { var response = await _sapProviderInstanceProviderInstancesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapProviderInstanceProviderInstancesClientDiagnostics, Pipeline, _sapProviderInstanceProviderInstancesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapProviderInstanceProviderInstancesClientDiagnostics, Pipeline, _sapProviderInstanceProviderInstancesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -207,7 +207,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C try { var response = _sapProviderInstanceProviderInstancesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapProviderInstanceProviderInstancesClientDiagnostics, Pipeline, _sapProviderInstanceProviderInstancesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapProviderInstanceProviderInstancesClientDiagnostics, Pipeline, _sapProviderInstanceProviderInstancesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceCollection.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceCollection.cs index 201b182b1795e..81becbc047de6 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceCollection.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceCollection.cs @@ -54,7 +54,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) } /// - /// Creates an Virtual Instance for SAP. + /// Creates a Virtual Instance for SAP solutions (VIS) resource /// /// /// Request Path @@ -67,8 +67,8 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the Virtual Instances for SAP. - /// The Virtual Instance for SAP request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -95,7 +95,7 @@ public virtual async Task> CreateOrUpda } /// - /// Creates an Virtual Instance for SAP. + /// Creates a Virtual Instance for SAP solutions (VIS) resource /// /// /// Request Path @@ -108,8 +108,8 @@ public virtual async Task> CreateOrUpda /// /// /// 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 name of the Virtual Instances for SAP. - /// The Virtual Instance for SAP request body. + /// The name of the Virtual Instances for SAP solutions resource. + /// Virtual Instance for SAP solutions resource request body. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// or is null. @@ -136,7 +136,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil } /// - /// Gets an Virtual Instance for SAP. + /// Gets a Virtual Instance for SAP solutions resource /// /// /// Request Path @@ -148,7 +148,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -173,7 +173,7 @@ public virtual async Task> GetAsync(string } /// - /// Gets an Virtual Instance for SAP. + /// Gets a Virtual Instance for SAP solutions resource /// /// /// Request Path @@ -185,7 +185,7 @@ public virtual async Task> GetAsync(string /// /// /// - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -210,7 +210,7 @@ public virtual Response Get(string sapVirtualInstanc } /// - /// Gets all Virtual Instances for SAP in a resource group. + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. /// /// /// Request Path @@ -232,7 +232,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio } /// - /// Gets all Virtual Instances for SAP in a resource group. + /// Gets all Virtual Instances for SAP solutions resources in a Resource Group. /// /// /// Request Path @@ -266,7 +266,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -301,7 +301,7 @@ public virtual async Task> ExistsAsync(string sapVirtualInstanceN /// /// /// - /// The name of the Virtual Instances for SAP. + /// The name of the Virtual Instances for SAP solutions resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceData.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceData.cs index bb42b8a6545a2..1f9a34e0afab3 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceData.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceData.cs @@ -21,7 +21,7 @@ public partial class SapVirtualInstanceData : TrackedResourceData /// Defines the environment type - Production/Non Production. /// Defines the SAP Product type. /// - /// Defines if an existing SAP system is being registered or a new SAP system is being created + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// @@ -46,16 +46,16 @@ public SapVirtualInstanceData(AzureLocation location, SapEnvironmentType environ /// Defines the environment type - Production/Non Production. /// Defines the SAP Product type. /// - /// Defines if an existing SAP system is being registered or a new SAP system is being created + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// /// Managed resource group configuration. /// Defines the SAP Instance status. - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. /// Defines the Virtual Instance for SAP state. /// Defines the provisioning states. - /// Defines the Virtual Instance for SAP errors. + /// Indicates any errors on the Virtual Instance for SAP solutions resource. internal SapVirtualInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, UserAssignedServiceIdentity identity, SapEnvironmentType environment, SapProductType sapProduct, SapConfiguration configuration, ManagedRGConfiguration managedResourceGroupConfiguration, SapVirtualInstanceStatus? status, SapHealthState? health, SapVirtualInstanceState? state, SapVirtualInstanceProvisioningState? provisioningState, SapVirtualInstanceError errors) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; @@ -77,7 +77,7 @@ internal SapVirtualInstanceData(ResourceIdentifier id, string name, ResourceType /// Defines the SAP Product type. public SapProductType SapProduct { get; set; } /// - /// Defines if an existing SAP system is being registered or a new SAP system is being created + /// Defines if the SAP system is being created using Azure Center for SAP solutions (ACSS) or if an existing SAP system is being registered with ACSS /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. /// The available derived classes include , and . /// @@ -98,13 +98,13 @@ public string ManagedResourceGroupName /// Defines the SAP Instance status. public SapVirtualInstanceStatus? Status { get; } - /// Defines the SAP Instance health. + /// Defines the health of SAP Instances. public SapHealthState? Health { get; } /// Defines the Virtual Instance for SAP state. public SapVirtualInstanceState? State { get; } /// Defines the provisioning states. public SapVirtualInstanceProvisioningState? ProvisioningState { get; } - /// Defines the Virtual Instance for SAP errors. + /// Indicates any errors on the Virtual Instance for SAP solutions resource. internal SapVirtualInstanceError Errors { get; } /// The Virtual Instance for SAP error body. public SapVirtualInstanceErrorDetail ErrorsProperties diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceResource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceResource.cs index af33aeda35c34..78e739c1a7831 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceResource.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceResource.cs @@ -98,7 +98,7 @@ public virtual SapCentralServerInstanceCollection GetSapCentralServerInstances() } /// - /// Gets the SAP Central Instance. + /// Gets the SAP Central Services Instance resource. /// /// /// Request Path @@ -110,7 +110,7 @@ public virtual SapCentralServerInstanceCollection GetSapCentralServerInstances() /// /// /// - /// Central Instance name string modeled as parameter for auto generation to work correctly. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -121,7 +121,7 @@ public virtual async Task> GetSapCent } /// - /// Gets the SAP Central Instance. + /// Gets the SAP Central Services Instance resource. /// /// /// Request Path @@ -133,7 +133,7 @@ public virtual async Task> GetSapCent /// /// /// - /// Central Instance name string modeled as parameter for auto generation to work correctly. + /// Central Services Instance resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -151,7 +151,7 @@ public virtual SapDatabaseInstanceCollection GetSapDatabaseInstances() } /// - /// Gets the SAP Database Instance. + /// Gets the SAP Database Instance resource. /// /// /// Request Path @@ -163,7 +163,7 @@ public virtual SapDatabaseInstanceCollection GetSapDatabaseInstances() /// /// /// - /// Database Instance string modeled as parameter for auto generation to work correctly. + /// Database resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -174,7 +174,7 @@ public virtual async Task> GetSapDatabaseI } /// - /// Gets the SAP Database Instance. + /// Gets the SAP Database Instance resource. /// /// /// Request Path @@ -186,7 +186,7 @@ public virtual async Task> GetSapDatabaseI /// /// /// - /// Database Instance string modeled as parameter for auto generation to work correctly. + /// Database resource name string modeled as parameter for auto generation to work correctly. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -204,7 +204,7 @@ public virtual SapApplicationServerInstanceCollection GetSapApplicationServerIns } /// - /// Gets the SAP Application Server Instance. + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -216,7 +216,7 @@ public virtual SapApplicationServerInstanceCollection GetSapApplicationServerIns /// /// /// - /// The name of SAP Application Server instance. + /// The name of SAP Application Server instance resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -227,7 +227,7 @@ public virtual async Task> GetSap } /// - /// Gets the SAP Application Server Instance. + /// Gets the SAP Application Server Instance corresponding to the Virtual Instance for SAP solutions resource. /// /// /// Request Path @@ -239,7 +239,7 @@ public virtual async Task> GetSap /// /// /// - /// The name of SAP Application Server instance. + /// The name of SAP Application Server instance resource. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -250,7 +250,7 @@ public virtual Response GetSapApplicationS } /// - /// Gets an Virtual Instance for SAP. + /// Gets a Virtual Instance for SAP solutions resource /// /// /// Request Path @@ -282,7 +282,7 @@ public virtual async Task> GetAsync(Cancell } /// - /// Gets an Virtual Instance for SAP. + /// Gets a Virtual Instance for SAP solutions resource /// /// /// Request Path @@ -314,7 +314,7 @@ public virtual Response Get(CancellationToken cancel } /// - /// Deletes an Virtual Instance for SAP. + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. /// /// /// Request Path @@ -348,7 +348,7 @@ public virtual async Task> DeleteAsync(WaitU } /// - /// Deletes an Virtual Instance for SAP. + /// Deletes a Virtual Instance for SAP solutions resource and its child resources, that is the associated Central Services Instance, Application Server Instances and Database Instance. /// /// /// Request Path @@ -382,7 +382,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C } /// - /// Updates an Virtual Instance for SAP. + /// Updates a Virtual Instance for SAP solutions resource /// /// /// Request Path @@ -394,7 +394,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, C /// /// /// - /// The Update Virtual Instance for SAP request body. + /// Request body to update a Virtual Instance for SAP solutions resource. /// The cancellation token to use. /// is null. public virtual async Task> UpdateAsync(SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) @@ -416,7 +416,7 @@ public virtual async Task> UpdateAsync(SapV } /// - /// Updates an Virtual Instance for SAP. + /// Updates a Virtual Instance for SAP solutions resource /// /// /// Request Path @@ -428,7 +428,7 @@ public virtual async Task> UpdateAsync(SapV /// /// /// - /// The Update Virtual Instance for SAP request body. + /// Request body to update a Virtual Instance for SAP solutions resource. /// The cancellation token to use. /// is null. public virtual Response Update(SapVirtualInstancePatch patch, CancellationToken cancellationToken = default) @@ -450,7 +450,7 @@ public virtual Response Update(SapVirtualInstancePat } /// - /// Starts the SAP System. + /// Starts the SAP application, that is the Central Services instance and Application server instances. /// /// /// Request Path @@ -484,7 +484,7 @@ public virtual async Task> StartAsync(WaitUn } /// - /// Starts the SAP System. + /// Starts the SAP application, that is the Central Services instance and Application server instances. /// /// /// Request Path @@ -518,7 +518,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, Ca } /// - /// Stops the SAP System. + /// Stops the SAP Application, that is the Application server instances and Central Services instance. /// /// /// Request Path @@ -531,16 +531,16 @@ public virtual ArmOperation Start(WaitUntil waitUntil, Ca /// /// /// 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 Virtual Instances for SAP stop request body. + /// The Virtual Instance for SAP solutions resource stop request body. /// The cancellation token to use. - public virtual async Task> StopAsync(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> StopAsync(WaitUntil waitUntil, StopRequest body = null, CancellationToken cancellationToken = default) { using var scope = _sapVirtualInstanceSapVirtualInstancesClientDiagnostics.CreateScope("SapVirtualInstanceResource.Stop"); scope.Start(); try { - var response = await _sapVirtualInstanceSapVirtualInstancesRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceSapVirtualInstancesClientDiagnostics, Pipeline, _sapVirtualInstanceSapVirtualInstancesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = await _sapVirtualInstanceSapVirtualInstancesRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceSapVirtualInstancesClientDiagnostics, Pipeline, _sapVirtualInstanceSapVirtualInstancesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -553,7 +553,7 @@ public virtual async Task> StopAsync(WaitUnt } /// - /// Stops the SAP System. + /// Stops the SAP Application, that is the Application server instances and Central Services instance. /// /// /// Request Path @@ -566,16 +566,16 @@ public virtual async Task> StopAsync(WaitUnt /// /// /// 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 Virtual Instances for SAP stop request body. + /// The Virtual Instance for SAP solutions resource stop request body. /// The cancellation token to use. - public virtual ArmOperation Stop(WaitUntil waitUntil, StopContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Stop(WaitUntil waitUntil, StopRequest body = null, CancellationToken cancellationToken = default) { using var scope = _sapVirtualInstanceSapVirtualInstancesClientDiagnostics.CreateScope("SapVirtualInstanceResource.Stop"); scope.Start(); try { - var response = _sapVirtualInstanceSapVirtualInstancesRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceSapVirtualInstancesClientDiagnostics, Pipeline, _sapVirtualInstanceSapVirtualInstancesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.AzureAsyncOperation); + var response = _sapVirtualInstanceSapVirtualInstancesRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body, cancellationToken); + var operation = new WorkloadsArmOperation(new OperationStatusResultOperationSource(), _sapVirtualInstanceSapVirtualInstancesClientDiagnostics, Pipeline, _sapVirtualInstanceSapVirtualInstancesRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, body).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/WordPressInstanceResource.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/WordPressInstanceResource.cs deleted file mode 100644 index 608adb21fb37b..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/WordPressInstanceResource.cs +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.Workloads -{ - /// - /// A Class representing a WordPressInstanceResource 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 GetWordPressInstanceResource method. - /// Otherwise you can get one from its parent resource using the GetWordPressInstanceResource method. - /// - public partial class WordPressInstanceResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string phpWorkloadName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances/default"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _wordPressInstanceResourceWordPressInstancesClientDiagnostics; - private readonly WordpressInstancesRestOperations _wordPressInstanceResourceWordPressInstancesRestClient; - private readonly WordPressInstanceResourceData _data; - - /// Initializes a new instance of the class for mocking. - protected WordPressInstanceResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal WordPressInstanceResource(ArmClient client, WordPressInstanceResourceData data) : this(client, data.Id) - { - HasData = true; - _data = data; - } - - /// 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 WordPressInstanceResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _wordPressInstanceResourceWordPressInstancesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Workloads", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string wordPressInstanceResourceWordPressInstancesApiVersion); - _wordPressInstanceResourceWordPressInstancesRestClient = new WordpressInstancesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, wordPressInstanceResourceWordPressInstancesApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Workloads/phpWorkloads/wordpressInstances"; - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual WordPressInstanceResourceData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Gets the WordPress instance resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances/default - /// - /// - /// Operation Id - /// WordpressInstances_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _wordPressInstanceResourceWordPressInstancesClientDiagnostics.CreateScope("WordPressInstanceResource.Get"); - scope.Start(); - try - { - var response = await _wordPressInstanceResourceWordPressInstancesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WordPressInstanceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets the WordPress instance resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances/default - /// - /// - /// Operation Id - /// WordpressInstances_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _wordPressInstanceResourceWordPressInstancesClientDiagnostics.CreateScope("WordPressInstanceResource.Get"); - scope.Start(); - try - { - var response = _wordPressInstanceResourceWordPressInstancesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WordPressInstanceResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete WordPress instance resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances/default - /// - /// - /// Operation Id - /// WordpressInstances_Delete - /// - /// - /// - /// 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 DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _wordPressInstanceResourceWordPressInstancesClientDiagnostics.CreateScope("WordPressInstanceResource.Delete"); - scope.Start(); - try - { - var response = await _wordPressInstanceResourceWordPressInstancesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken).ConfigureAwait(false); - var operation = new WorkloadsArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete WordPress instance resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances/default - /// - /// - /// Operation Id - /// WordpressInstances_Delete - /// - /// - /// - /// 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 Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _wordPressInstanceResourceWordPressInstancesClientDiagnostics.CreateScope("WordPressInstanceResource.Delete"); - scope.Start(); - try - { - var response = _wordPressInstanceResourceWordPressInstancesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, cancellationToken); - var operation = new WorkloadsArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or updated WordPress instance resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances/default - /// - /// - /// Operation Id - /// WordpressInstances_CreateOrUpdate - /// - /// - /// - /// 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. - /// Resource create or update request payload. - /// The cancellation token to use. - /// is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, WordPressInstanceResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _wordPressInstanceResourceWordPressInstancesClientDiagnostics.CreateScope("WordPressInstanceResource.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _wordPressInstanceResourceWordPressInstancesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new WorkloadsArmOperation(new WordPressInstanceResourceOperationSource(Client), _wordPressInstanceResourceWordPressInstancesClientDiagnostics, Pipeline, _wordPressInstanceResourceWordPressInstancesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or updated WordPress instance resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Workloads/phpWorkloads/{phpWorkloadName}/wordpressInstances/default - /// - /// - /// Operation Id - /// WordpressInstances_CreateOrUpdate - /// - /// - /// - /// 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. - /// Resource create or update request payload. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, WordPressInstanceResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _wordPressInstanceResourceWordPressInstancesClientDiagnostics.CreateScope("WordPressInstanceResource.CreateOrUpdate"); - scope.Start(); - try - { - var response = _wordPressInstanceResourceWordPressInstancesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data, cancellationToken); - var operation = new WorkloadsArmOperation(new WordPressInstanceResourceOperationSource(Client), _wordPressInstanceResourceWordPressInstancesClientDiagnostics, Pipeline, _wordPressInstanceResourceWordPressInstancesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/WordPressInstanceResourceData.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/WordPressInstanceResourceData.cs deleted file mode 100644 index 490092efdfb9f..0000000000000 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/WordPressInstanceResourceData.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.Models; -using Azure.ResourceManager.Workloads.Models; - -namespace Azure.ResourceManager.Workloads -{ - /// A class representing the WordPressInstanceResource data model. - public partial class WordPressInstanceResourceData : ResourceData - { - /// Initializes a new instance of WordPressInstanceResourceData. - public WordPressInstanceResourceData() - { - } - - /// Initializes a new instance of WordPressInstanceResourceData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Application version. - /// Database name used by the application. - /// User name used by the application to connect to database. - /// Site Url to access the WordPress application. - /// WordPress instance provisioning state. - internal WordPressInstanceResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WordPressVersion? version, string databaseName, string databaseUser, Uri siteUri, ApplicationProvisioningState? provisioningState) : base(id, name, resourceType, systemData) - { - Version = version; - DatabaseName = databaseName; - DatabaseUser = databaseUser; - SiteUri = siteUri; - ProvisioningState = provisioningState; - } - - /// Application version. - public WordPressVersion? Version { get; set; } - /// Database name used by the application. - public string DatabaseName { get; set; } - /// User name used by the application to connect to database. - public string DatabaseUser { get; set; } - /// Site Url to access the WordPress application. - public Uri SiteUri { get; } - /// WordPress instance provisioning state. - public ApplicationProvisioningState? ProvisioningState { get; } - } -} diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/autorest.md b/sdk/workloads/Azure.ResourceManager.Workloads/src/autorest.md index dfdecd722724c..7f0bac05a0b80 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/autorest.md +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/autorest.md @@ -9,7 +9,7 @@ csharp: true library-name: Workloads namespace: Azure.ResourceManager.Workloads # default tag is a preview version -require: https://github.com/Azure/azure-rest-api-specs/blob/30b6221c12cc4014ee5142660d09cd48049ee388/specification/workloads/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/workloads/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true